forked from community/device-mgt-core
feature/appm-store/pbac
parent
64507c1011
commit
c8b983fb93
20
components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/lifecycle/LifecycleStateManger.java → components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/lifecycle/LifecycleStateManager.java
20
components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/lifecycle/LifecycleStateManger.java → components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/lifecycle/LifecycleStateManager.java
@ -0,0 +1,25 @@
|
|||||||
|
package org.wso2.carbon.device.application.mgt.core;
|
||||||
|
|
||||||
|
import org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager;
|
||||||
|
import org.wso2.carbon.device.application.mgt.core.lifecycle.State;
|
||||||
|
import org.wso2.carbon.device.application.mgt.core.lifecycle.config.LifecycleState;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public class LifeCycleStateManagerTest extends LifecycleStateManager {
|
||||||
|
|
||||||
|
public void initializeLifeCycleDetails(List<LifecycleState> states) {
|
||||||
|
HashMap<String, State> lifecycleStates = new HashMap<>();
|
||||||
|
for (LifecycleState s : states) {
|
||||||
|
if (s.getProceedingStates() != null) {
|
||||||
|
s.getProceedingStates().replaceAll(String::toUpperCase);
|
||||||
|
}
|
||||||
|
lifecycleStates.put(s.getName().toUpperCase(), new State(s.getName().toUpperCase(),
|
||||||
|
s.getProceedingStates(), s.getPermission(), s.isAppUpdatable(), s.isAppInstallable(),
|
||||||
|
s.isInitialState(), s.isEndState()));
|
||||||
|
}
|
||||||
|
setLifecycleStates(lifecycleStates);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue