Example #1
0
 static String createUID(Project project, Resource resource) {
   String uid = resource.getKey();
   if (!StringUtils.equals(Scopes.PROJECT, resource.getScope())) {
     // not a project nor a library
     uid =
         new StringBuilder(ResourceModel.KEY_SIZE)
             .append(project.getKey())
             .append(':')
             .append(resource.getKey())
             .toString();
   }
   return uid;
 }
Example #2
0
 /**
  * Views plugin creates copy of technical projects and should be allowed to copy all measures even
  * internal ones
  */
 private boolean isTechnicalProjectCopy(Resource resource) {
   return Scopes.FILE.equals(resource.getScope())
       && Qualifiers.PROJECT.equals(resource.getQualifier());
 }