Package models.PermissionSet

Examples of models.PermissionSet.SetupEntityTypes


  public static void addSEAPermResultsToJson(PermissionSet permset,
      StringBuilder jsonBuild, String permCategory, int i) {
    Iterator entityItter = null;
    Iterator seaItter = null;

    SetupEntityTypes seaName = null;
    Map<SetupEntityTypes, Set<String>> seaPermMap = new HashMap();

    StringBuilder permsetRoot = new StringBuilder();
    permsetRoot.append("permset").append(i+1).append(SEA);
    if (permCategory.equals(UNIQUE)) {
      seaPermMap = permset.getSeaPermMap(ObjPermCategory.unique);
      permsetRoot.append(UNIQUE);
     
    } else if (permCategory.equals(COMMON)) {
      seaPermMap = permset.getSeaPermMap(ObjPermCategory.common);
      permsetRoot.append(COMMON);
     
    } else if (permCategory.equals(DIFFERENCES)) {
      seaPermMap = permset.getSeaPermMap(ObjPermCategory.differing);
      permsetRoot.append(DIFFERENCES);
    }
   
    String permsetLabel = permsetRoot.toString();
    jsonBuild.append(", ").append("\"" + permsetLabel + "\"").append(": [");
   
    SortedSet<SetupEntityTypes> alphabeticalKeySet = new TreeSet<SetupEntityTypes>();
    alphabeticalKeySet.addAll(seaPermMap.keySet());
   
    seaItter = alphabeticalKeySet.iterator();
    if (seaItter.hasNext()) {jsonBuild.append("{ \"success\": \"true\", \"text\": \"Setup Entities\", \"").append(permsetLabel).append("\": [ "); }
    while (seaItter.hasNext()) {
      seaName = (SetupEntityTypes) seaItter.next();
      jsonBuild.append("{\"success\": \"true\", \"text\": \"").append(seaName.getDisplayName()).append("\", \"").append(permsetLabel).append("\": [");

      SortedSet<String> alphabeticalEntitySet = new TreeSet<String>();
      if (seaPermMap.containsKey(seaName)) {
        alphabeticalEntitySet.addAll(seaPermMap.get(seaName));
      } else {
View Full Code Here

TOP

Related Classes of models.PermissionSet.SetupEntityTypes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.