Package com.dotmarketing.business

Examples of com.dotmarketing.business.PermissionAPI.clearCache()


  public void execute(JobExecutionContext jobContext) throws JobExecutionException {
   
    JobDataMap map = jobContext.getJobDetail().getJobDataMap();

    PermissionAPI permissionAPI = APILocator.getPermissionAPI();
    permissionAPI.clearCache();
    String permissionableId = (String) map.get("permissionableId");
    String roleId = (String) map.get("roleId");
    try {
      RoleAPI roleAPI = APILocator.getRoleAPI();
      Permissionable permissionable = (Permissionable) retrievePermissionable(permissionableId);
View Full Code Here


      Permissionable permissionable = (Permissionable) retrievePermissionable(permissionableId);
      Role role = (Role) roleAPI.loadRoleById(roleId);
      permissionAPI.cascadePermissionUnder(permissionable, role);
    } catch (DotDataException e) {
      Logger.error(this, e.getMessage(), e);
      permissionAPI.clearCache();
      throw new DotRuntimeException(e.getMessage(), e);
    } catch (DotSecurityException e) {
      Logger.error(CascadePermissionsJob.class, e.getMessage(), e);
      permissionAPI.clearCache();
      throw new DotRuntimeException(e.getMessage(), e);
View Full Code Here

      Logger.error(this, e.getMessage(), e);
      permissionAPI.clearCache();
      throw new DotRuntimeException(e.getMessage(), e);
    } catch (DotSecurityException e) {
      Logger.error(CascadePermissionsJob.class, e.getMessage(), e);
      permissionAPI.clearCache();
      throw new DotRuntimeException(e.getMessage(), e);
    }
    finally {
        try {
                HibernateUtil.closeSession();
View Full Code Here

            }
            finally {
                DbConnectionFactory.closeConnection();
            }
    }
    permissionAPI.clearCache();
  }
 
  @SuppressWarnings("unchecked")
  private Permissionable retrievePermissionable (String assetId) throws DotDataException, DotSecurityException {
   
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.