コード例 #1
0
 @Override
 public void lockItem(final String site, final String path) {
   GeneralLockService generalLockService =
       getServicesManager().getService(GeneralLockService.class);
   PersistenceManagerService persistenceManagerService =
       _servicesManager.getService(PersistenceManagerService.class);
   String rootPath = SITE_REPO_ROOT_PATTERN.replaceAll(SITE_REPLACEMENT_PATTERN, site);
   NodeRef nodeRef = persistenceManagerService.getNodeRef(rootPath, path);
   if (nodeRef != null) {
     generalLockService.lock(nodeRef.getId());
   }
 }
コード例 #2
0
 @Override
 public void lockRepository() {
   GeneralLockService generalLockService =
       getServicesManager().getService(GeneralLockService.class);
   generalLockService.lock(GeneralLockService.MASTER_LOCK);
 }