Пример #1
0
 @Override
 public AffinityGroup getAffinityGroupById(int affinityGroupId) throws RuntimeException {
   try {
     return SerialUtility.prepare(
         affinityGroupManager.getById(getSessionSubject(), affinityGroupId),
         "TopologyGWTServiceImpl.getAffinityGroupById");
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Пример #2
0
 @Override
 public PageList<Agent> findAgentsByCriteria(AgentCriteria criteria) throws RuntimeException {
   try {
     return SerialUtility.prepare(
         agentManager.findAgentsByCriteria(getSessionSubject(), criteria),
         "TopologyGWTServiceImpl.findAgentsByCriteria");
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Пример #3
0
 @Override
 public List<FailoverListDetails> getFailoverListDetailsByAgentId(int agentId, PageControl pc)
     throws RuntimeException {
   try {
     return SerialUtility.prepare(
         topologyManager.getFailoverListDetailsByAgentId(getSessionSubject(), agentId, pc),
         "TopologyGWTServiceImpl.getFailoverListDetailsByAgentId");
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Пример #4
0
 @Override
 public PageList<ServerWithAgentCountComposite> getServers(PageControl pc)
     throws RuntimeException {
   try {
     return SerialUtility.prepare(
         topologyManager.getServerComposites(getSessionSubject(), pc),
         "TopologyGWTServiceImpl.getServers");
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Пример #5
0
 @Override
 public PageList<AffinityGroupCountComposite> getAffinityGroupCountComposites(
     PageControl pageControl) throws RuntimeException {
   try {
     return SerialUtility.prepare(
         affinityGroupManager.getComposites(getSessionSubject(), pageControl),
         "TopologyGWTServiceImpl.getAffinityGroupCountComposites");
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
 @Override
 public AlertDefinition updateGroupAlertDefinitions(
     AlertDefinition groupAlertDefinition, boolean purgeInternals) throws RuntimeException {
   try {
     AlertDefinition results =
         groupAlertDefManager.updateGroupAlertDefinitions(
             getSessionSubject(), groupAlertDefinition, purgeInternals);
     return SerialUtility.prepare(results, "updateGroupAlertDefinitions");
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Пример #7
0
 @Override
 public PageList<PartitionEventDetails> getPartitionEventDetails(
     int partitionEventId, PageControl pageControl) throws RuntimeException {
   try {
     return SerialUtility.prepare(
         partitionEventManager.getPartitionEventDetails(
             getSessionSubject(), partitionEventId, pageControl),
         "TopologyGWTServiceImpl.getPartitionEventDetails");
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Пример #8
0
  @Override
  public Set<Map<String, String>> findAvailableGroupsStatus() throws RuntimeException {
    try {
      // add permissions check
      Set<Permission> globalPermissions =
          authorizationManager.getExplicitGlobalPermissions(getSessionSubject());
      Boolean accessGranted = globalPermissions.contains(Permission.MANAGE_SECURITY);

      Set<Map<String, String>> results = null;
      if (accessGranted) {
        results = ldapManager.findAvailableGroupsStatus();
      } else {
        String message =
            "User '"
                + getSessionSubject().getName()
                + "' does not have sufficient permissions to query the status of available LDAP groups request.";
        log.debug(message);
        throw new PermissionException(message);
      }
      return SerialUtility.prepare(results, "findAvailableGroups");
    } catch (Throwable t) {
      throw getExceptionToThrowToClient(t);
    }
  }
Пример #9
0
  public PageList<LdapGroup> findLdapGroupsAssignedToRole(int roleId) throws RuntimeException {
    try {
      // add permissions check
      Set<Permission> globalPermissions =
          authorizationManager.getExplicitGlobalPermissions(getSessionSubject());
      Boolean accessGranted = globalPermissions.contains(Permission.MANAGE_SECURITY);

      PageList<LdapGroup> allAssignedLdapGroups = null;
      if (accessGranted) {
        allAssignedLdapGroups =
            ldapManager.findLdapGroupsByRole(roleId, PageControl.getUnlimitedInstance());
      } else {
        String message =
            "User '"
                + getSessionSubject().getName()
                + "' does not have permissions to query LDAP group by role.";
        log.debug(message);
        throw new PermissionException(message);
      }
      return SerialUtility.prepare(allAssignedLdapGroups, "findLdapGroupsAssignedToRole");
    } catch (Throwable t) {
      throw getExceptionToThrowToClient(t);
    }
  }