Search in sources :

Example 1 with LockInfo

use of com.ctrip.framework.apollo.portal.entity.vo.LockInfo in project apollo by ctripcorp.

the class NamespaceLockService method getNamespaceLockInfo.

public LockInfo getNamespaceLockInfo(String appId, Env env, String clusterName, String namespaceName) {
    LockInfo lockInfo = new LockInfo();
    NamespaceLockDTO namespaceLockDTO = namespaceLockAPI.getNamespaceLockOwner(appId, env, clusterName, namespaceName);
    String lockOwner = namespaceLockDTO == null ? "" : namespaceLockDTO.getDataChangeCreatedBy();
    lockInfo.setLockOwner(lockOwner);
    lockInfo.setEmergencyPublishAllowed(portalConfig.isEmergencyPublishAllowed(env));
    return lockInfo;
}
Also used : NamespaceLockDTO(com.ctrip.framework.apollo.common.dto.NamespaceLockDTO) LockInfo(com.ctrip.framework.apollo.portal.entity.vo.LockInfo)

Aggregations

NamespaceLockDTO (com.ctrip.framework.apollo.common.dto.NamespaceLockDTO)1 LockInfo (com.ctrip.framework.apollo.portal.entity.vo.LockInfo)1