Examples of ACLManager


Examples of org.apache.tez.common.security.ACLManager

    amLocalResources.put(
      TezConstants.TEZ_AM_LOCAL_RESOURCES_PB_FILE_NAME,
      sessionJarsPBLRsrc);

    String user = UserGroupInformation.getCurrentUser().getShortUserName();
    ACLManager aclManager = new ACLManager(user, finalTezConf);
    Map<ApplicationAccessType, String> acls = aclManager.toYARNACls();

    if(dag != null) {
     
      updateDAGVertices(dag, amConfig, tezJarResources, tezLrsAsArchive, sessionCreds);
View Full Code Here

Examples of org.apache.tez.common.security.ACLManager

    } else {
      dagUGI = UserGroupInformation.createRemoteUser(this.userName);
      dagUGI.addCredentials(this.credentials);
    }

    this.aclManager = new ACLManager(appContext.getAMACLManager(), dagUGI.getShortUserName(),
        this.conf);

    this.taskSpecificLaunchCmdOption = new TaskSpecificLaunchCmdOption(conf);
    // This "this leak" is okay because the retained pointer is in an
    //  instance variable.
View Full Code Here

Examples of org.apache.tez.common.security.ACLManager

    String strAppId = this.appAttemptID.getApplicationId().toString();
    this.tezSystemStagingDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);

    dispatcher = createDispatcher();
    context = new RunningAppContext(conf);
    this.aclManager = new ACLManager(appMasterUgi.getShortUserName(), this.amConf);

    clientHandler = new DAGClientHandler(this);

    addIfService(dispatcher, false);
View Full Code Here

Examples of org.apache.tez.common.security.ACLManager

    dagPlan = createTestDAGPlan();
    dispatcher = new DrainDispatcher();
    fsTokens = new Credentials();
    appContext = mock(AppContext.class);
    historyEventHandler = mock(HistoryEventHandler.class);
    aclManager = new ACLManager("amUser");
    doReturn(conf).when(appContext).getAMConf();
    doReturn(appAttemptId).when(appContext).getApplicationAttemptId();
    doReturn(appAttemptId.getApplicationId()).when(appContext).getApplicationID();
    doReturn(dagId).when(appContext).getCurrentDAGID();
    doReturn(historyEventHandler).when(appContext).getHistoryHandler();
View Full Code Here

Examples of org.uengine.security.AclManager

          String strGrayStyle = " bgcolor=\"#F2F2F2\" ";

          String strNotGrayStyle = " bgcolor=\"#FFFFFF\" ";
         
          AclManager acl = AclManager.getInstance();
         
          for (int i = 0; i < dl.size(); i++) {
            DataMap tmpMap = (DataMap) dl.get(i);
            String pid = tmpMap.getString("instid", "");
            String status = tmpMap.getString("status", "");
            String instName = tmpMap.getString("name", "");
            String initrsnm = tmpMap.getString("initrsnm", "");
            String currrsnm = tmpMap.getString("currrsnm", "");
            String defName = tmpMap.getString("defname", "");
            String info = tmpMap.getString("info", "");
            String startedDate = tmpMap.getString("startedDate", "");
            if (startedDate.length() > 10) {
              startedDate = startedDate.substring(0,16);
            }
            String finishedDate = tmpMap.getString("finishedDate", "");
            if (finishedDate.length() > 10) {
              finishedDate = finishedDate.substring(0,16);
            }
            String ext1 = tmpMap.getString("ext1", "");
            String defId = tmpMap.getString("defid", "");

            HashMap permission = null;
            if (loggedUserIsAdmin) {
                            permission = new HashMap();
              permission.put(AclManager.PERMISSION_MANAGEMENT, true);
            } else {
                permission = acl.getPermission(Integer.parseInt(defId), loggedUserId);
            }
           
            String backGroundColor = bgcolor + (isGray ? strGrayStyle : strNotGrayStyle);
            isGray = !isGray;
           
View Full Code Here

Examples of org.uengine.security.AclManager

   
    String sql = new StringBuffer(
    "SELECT defid, parentfolder, name, objtype, prodver FROM bpm_procdef ").append(
    "WHERE (isdeleted='0') AND (objtype = 'folder') ").toString();
   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql, new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
       
        Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint);
       
        if (permission.containsKey(AclManager.PERMISSION_VIEW) ||
            permission.containsKey(AclManager.PERMISSION_INITIATE) ) {
          String parentFolder = rs.getString("parentfolder");
          String name = rs.getString("name");
View Full Code Here

Examples of org.uengine.security.AclManager

   
    String sql = new StringBuffer(
    "SELECT defid, parentfolder, name, objtype, prodver FROM bpm_procdef ").append(
    "WHERE (isdeleted='0') AND ((objtype = 'process' AND prodver <> 0) OR (objtype = 'folder') )").toString();
   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql, new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
       
        Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint);
       
        if (permission.containsKey(AclManager.PERMISSION_VIEW) ||
            permission.containsKey(AclManager.PERMISSION_INITIATE) ) {
          String parentFolder = rs.getString("parentfolder");
          String name = rs.getString("name");
View Full Code Here

Examples of org.uengine.security.AclManager

  @SuppressWarnings("unchecked")
  public List<Item> findAllAuthorityProcessDefinitions(final String endpoint, final String comCode, final char cPermission) {
   
    String sql = "SELECT defid, parentfolder, name, objtype, prodver FROM bpm_procdef WHERE isdeleted='0' AND comcode = '" + comCode + "'";
   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql, new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
        Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint, true);
       
        if (permission.containsKey(AclManager.PERMISSION_MANAGEMENT) || permission.containsKey(cPermission)) {
          String name = rs.getString("name");
          String objtype = rs.getString("objtype");
          String parentFolder = rs.getString("parentfolder");
View Full Code Here

Examples of org.uengine.security.AclManager

       .append(" WHERE  isdeleted = 0     ").append("\n")
       .append("   AND  objtype = 'folder'").append("\n")
       .append("   AND  comcode = '").append(comCode).append("'").append("\n");
   
   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql.toString(), new RowMapper() {
      public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
        Item item = null;
       
        int defid = rs.getInt("defid");
        //Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint);
        Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint, comCode, rs.getString("parentfolder"));
       
        if (permission.containsKey(AclManager.PERMISSION_MANAGEMENT) || permission.containsKey(cPermission)) {
          String name = rs.getString("name");
          String objtype = rs.getString("objtype");
          String parentFolder = rs.getString("parentfolder");
View Full Code Here

Examples of org.uengine.security.AclManager

  public List<Item> findAllFormListForParticipant(final String endpoint) {
    String sql = new StringBuffer(
        "SELECT defid, name, objtype, parentFolder FROM bpm_procdef").append(
        " WHERE (isdeleted='0') AND (objtype = 'form' AND prodver <> 0) OR (objtype = 'folder')").toString();
   
    final AclManager aclManager = AclManager.getInstance();
   
    return this.jdbcTemplate.query(sql,
        new RowMapper() {
          public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
            Item item = null;
           
            int defid = rs.getInt("defid");
           
            Map<Character, Boolean> permission = aclManager.getPermission(defid, endpoint);
           
            if (permission.containsKey(AclManager.PERMISSION_INITIATE) ||
                permission.containsKey(AclManager.PERMISSION_VIEW) ||
                permission.containsKey(AclManager.PERMISSION_EDIT)) {
              String name = rs.getString("name");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.