Exemplo n.º 1
0
 @Override
 public void updateAffinityGroup(AffinityGroup affinityGroup) throws RuntimeException {
   try {
     affinityGroupManager.update(getSessionSubject(), affinityGroup);
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Exemplo n.º 2
0
 @Override
 public void removeAgentsFromGroup(Integer[] agentIds) throws RuntimeException {
   try {
     affinityGroupManager.removeAgentsFromGroup(getSessionSubject(), agentIds);
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Exemplo n.º 3
0
 @Override
 public void addAgentsToGroup(int affinityGroupId, Integer[] agentIds) throws RuntimeException {
   try {
     affinityGroupManager.addAgentsToGroup(getSessionSubject(), affinityGroupId, agentIds);
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Exemplo n.º 4
0
 @Override
 public int deleteAffinityGroups(int[] affinityGroupIds) throws RuntimeException {
   try {
     return affinityGroupManager.delete(
         getSessionSubject(), ArrayUtils.toObject(affinityGroupIds));
   } catch (Throwable t) {
     throw getExceptionToThrowToClient(t);
   }
 }
Exemplo n.º 5
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);
   }
 }
Exemplo n.º 6
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);
   }
 }
  public String unsubscribeServers() {
    Subject subject = EnterpriseFacesContextUtility.getSubject();
    String[] selectedServerIdStrings =
        FacesContextUtility.getRequest().getParameterValues("selectedServersToUnsubscribe");

    // Parse the server IDs to ints
    Integer[] selectedServerIds = new Integer[selectedServerIdStrings.length];
    for (int ii = 0; ii < selectedServerIdStrings.length; ii++) {
      selectedServerIds[ii] = Integer.parseInt(selectedServerIdStrings[ii]);
    }

    // Update the group
    affinityGroupManager.removeServersFromGroup(subject, selectedServerIds);

    return "successOrFailure";
  }