<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  ~ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. licenses this file to you under the Apache License,
  ~ Version 2.0 (the "License"); you may not use this file except
  ~ in compliance with the License.
  ~ you may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<DeviceMgtConfiguration>
    <ManagementRepository>
        <DataSourceConfiguration>
            <JndiLookupDefinition>
                <Name>jdbc/DM_DS</Name>
            </JndiLookupDefinition>
        </DataSourceConfiguration>
    </ManagementRepository>
    <PushNotificationConfiguration>
        <SchedulerBatchSize>1000</SchedulerBatchSize>
        <SchedulerBatchDelayMills>60000</SchedulerBatchDelayMills>
        <SchedulerTaskInitialDelay>60000</SchedulerTaskInitialDelay>
        <SchedulerTaskEnabled>true</SchedulerTaskEnabled>
        <PushNotificationProviders>
            <Provider>org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.FCMBasedPushNotificationProvider</Provider>
            <!--<Provider>org.wso2.carbon.device.mgt.mobile.impl.ios.apns.APNSBasedPushNotificationProvider</Provider>-->
            <Provider>org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.MQTTBasedPushNotificationProvider</Provider>
			<Provider>org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.HTTPBasedPushNotificationProvider</Provider>
            <Provider>org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.XMPPBasedPushNotificationProvider</Provider>
        </PushNotificationProviders>
    </PushNotificationConfiguration>
	<PullNotificationConfiguration>
		<Enabled>false</Enabled>
	</PullNotificationConfiguration>
    <IdentityConfiguration>
        <ServerUrl>https://localhost:9443</ServerUrl>
        <AdminUsername>admin</AdminUsername>
        <AdminPassword>admin</AdminPassword>
    </IdentityConfiguration>
    <KeyManagerConfiguration>
        <ServerUrl>https://localhost:9443</ServerUrl>
        <AdminUsername>admin</AdminUsername>
        <AdminPassword>admin</AdminPassword>
    </KeyManagerConfiguration>
    <PolicyConfiguration>
        <MonitoringClass>org.wso2.carbon.policy.mgt</MonitoringClass>
        <MonitoringEnable>true</MonitoringEnable>
        <MonitoringFrequency>60000</MonitoringFrequency>
        <MaxRetries>5</MaxRetries>
        <MinRetriesToMarkUnreachable>8</MinRetriesToMarkUnreachable>
        <MinRetriesToMarkInactive>20</MinRetriesToMarkInactive>
        <!--Set the policy evaluation point name-->
        <!--Simple ->  Simple policy evaluation point-->
        <!--Merged ->  Merged policy evaluation point -->
        <PolicyEvaluationPoint>Simple</PolicyEvaluationPoint>
        <CacheEnable>true</CacheEnable>
    </PolicyConfiguration>
    <!-- Default Page size configuration for paginated DM APIs-->
    <PaginationConfiguration>
        <DeviceListPageSize>20</DeviceListPageSize>
        <GroupListPageSize>20</GroupListPageSize>
        <NotificationListPageSize>20</NotificationListPageSize>
        <ActivityListPageSize>20</ActivityListPageSize>
        <OperationListPageSize>20</OperationListPageSize>
        <TopicListPageSize>20</TopicListPageSize>
    </PaginationConfiguration>
    <!--This specifies whether to enable the DeviceStatus Task in this node. In clustered setup only master node
     should  have to run this task.-->
    <DeviceStatusTaskConfig>
        <Enable>true</Enable>
    </DeviceStatusTaskConfig>
    <!--This controls the in-memory device cache which is local to this node. Setting it enable will activate the
    device caching for upto configured expiry-time in seconds. In clustered setup all worker nodes can enable the
    device-cache to improve performance. -->
    <DeviceCacheConfiguration>
        <Enable>true</Enable>
        <ExpiryTime>600</ExpiryTime>
        <!--This configuration specifies the number of cache entries in device cache. default capacity is 10000 entries.
        This can be configured to higher number if cache eviction happens due to large number of devices in the
        server environment-->
        <Capacity>10000</Capacity>
    </DeviceCacheConfiguration>
    <CertificateCacheConfiguration>
        <Enable>true</Enable>
        <ExpiryTime>86400</ExpiryTime>
    </CertificateCacheConfiguration>
    <ArchivalConfiguration>
        <DataSourceConfiguration>
            <JndiLookupDefinition>
                <Name>jdbc/DM_ARCHIVAL_DS</Name>
            </JndiLookupDefinition>
        </DataSourceConfiguration>
        <ArchivalTask>
            <Enabled>false</Enabled>
            <TaskClass>org.wso2.carbon.device.mgt.core.task.impl.ArchivalTask</TaskClass>
            <!-- Cron expression to run the task at specified time -->
            <CronExpression>0 0 0 1/1 * ? *</CronExpression>
            <!-- How many days of data should we keep in transactional tables? Must be in number of days -->
            <RetentionPeriod>30</RetentionPeriod>
            <ExecutionBatchSize>1000</ExecutionBatchSize>
            <PurgingTask>
                <Enabled>false</Enabled>
                <TaskClass>org.wso2.carbon.device.mgt.core.task.impl.ArchivedDataDeletionTask</TaskClass>
                <!-- Cron expression to run the task at specified time -->
                <CronExpression>0 0 3 1/1 * ? *</CronExpression>
                <!-- After this number of days, data will be permanently deleted from archival tables.
                Data retention period must be in number of DAYS -->
                <RetentionPeriod>365</RetentionPeriod>
            </PurgingTask>
        </ArchivalTask>
    </ArchivalConfiguration>
    <GeoLocationConfiguration>
        <Enabled>false</Enabled>
    </GeoLocationConfiguration>
    <OperationAnalyticsConfiguration>
        <PublishLocationResponse>false</PublishLocationResponse>
        <PublishDeviceInfoResponse>false</PublishDeviceInfoResponse>
        <PublishOperationResponse>
            <Enabled>false</Enabled>
            <Operations>
                <!-- Publish specific operation responses -->
                <!--
                    <Operation>BATTERY_LEVEL</Operation>
                    <Operation>CHECK_LOCK_STATUS</Operation>
                -->
                <!-- use wildcard '*' to publish all responses -->
                <Operation>*</Operation>
            </Operations>
        </PublishOperationResponse>
    </OperationAnalyticsConfiguration>
    <!--This configuration used to configure the options for remote device control feature -->
    <RemoteSessionConfiguration>
        <Enabled>true</Enabled>
        <RemoteSessionServerUrl>ws://localhost:9763</RemoteSessionServerUrl>
        <MaximumHTTPConnectionPerHost>2</MaximumHTTPConnectionPerHost>
        <MaximumTotalHTTPConnections>100</MaximumTotalHTTPConnections>
        <MaximumMessagesPerSecond>20</MaximumMessagesPerSecond>
        <SessionIdleTimeOut>15</SessionIdleTimeOut>
        <MaximumMessageBufferSize>640</MaximumMessageBufferSize>
    </RemoteSessionConfiguration>
    <DefaultGroupsConfiguration>BYOD,COPE</DefaultGroupsConfiguration>
</DeviceMgtConfiguration>

