コード例 #1
0
 @Override
 public boolean isRenamed(String site, String path) {
   PersistenceManagerService persistenceManagerService =
       _servicesManager.getService(PersistenceManagerService.class);
   NodeRef nodeRef =
       persistenceManagerService.getNodeRef(
           SITE_REPO_ROOT_PATTERN.replaceAll(SITE_REPLACEMENT_PATTERN, site), path);
   if (nodeRef != null) {
     return persistenceManagerService.hasAspect(nodeRef, CStudioContentModel.ASPECT_RENAMED);
   } else {
     return false;
   }
 }
コード例 #2
0
 @Override
 public String getOldPath(String site, String path) {
   PersistenceManagerService persistenceManagerService =
       _servicesManager.getService(PersistenceManagerService.class);
   NodeRef nodeRef =
       persistenceManagerService.getNodeRef(
           SITE_REPO_ROOT_PATTERN.replaceAll(SITE_REPLACEMENT_PATTERN, site), path);
   if (nodeRef != null) {
     if (persistenceManagerService.hasAspect(nodeRef, CStudioContentModel.ASPECT_RENAMED)) {
       String oldPath =
           DefaultTypeConverter.INSTANCE.convert(
               String.class,
               persistenceManagerService.getProperty(
                   nodeRef, CStudioContentModel.PROP_RENAMED_OLD_URL));
       return oldPath;
     }
   }
   return null;
 }