<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  ~ Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
  ~
  ~ Entgra (Pvt) Ltd. 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.
  -->
<ApplicationManagementConfiguration>

    <!-- Application Mgt DB schema -->
    <DatasourceName>jdbc/APPM_DS</DatasourceName>

    <Extensions>
        <Extension name="SPApplicationManager">
            <ClassName>io.entgra.device.mgt.core.application.mgt.core.impl.SPApplicationManagerImpl</ClassName>
        </Extension>
        <Extension name="ApplicationManager">
            <ClassName>io.entgra.device.mgt.core.application.mgt.core.impl.ApplicationManagerImpl</ClassName>
        </Extension>
        <Extension name="ReviewManager">
            <ClassName>io.entgra.device.mgt.core.application.mgt.core.impl.ReviewManagerImpl</ClassName>
        </Extension>
        <Extension name="LifecycleStateManager">
            <ClassName>io.entgra.device.mgt.core.application.mgt.core.lifecycle.LifecycleStateManager</ClassName>
        </Extension>
        <Extension name="SubscriptionManager">
            <ClassName>io.entgra.device.mgt.core.application.mgt.core.impl.SubscriptionManagerImpl</ClassName>
        </Extension>
        <Extension name="ApplicationStorageManager">
            <ClassName>io.entgra.device.mgt.core.application.mgt.core.impl.ApplicationStorageManagerImpl</ClassName>
            <Parameters>
                <Parameter name="StoragePath">repository/resources/apps/</Parameter>
                <Parameter name="MaxScreenShotCount">6</Parameter>
            </Parameters>
        </Extension>
    </Extensions>

    <!-- This is for publisher lifecycle -->
    <!-- The current lifecycle as follows
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        [Created] -> [In-Review] -> [Approved] -> [Published] -> [Unpublished] -> [Removed]
                        ^                               |                               ^
                        |                               |                               |
                        |                               |-> [Deprecated] - - - - - - - -|
                        |                                                               |
                        |-> [Rejected]  - - - - - - - - - - - - - - - - - - - - - - - - |
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If there is a requirement to introduce a new state to the lifecycle, please refer above
    diagram and add relevant state to the below configuration appropriately.
    -->

    <!-- a lifecyclestate can have following properties
        <LifecycleState name="In-Review">
            <IsAppInstallable>false</IsAppInstallable>
            <IsAppUpdatable>true</IsAppUpdatable>
            <IsInitialState>false</IsInitialState>
            <IsEndState>false</IsEndState>
            <Permission>
                /device-mgt/applications/life-cycle/in-review
            </Permission>
            <ProceedingStates>
                <State>Rejected</State>
                <State>Approved</State>
            </ProceedingStates>
        </LifecycleState>
    -->
    <LifecycleStates>
        <LifecycleState name="Created">
            <IsAppUpdatable>true</IsAppUpdatable>
            <IsInitialState>true</IsInitialState>
            <IsDeletableState>true</IsDeletableState>
            <Permission>/app-mgt/life-cycle/application/create</Permission>
            <ProceedingStates>
                <State>In-Review</State>
            </ProceedingStates>
        </LifecycleState>
        <LifecycleState name="In-Review">
            <Permission>/app-mgt/life-cycle/application/review</Permission>
            <ProceedingStates>
                <State>Rejected</State>
                <State>Approved</State>
                <State>Created</State>
            </ProceedingStates>
        </LifecycleState>
        <LifecycleState name="Approved">
            <Permission>/app-mgt/life-cycle/application/approve</Permission>
            <ProceedingStates>
                <State>In-Review</State>
                <State>Published</State>
            </ProceedingStates>
        </LifecycleState>
        <LifecycleState name="Rejected">
            <IsDeletableState>true</IsDeletableState>
            <Permission>/app-mgt/life-cycle/application/reject</Permission>
            <ProceedingStates>
                <State>In-Review</State>
            </ProceedingStates>
        </LifecycleState>
        <LifecycleState name="Published">
            <IsAppInstallable>true</IsAppInstallable>
            <Permission>/app-mgt/life-cycle/application/publish</Permission>
            <ProceedingStates>
                <State>Blocked</State>
                <State>Deprecated</State>
            </ProceedingStates>
        </LifecycleState>
        <LifecycleState name="Blocked">
            <Permission>/app-mgt/life-cycle/application/block</Permission>
            <ProceedingStates>
                <State>Published</State>
                <State>Deprecated</State>
            </ProceedingStates>
        </LifecycleState>
        <LifecycleState name="Deprecated">
            <Permission>/app-mgt/life-cycle/application/deprecate</Permission>
            <ProceedingStates>
                <State>Published</State>
                <State>Retired</State>
            </ProceedingStates>
        </LifecycleState>
        <LifecycleState name="Retired">
            <IsEndState>true</IsEndState>
            <Permission>/app-mgt/life-cycle/application/retire</Permission>
        </LifecycleState>
    </LifecycleStates>

    <AppCategories>
        <Category>EMM</Category>
        <Category>IoT</Category>
        <Category>Art &amp; Design</Category>
        <Category>Auto &amp; Vehicles</Category>
        <Category>Beauty</Category>
        <Category>Books &amp; Reference</Category>
        <Category>Business</Category>
        <Category>Comics</Category>
        <Category>Communications</Category>
        <Category>Dating</Category>
        <Category>Education</Category>
        <Category>Entertainment</Category>
        <Category>Events</Category>
        <Category>Finance</Category>
        <Category>Food &amp; Drink</Category>
        <Category>Health &amp; Fitness</Category>
        <Category>House &amp; Home</Category>
        <Category>Libraries &amp; Demo</Category>
        <Category>Lifestyle</Category>
        <Category>Maps &amp; Navigation</Category>
        <Category>Medical</Category>
        <Category>Music &amp; Audio</Category>
        <Category>News &amp; Magazines</Category>
        <Category>Parenting</Category>
        <Category>Personalization</Category>
        <Category>Photography</Category>
        <Category>Productivity</Category>
        <Category>Shopping</Category>
        <Category>Social</Category>
        <Category>Sports</Category>
        <Category>Tools</Category>
        <Category>Travel &amp; Local</Category>
        <Category>Video Players &amp; Editors</Category>
        <Category>Weather</Category>
        <Category>GooglePlaySyncedApp</Category>
        <Category>AppleStoreSyncedApp</Category>
    </AppCategories>

    <RatingConfig>
        <MinRatingValue>1</MinRatingValue>
        <MaxRatingValue>10</MaxRatingValue>
    </RatingConfig>

    <MDMConfig>
        <ArtifactDownloadProtocol>http</ArtifactDownloadProtocol>
        <ArtifactDownloadEndpoint>/api/application-mgt/v1.0/artifact</ArtifactDownloadEndpoint>
    </MDMConfig>
</ApplicationManagementConfiguration>
