Package com.zycus.pm.api.bo

Examples of com.zycus.pm.api.bo.BaseRight


    return baseRight;
  }

  public BaseRight updateBaseRightNamePriorityDefaultAllowed(long baseRightID, String baseRightName, int priority,
      boolean defaultIsAllowed) throws DuplicateNameException {
    BaseRight baseRight = dbHandler.getBaseRight(baseRightID);
    if (baseRight.getRightDescription().equals(baseRightName)) {
      return baseRight;
    }
    if (baseRight.getGroup().getBaseRight(baseRightName) != null) {
      throw new DuplicateNameException("Right name can't be duplicate", DuplicateNameType.DuplicateRightName);
    }
    baseRight.setRightDescription(baseRightName);
    baseRight.setPriority(priority);
    baseRight.setDefaultIsAllowed(defaultIsAllowed);
    dbHandler.upsertBaseRight(baseRight);
    return baseRight;
  }
View Full Code Here


    dbHandler.upsertBaseRight(baseRight);
    return baseRight;
  }

  public BaseRight updateBaseRightPriority(long baseRightID, int priority) {
    BaseRight baseRight = dbHandler.getBaseRight(baseRightID);
    baseRight.setPriority(priority);
    return baseRight;
  }
View Full Code Here

    return baseRight;
  }

  public BaseRight updateBaseRightPriorityDefaultAllowed(long baseRightID, int priority, boolean defaultIsAllowed)
      throws DuplicateNameException {
    BaseRight baseRight = dbHandler.getBaseRight(baseRightID);
    baseRight.setPriority(priority);
    baseRight.setDefaultIsAllowed(defaultIsAllowed);
    return baseRight;
  }
View Full Code Here

    IPermissionEntity entity = getDummyEntity();
    IPermisibleResource resource = getDummyResource();

    try {
      // Getting required rights from the API at the beginning
      BaseRight editRight = permissionRights.getBaseRight("Add-Edit-Delete", "Edit");
      BaseRight addRight = permissionRights.getBaseRight("Add-Edit-Delete", "Add");
     
     
      // explicitly deny add right for the specific entity to the specific resource
      permissionManager.upsertRight(addRight, entity, resource, false);
View Full Code Here

    IPermissionEntity entity = getDummyEntity();
    IPermisibleResource resource = getDummyResource();
   
    try {
      //Getting required rights from the API at the beginning
      BaseRight addRight = permissionRights.getBaseRight("Add-Edit-Delete", "Add");
      BaseRight editRight = permissionRights.getBaseRight("Add-Edit-Delete", "Edit");
     
      //checking whether the specified entity have add right on the specified resource or not
      if(permissionManager.getRight(entity, resource).isRightPermitted(addRight)) {
        System.out.println("Add right permitted");
      }else {
View Full Code Here

    IPermisibleResource resource = getDummyResource();
    IPermisibleResource childResource = getDummyChildResource();
   
    try {
      //Getting required rights from the API at the beginning
      BaseRight editRight = permissionRights.getBaseRight("Add-Edit-Delete", "Edit");
     
           
      //checking whether the specified entity have edit right on the specified resource or not
      if(permissionManager.getRight(entity, resource).isRightPermitted(editRight)) {
        System.out.println("Edit right permitted");
View Full Code Here

TOP

Related Classes of com.zycus.pm.api.bo.BaseRight

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.