Package com.cloud.bridge.model

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


        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

    {
        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

     
  }
 
  @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

    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

        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

    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

    }

    @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

      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

      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

Related Classes of com.cloud.bridge.model.SAclVO

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.