Examples of SAclVO


Examples of com.cloud.bridge.model.SAclVO

        List<SAclVO> itemAclData = aclDao.listGrants( target, itemId );
        if (null != itemAclData)
        {
            ListIterator<SAclVO> it = itemAclData.listIterator();
            while( it.hasNext()) {
                SAclVO oneTag = it.next();
                aclDao.remove(oneTag.getId());
            }
        }
    }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

        List<SAclVO> bucketAclData = aclDao.listGrants( "SBucket", bucketId );
        if (null != bucketAclData)
        {
            ListIterator<SAclVO> it = bucketAclData.listIterator();
            while( it.hasNext()) {
                SAclVO oneTag = it.next();
                aclDao.remove(oneTag.getId());
            }
        }
    }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

    {
        ListIterator<SAclVO> it = privileges.listIterator();
        while( it.hasNext())
        {
            // True providing the requested permission is contained in one or the granted rights for this user.  False otherwise.
            SAclVO rights = it.next();
            int permission = rights.getPermission();
            if (requestedPermission == (permission & requestedPermission)) return true;
        }
        return false;
    }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

     
  }
 
  @Override
  public SAcl save(String target, long targetId, S3Grant grant, int grantOrder) {
    SAclVO aclEntry = new SAclVO();
    aclEntry.setTarget(target);
    aclEntry.setTargetId(targetId);
    aclEntry.setGrantOrder(grantOrder);
   
    int grantee = grant.getGrantee();
    aclEntry.setGranteeType(grantee);
    aclEntry.setPermission(grant.getPermission());
    aclEntry.setGranteeCanonicalId(grant.getCanonicalUserID());
   
    Date ts = new Date();
    aclEntry.setCreateTime(ts);
    aclEntry.setLastModifiedTime(ts);
    aclEntry = this.persist(aclEntry);
    return aclEntry;
  }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

    private void deleteObjectAcls(String target, long itemId) {
        List<SAclVO> itemAclData = aclDao.listGrants(target, itemId);
        if (null != itemAclData) {
            ListIterator<SAclVO> it = itemAclData.listIterator();
            while (it.hasNext()) {
                SAclVO oneTag = it.next();
                aclDao.remove(oneTag.getId());
            }
        }
    }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

        List<SAclVO> bucketAclData = aclDao.listGrants("SBucket", bucketId);
        if (null != bucketAclData) {
            ListIterator<SAclVO> it = bucketAclData.listIterator();
            while (it.hasNext()) {
                SAclVO oneTag = it.next();
                aclDao.remove(oneTag.getId());
            }
        }
    }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

    private static boolean hasPermission(List<SAclVO> privileges, int requestedPermission) {
        ListIterator<SAclVO> it = privileges.listIterator();
        while (it.hasNext()) {
            // True providing the requested permission is contained in one or the granted rights for this user.  False otherwise.
            SAclVO rights = it.next();
            int permission = rights.getPermission();
            if (requestedPermission == (permission & requestedPermission))
                return true;
        }
        return false;
    }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

    }

    @Override
    public SAcl save(String target, long targetId, S3Grant grant, int grantOrder) {
        SAclVO aclEntry = new SAclVO();
        aclEntry.setTarget(target);
        aclEntry.setTargetId(targetId);
        aclEntry.setGrantOrder(grantOrder);

        int grantee = grant.getGrantee();
        aclEntry.setGranteeType(grantee);
        aclEntry.setPermission(grant.getPermission());
        aclEntry.setGranteeCanonicalId(grant.getCanonicalUserID());

        Date ts = new Date();
        aclEntry.setCreateTime(ts);
        aclEntry.setLastModifiedTime(ts);
        aclEntry = this.persist(aclEntry);
        return aclEntry;
    }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

      List<SAclVO> itemAclData = aclDao.listGrants( target, itemId );
      if (null != itemAclData)
      {
          ListIterator<SAclVO> it = itemAclData.listIterator();
        while( it.hasNext()) {
           SAclVO oneTag = (SAclVO)it.next();
           aclDao.remove(oneTag.getId());
        }
    }
  }
View Full Code Here

Examples of com.cloud.bridge.model.SAclVO

      List<SAclVO> bucketAclData = aclDao.listGrants( "SBucket", bucketId );
      if (null != bucketAclData)
      {
          ListIterator<SAclVO> it = bucketAclData.listIterator();
        while( it.hasNext()) {
           SAclVO oneTag = (SAclVO)it.next();
           aclDao.remove(oneTag.getId());
        }
    }
  }
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.