pt.digitalis.dif.controller.security.objects
Class DIFGroupImpl

java.lang.Object
  extended by pt.digitalis.dif.controller.security.objects.DIFGroupImpl
All Implemented Interfaces:
Cloneable, IDIFGroup

public class DIFGroupImpl
extends Object
implements IDIFGroup

Default implementation for DIF group.

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt
Created on:
2007/12/04

Constructor Summary
DIFGroupImpl()
          Default constructor.
DIFGroupImpl(IDIFGroup group)
          Creates a new group based on a given one
 
Method Summary
protected  Object clone()
           
 IDIFGroup cloneGroup()
          Returns a new clone of the current group
 boolean equals(Object obj)
           
 String getDescription()
          Returns the group description.
 String getID()
          Returns the group id.
 String getName()
          Returns the group name.
 IDIFGroup getParentGroup()
          Returns the parent group.
 String getParentGroupID()
          Returns the parent group ID.
 Set<String> getUserIDs()
          Retrieves the list of user IDs associated with this group
 Map<String,IDIFUser> getUsers()
          Retrieves the list of users associated with this group
 int hashCode()
           
 boolean isDefault()
          A default group is a group that is created by the default configuration of the application.
 void setDefault(boolean isDefault)
          Sets the group as a 'default group'.
 void setDescription(String newDescription)
          Sets a new description for the group.
 void setID(String newGroupId)
          Sets a new id for the group.
 void setName(String newName)
          Sets a new name for the group.
 void setParentGroupID(String newParent)
          Sets a new parent for the group.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DIFGroupImpl

public DIFGroupImpl()
Default constructor.


DIFGroupImpl

public DIFGroupImpl(IDIFGroup group)
Creates a new group based on a given one

Parameters:
group - the group to copy data from
Method Detail

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException
See Also:
Object.clone()

cloneGroup

public IDIFGroup cloneGroup()
Description copied from interface: IDIFGroup
Returns a new clone of the current group

Specified by:
cloneGroup in interface IDIFGroup
Returns:
the clone object
See Also:
IDIFGroup.cloneGroup()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

getDescription

public String getDescription()
Description copied from interface: IDIFGroup
Returns the group description.

Specified by:
getDescription in interface IDIFGroup
Returns:
the group description
See Also:
IDIFGroup.getDescription()

getID

public String getID()
Description copied from interface: IDIFGroup
Returns the group id.

Specified by:
getID in interface IDIFGroup
Returns:
the group id
See Also:
IDIFGroup.getID()

getName

public String getName()
Description copied from interface: IDIFGroup
Returns the group name.

Specified by:
getName in interface IDIFGroup
Returns:
the group name
See Also:
IDIFGroup.getName()

getParentGroup

public IDIFGroup getParentGroup()
                         throws IdentityManagerException
Description copied from interface: IDIFGroup
Returns the parent group.

Specified by:
getParentGroup in interface IDIFGroup
Returns:
the parent group
Throws:
IdentityManagerException - if the parent group can't be found on the identity manager
See Also:
IDIFGroup.getParentGroup()

getParentGroupID

public String getParentGroupID()
Description copied from interface: IDIFGroup
Returns the parent group ID.

Specified by:
getParentGroupID in interface IDIFGroup
Returns:
the parent group id
See Also:
IDIFGroup.getParentGroupID()

getUserIDs

public Set<String> getUserIDs()
                       throws IdentityManagerException
Description copied from interface: IDIFGroup
Retrieves the list of user IDs associated with this group

Specified by:
getUserIDs in interface IDIFGroup
Returns:
the groups
Throws:
IdentityManagerException - if the users can't be found on the identity manager
See Also:
IDIFGroup.getUserIDs()

getUsers

public Map<String,IDIFUser> getUsers()
                              throws IdentityManagerException
Description copied from interface: IDIFGroup
Retrieves the list of users associated with this group

Specified by:
getUsers in interface IDIFGroup
Returns:
the groups
Throws:
IdentityManagerException - if the users can't be found on the identity manager
See Also:
IDIFGroup.getUsers()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

isDefault

public boolean isDefault()
Description copied from interface: IDIFGroup
A default group is a group that is created by the default configuration of the application. As such it cannot be deleted. Only disabled.

Specified by:
isDefault in interface IDIFGroup
Returns:
T if the user is a default group
See Also:
IDIFGroup.isDefault()

setDefault

public void setDefault(boolean isDefault)
Description copied from interface: IDIFGroup
Sets the group as a 'default group'.

Specified by:
setDefault in interface IDIFGroup
Parameters:
isDefault - T if the group must be set as a default group, F otherwise
See Also:
IDIFGroup.setDefault(boolean)

setDescription

public void setDescription(String newDescription)
Description copied from interface: IDIFGroup
Sets a new description for the group.

Specified by:
setDescription in interface IDIFGroup
Parameters:
newDescription - the new group description
See Also:
IDIFGroup.setDescription(String)

setID

public void setID(String newGroupId)
Description copied from interface: IDIFGroup
Sets a new id for the group.

Specified by:
setID in interface IDIFGroup
Parameters:
newGroupId - the new group id
See Also:
IDIFGroup.setID(String)

setName

public void setName(String newName)
Description copied from interface: IDIFGroup
Sets a new name for the group.

Specified by:
setName in interface IDIFGroup
Parameters:
newName - the new group name
See Also:
IDIFGroup.setName(String)

setParentGroupID

public void setParentGroupID(String newParent)
Description copied from interface: IDIFGroup
Sets a new parent for the group.

Specified by:
setParentGroupID in interface IDIFGroup
Parameters:
newParent - the new parent group
See Also:
IDIFGroup.setParentGroupID(String)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.