com.zeroturnaround.liverebel.api.impl
Class ServerGroupOperationsImpl

java.lang.Object
  extended by com.zeroturnaround.liverebel.api.impl.ServerGroupOperationsImpl
All Implemented Interfaces:
ServerGroupOperations

public class ServerGroupOperationsImpl
extends Object
implements ServerGroupOperations

Implements operations that can be performed with server groups


Constructor Summary
ServerGroupOperationsImpl(RestConnection con, JsonParser parser)
           
 
Method Summary
 void createGroup(String name, String description, Collection<String> serverIds)
          Create server group and move given servers to that group
 void deleteGroup(String name)
           
 List<ServerInfo> expandGroup(String groupName)
           
 List<ServerGroup> getAllGroups()
           
 ServerGroup getGroup(String groupName)
           
 List<Long> getGroupAncestorsIds(Long groupId)
           
 List<ServerGroup> getGroups(String name)
           
 void moveGroupOutOfParentGroup(String childGroupName)
          Move given server group out of parent server groups it may have
 void moveGroupToGroup(String groupName, String childGroupName)
          Move existing serverGroup childGroupName under existing serverGroup groupName
 void moveServersOutOfParentGroups(Collection<String> serverIds)
          Move given servers out of potential parent groups they may have
 void moveServersOutOfParentGroups(String... serverIds)
           
 void moveServersOutOfParentGroups(String groupName, Collection<String> serverIds)
           
 void moveServersToGroup(String groupName, Collection<String> serverIds)
           
 void moveServersToGroup(String groupName, String... serverIds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerGroupOperationsImpl

public ServerGroupOperationsImpl(RestConnection con,
                                 JsonParser parser)
Method Detail

createGroup

public void createGroup(String name,
                        String description,
                        Collection<String> serverIds)
Description copied from interface: ServerGroupOperations
Create server group and move given servers to that group

Specified by:
createGroup in interface ServerGroupOperations

moveServersToGroup

public void moveServersToGroup(String groupName,
                               String... serverIds)
Specified by:
moveServersToGroup in interface ServerGroupOperations

moveServersToGroup

public void moveServersToGroup(String groupName,
                               Collection<String> serverIds)
Specified by:
moveServersToGroup in interface ServerGroupOperations

moveServersOutOfParentGroups

public void moveServersOutOfParentGroups(String... serverIds)
Specified by:
moveServersOutOfParentGroups in interface ServerGroupOperations
See Also:
ServerGroupOperations.moveServersOutOfParentGroups(Collection)

moveServersOutOfParentGroups

public void moveServersOutOfParentGroups(Collection<String> serverIds)
Description copied from interface: ServerGroupOperations
Move given servers out of potential parent groups they may have

Specified by:
moveServersOutOfParentGroups in interface ServerGroupOperations

moveServersOutOfParentGroups

public void moveServersOutOfParentGroups(String groupName,
                                         Collection<String> serverIds)
Specified by:
moveServersOutOfParentGroups in interface ServerGroupOperations
Parameters:
groupName - - name of a server group (doesn't really matter which, until it exists - that is why it is deprecated)

getAllGroups

public List<ServerGroup> getAllGroups()
Specified by:
getAllGroups in interface ServerGroupOperations
Returns:
all server groups + ungrouped servers "virtual server group"

getGroups

public List<ServerGroup> getGroups(String name)
Specified by:
getGroups in interface ServerGroupOperations
Returns:
descendant groups under given group (includes group itself)

getGroup

public ServerGroup getGroup(String groupName)
Specified by:
getGroup in interface ServerGroupOperations
Parameters:
groupName - - name of the server group
Returns:
information about server group

getGroupAncestorsIds

public List<Long> getGroupAncestorsIds(Long groupId)
Specified by:
getGroupAncestorsIds in interface ServerGroupOperations
Returns:
list containing ancestors of given server group (closest ancestors first, topmost is last)

expandGroup

public List<ServerInfo> expandGroup(String groupName)
Specified by:
expandGroup in interface ServerGroupOperations

deleteGroup

public void deleteGroup(String name)
Specified by:
deleteGroup in interface ServerGroupOperations

moveGroupToGroup

public void moveGroupToGroup(String groupName,
                             String childGroupName)
Description copied from interface: ServerGroupOperations
Move existing serverGroup childGroupName under existing serverGroup groupName

Specified by:
moveGroupToGroup in interface ServerGroupOperations
Parameters:
groupName - - name of the parent group
childGroupName - - name of the child group

moveGroupOutOfParentGroup

public void moveGroupOutOfParentGroup(String childGroupName)
Description copied from interface: ServerGroupOperations
Move given server group out of parent server groups it may have

Specified by:
moveGroupOutOfParentGroup in interface ServerGroupOperations


Copyright © 2013. All Rights Reserved.