Package com.dotmarketing.beans

Examples of com.dotmarketing.beans.PermissionAsset


   
    DotConnect dc = new DotConnect();
    dc.setSQL(sb.toString());
    ArrayList<HashMap<String, String>> results = dc.getResults();
    for (HashMap<String, String> map : results) {
      PermissionAsset pa = new PermissionAsset();
      Report report = new Report();
      report.setInode(map.get("inode"));
      report.setReportName(map.get("report_name"));
      report.setReportDescription(map.get("report_description"));
      report.setRequiresInput(Parameter.getBooleanFromString(map.get("requires_input")));
      report.setOwner(map.get("owner"));
      report.setWebFormReport(Parameter.getBooleanFromString(map.get("web_form_report")));
      ArrayList p = new ArrayList();
      if(isAdmin || user.equals(map.get("owner"))){
        p.add(new Long(4));
      }else{
        p.add(new Long(UtilMethods.parseLong(map.get("max_permission"),0)));
      }
      pa.setPermissions(p);
      pa.setAsset(report);
      permissionReports.add(pa);
    }
    return permissionReports;
  }
View Full Code Here


      results = dc.getResults();
    } catch (DotDataException e) {
      Logger.error(ReportFactory.class, e.getMessage(), e);
    }
    for (HashMap<String, String> map : results) {
      PermissionAsset pa = new PermissionAsset();
      Report report = new Report();
      report.setInode(map.get("inode"));
      report.setReportName(map.get("report_name"));
      report.setReportDescription(map.get("report_description"));
      report.setRequiresInput(Parameter.getBooleanFromString(map.get("requires_input")));
      report.setOwner(map.get("owner"));
      report.setWebFormReport(Parameter.getBooleanFromString(map.get("web_form_report")));
      pa.setAsset(report);
      permissionReports.add(pa);
    }
    return permissionReports;
  }
View Full Code Here

        permissions = permissionAPI.getPermissionIdsFromRoles(asset, roles, user);
      } catch (DotDataException e) {
        Logger.error(WebAssetFactory.class, "Could not load permissions : ",e);
      }

      PermissionAsset permAsset = new PermissionAsset();
      if (!WebAssetFactory.isAbstractAsset(asset))
        permAsset.setPathToMe(APILocator.getIdentifierAPI().find(folderParent).getPath());
      else
        permAsset.setPathToMe("");
      permAsset.setPermissions(permissions);
      permAsset.setAsset(asset);
      entries.add(permAsset);
    }
    return entries;
  }
View Full Code Here

        permissions = permissionAPI.getPermissionIdsFromRoles(asset, roles, user);
      } catch (DotDataException e) {
        Logger.error(WebAssetFactory.class,"Could not load permissions : ",e);
      }

      PermissionAsset permAsset = new PermissionAsset();
      if (!WebAssetFactory.isAbstractAsset(asset))
        permAsset.setPathToMe(APILocator.getIdentifierAPI().find(folderParent).getPath());
      else
        permAsset.setPathToMe("");
      permAsset.setPermissions(permissions);
      permAsset.setAsset(asset);
      entries.add(permAsset);
    }
    return entries;
  }
View Full Code Here

        permissions = permissionAPI.getPermissionIdsFromRoles(asset, roles, user);
      } catch (DotDataException e) {
        Logger.error(WebAssetFactory.class,"Could not load permissions : ",e);
      }

      PermissionAsset permAsset = new PermissionAsset();
      if (!WebAssetFactory.isAbstractAsset(asset))
        permAsset.setPathToMe(APILocator.getIdentifierAPI().find(folderParent).getPath());
      else
        permAsset.setPathToMe("");
      permAsset.setPermissions(permissions);
      permAsset.setAsset(asset);
      entries.add(permAsset);
    }
    return entries;
  }
View Full Code Here

        permissions = permissionAPI.getPermissionIdsFromRoles(asset, roles, user);
      } catch (DotDataException e) {
        Logger.error(WebAssetFactory.class,"Could not load permissions : ",e);
      }

      PermissionAsset permAsset = new PermissionAsset();
      if (!WebAssetFactory.isAbstractAsset(asset))
        permAsset.setPathToMe(APILocator.getIdentifierAPI().find(folderParent).getPath());
      else
        permAsset.setPathToMe("");
      permAsset.setPermissions(permissions);
      permAsset.setAsset(asset);
      entries.add(permAsset);
    }
    return entries;
  }
View Full Code Here

        permissions = permissionAPI.getPermissionIdsFromRoles(asset, roles, user);
      } catch (DotDataException e) {
        Logger.error(WebAssetFactory.class,"Could not load permissions : ",e);
      }

      PermissionAsset permAsset = new PermissionAsset();
      if (!WebAssetFactory.isAbstractAsset(asset))
        permAsset.setPathToMe(APILocator.getIdentifierAPI().find(folderParent).getPath());
      else
        permAsset.setPathToMe("");
      permAsset.setPermissions(permissions);
      permAsset.setAsset(asset);
      entries.add(permAsset);
    }
    return entries;
  }
View Full Code Here

        permissions = permissionAPI.getPermissionIdsFromRoles(asset, roles, user);
      } catch (DotDataException e) {
        Logger.error(WebAssetFactory.class,"Could not load permissions : ",e);
      }

      PermissionAsset permAsset = new PermissionAsset();
      if (!WebAssetFactory.isAbstractAsset(asset))
        permAsset.setPathToMe(APILocator.getIdentifierAPI().find(folderParent).getPath());
      else
        permAsset.setPathToMe("");
      permAsset.setPermissions(permissions);
      permAsset.setAsset(asset);
      entries.add(permAsset);
    }
    return entries;
  }
View Full Code Here

        permissions = permissionAPI.getPermissionIdsFromRoles(asset, roles, user);
      } catch (DotDataException e) {
        Logger.error(WebAssetFactory.class,"Could not load permissions : ",e);
      }

      PermissionAsset permAsset = new PermissionAsset();
      if (!WebAssetFactory.isAbstractAsset(asset))
        permAsset.setPathToMe(APILocator.getIdentifierAPI().find(folderParent).getPath());
      else
        permAsset.setPathToMe("");
      permAsset.setPermissions(permissions);
      permAsset.setAsset(asset);
      paginatedEntries.add(permAsset);
    }
   
    paginatedEntries.setTotalResults(totalCount);
   
View Full Code Here

TOP

Related Classes of com.dotmarketing.beans.PermissionAsset

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.