Esempio n. 1
0
 public static List<String> getScopeUrls(List<ScopeDescription> p_scopes) {
   final List<String> result = new ArrayList<String>();
   if (p_scopes != null && !p_scopes.isEmpty()) {
     for (ScopeDescription s : p_scopes) {
       final InternalExternal type = s.getType();
       if (type != null) {
         switch (type) {
           case EXTERNAL:
           case EXTERNAL_AUTO:
             result.add(s.getUrl());
             break;
           case INTERNAL:
             result.add(getInternalScopeUrl(s));
             break;
         }
       } else {
         result.add(s.getUrl());
       }
     }
   }
   return result;
 }
Esempio n. 2
0
 private static String getInternalScopeUrl(ScopeDescription internalScope) {
   if (internalScope != null && internalScope.getType() == InternalExternal.INTERNAL) {
     return getScopeEndpoint() + "/" + internalScope.getId();
   }
   return "";
 }