edu.vt.middleware.ed
Class Group

java.lang.Object
  extended by edu.vt.middleware.ed.AbstractNamedDataObject
      extended by edu.vt.middleware.ed.Group
All Implemented Interfaces:
DataObject, DirectoryObject, MutableDataObject, NamedDataObject, Persistable, Serializable, Comparable<NamedDataObject>

public class Group
extends AbstractNamedDataObject
implements DirectoryObject, Serializable

Contains attributes that identify a group.

Version:
$Revision:6103 $
Author:
Daniel Fisher
See Also:
Serialized Form

Nested Class Summary
static class Group.GroupRelationComparator
          Inner class to compare GroupRelation's by uugid.
 
Field Summary
private  String displayName
          display name
private  String emailAddress
          email address
private  Calendar expirationNotificationDate
          expiration notification date
static String FIND_BY_EXPIRATION_DATE
          Constant for named query
static String FIND_BY_PERSON_UID
          Constant for named query
static String FIND_BY_PERSON_UID_AND_ROLE
          Constant for named query
static String FIND_BY_UUGID
          Constant for named query
static String FIND_BY_UUGID_CI
          Constant for named query
static String FIND_BY_UUID
          Constant for named query
private  List<String> groupData
          group data
private  Set<GroupGroupRelation> groupRelations
          Groups associated with this group
private  Set<GroupGroupRelation> groupRelationships
          Groups that have relationships with this group
private  Set<LabeledUri> labeledUris
          labeled uris
private  Set<GroupPersonRelation> personRelations
          People associated with this group
private static long serialVersionUID
          serial version UID
private  Set<GroupServiceRelation> serviceRelations
          Services associated with this group
protected  boolean sortProperties
          whether to sort collection based properties
private  Boolean suppressDisplay
          whether this group's demographic data is publicly viewable
private  Boolean suppressMembers
          whether the members of this group are publicly viewable
private  String uugid
          uugid
 
Fields inherited from class edu.vt.middleware.ed.AbstractNamedDataObject
createdBy, creationDate, expirationDate, HASH_CODE_SEED, modificationDate, modifiedBy, uid
 
Constructor Summary
Group()
           
 
Method Summary
 String getDisplayName()
          This returns the display name.
 String getDn()
          This returns the dn.
 String getEmailAddress()
          This returns the email address.
 Calendar getExpirationNotificationDate()
          This returns the expiration notification date.
 List<String> getGroupData()
          Gets an immutable list of group data entries.
 ManagedRelationSet<Group,Group,GroupGroupRelation> getGroupRelations()
          Gets an immutable set of relations describing the groups associated with this group.
 ManagedRelationSet<Group,Group,GroupGroupRelation> getGroupRelationships()
          Gets an immutable set of groups with any relationship to this group.
private  Set<GroupGroupRelation> getGroupRelationshipsInternal()
          Gets a set of groups with relationships to this group.
private  Set<GroupGroupRelation> getGroupRelationsInternal()
          Gets a set of relations describing the groups associated with this group.
 ManagedSet<LabeledUri> getLabeledUris()
          Gets an immutable set of labeled URIs belonging to this person.
private  Set<LabeledUri> getLabeledUrisInternal()
          Gets a set of labeled URIs belonging to this person.
 String getObjectClass()
          This returns the object class.
 ManagedRelationSet<Group,Person,GroupPersonRelation> getPersonRelations()
          Gets an immutable set of relations describing the people associated with this group.
private  Set<GroupPersonRelation> getPersonRelationsInternal()
          Gets a set of relations describing the people associated with this group.
 ManagedRelationSet<Group,Service,GroupServiceRelation> getServiceRelations()
          Gets an immutable set of relations describing the services associated with this group.
private  Set<GroupServiceRelation> getServiceRelationsInternal()
          Gets a set of relations describing the services associated with this group.
 boolean getSortProperties()
          This returns whether properties are sorted.
 Boolean getSuppressDisplay()
          This returns whether this group's demographic data is publically viewable.
 Boolean getSuppressMembers()
          Gets a boolean indicating whether or not the members of this group are publicly visible.
 Long getUid()
          This returns the uid.
 String getUugid()
          This returns the uugid.
 String getUuid()
          Gets the unique string ID for this object.
static void loadBriefLazyProperties(Group g)
          Loads some lazy loaded group data.
static void loadLazyProperties(Group g)
          Loads all lazy loaded group data.
private static void loadLazyProperties(Group g, Set<Group> loaded)
          Loads all lazy loaded group data.
 void setDisplayName(String s)
          This sets the display name.
 void setEmailAddress(String s)
          This sets the email address.
 void setExpirationNotificationDate(Calendar c)
          This sets the expiration notification date.
private  void setGroupRelationshipsInternal(Set<GroupGroupRelation> s)
          Sets a set of groups with relationships to this group.
private  void setGroupRelationsInternal(Set<GroupGroupRelation> s)
          Sets a set of relations describing the groups associated with this group.
private  void setLabeledUrisInternal(Set<LabeledUri> s)
          This sets the labeled uris.
private  void setPersonRelationsInternal(Set<GroupPersonRelation> s)
          Gets a set of relations describing the people associated with this group.
private  void setServiceRelationsInternal(Set<GroupServiceRelation> s)
          Sets a set of relations describing the services associated with this group.
 void setSortProperties(boolean b)
          This sets whether properties are sorted.
 void setSuppressDisplay(Boolean b)
          This sets whether this group's demograpic data is publically viewable.
 void setSuppressMembers(Boolean b)
          Gets a boolean indicating whether or not the members of this group are publicly visible.
 void setUugid(String s)
          This sets the uugid.
 
Methods inherited from class edu.vt.middleware.ed.AbstractNamedDataObject
compareTo, getCreatedBy, getCreationDate, getExpirationDate, getModificationDate, getModifiedBy, setCreatedBy, setCreationDate, setExpirationDate, setModificationDate, setModifiedBy, setUid, toString, validateProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.vt.middleware.ed.DataObject
getCreatedBy, getCreationDate, setCreatedBy, setCreationDate, setUid
 

Field Detail

FIND_BY_UUID

public static final String FIND_BY_UUID
Constant for named query

See Also:
Constant Field Values

FIND_BY_UUGID

public static final String FIND_BY_UUGID
Constant for named query

See Also:
Constant Field Values

FIND_BY_UUGID_CI

public static final String FIND_BY_UUGID_CI
Constant for named query

See Also:
Constant Field Values

FIND_BY_PERSON_UID

public static final String FIND_BY_PERSON_UID
Constant for named query

See Also:
Constant Field Values

FIND_BY_PERSON_UID_AND_ROLE

public static final String FIND_BY_PERSON_UID_AND_ROLE
Constant for named query

See Also:
Constant Field Values

FIND_BY_EXPIRATION_DATE

public static final String FIND_BY_EXPIRATION_DATE
Constant for named query

See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
serial version UID

See Also:
Constant Field Values

sortProperties

protected boolean sortProperties
whether to sort collection based properties


uugid

private String uugid
uugid


displayName

private String displayName
display name


emailAddress

private String emailAddress
email address


suppressDisplay

private Boolean suppressDisplay
whether this group's demographic data is publicly viewable


suppressMembers

private Boolean suppressMembers
whether the members of this group are publicly viewable


personRelations

private Set<GroupPersonRelation> personRelations
People associated with this group


groupRelations

private Set<GroupGroupRelation> groupRelations
Groups associated with this group


serviceRelations

private Set<GroupServiceRelation> serviceRelations
Services associated with this group


groupRelationships

private Set<GroupGroupRelation> groupRelationships
Groups that have relationships with this group


labeledUris

private Set<LabeledUri> labeledUris
labeled uris


groupData

private final List<String> groupData
group data


expirationNotificationDate

private Calendar expirationNotificationDate
expiration notification date

Constructor Detail

Group

public Group()
Method Detail

getUid

public Long getUid()
This returns the uid.

Specified by:
getUid in interface DataObject
Overrides:
getUid in class AbstractNamedDataObject
Returns:
Long - uid

getDn

public String getDn()
This returns the dn.

Specified by:
getDn in interface DirectoryObject
Returns:
String

getObjectClass

public String getObjectClass()
This returns the object class.

Specified by:
getObjectClass in interface DirectoryObject
Returns:
String

getUugid

public String getUugid()
This returns the uugid.

Returns:
String

setUugid

public void setUugid(String s)
This sets the uugid.

Parameters:
s - String

getUuid

public String getUuid()
Gets the unique string ID for this object.

Examples of unique IDs:

Specified by:
getUuid in interface NamedDataObject
Returns:
Unique ID string.

getDisplayName

public String getDisplayName()
This returns the display name.

Returns:
String

setDisplayName

public void setDisplayName(String s)
This sets the display name.

Parameters:
s - String

getEmailAddress

public String getEmailAddress()
This returns the email address.

Returns:
String

setEmailAddress

public void setEmailAddress(String s)
This sets the email address.

Parameters:
s - String

getSuppressDisplay

public Boolean getSuppressDisplay()
This returns whether this group's demographic data is publically viewable.

Returns:
Boolean

setSuppressDisplay

public void setSuppressDisplay(Boolean b)
This sets whether this group's demograpic data is publically viewable.

Parameters:
b - Boolean

getSuppressMembers

public Boolean getSuppressMembers()
Gets a boolean indicating whether or not the members of this group are publicly visible.

Returns:
True if group membership is suppressed, false otherwise.

setSuppressMembers

public void setSuppressMembers(Boolean b)
Gets a boolean indicating whether or not the members of this group are publicly visible.

Parameters:
b - True if group membership should be suppressed, false otherwise.

getPersonRelationsInternal

private Set<GroupPersonRelation> getPersonRelationsInternal()
Gets a set of relations describing the people associated with this group.

Returns:
People related to this group (members, admins, etc).

setPersonRelationsInternal

private void setPersonRelationsInternal(Set<GroupPersonRelation> s)
Gets a set of relations describing the people associated with this group.

Parameters:
s - Set of people related to this group.

getPersonRelations

public ManagedRelationSet<Group,Person,GroupPersonRelation> getPersonRelations()
Gets an immutable set of relations describing the people associated with this group.

Returns:
Immutable set of people related to this group.

getGroupRelationsInternal

private Set<GroupGroupRelation> getGroupRelationsInternal()
Gets a set of relations describing the groups associated with this group.

Returns:
Set of groups related to this group (e.g. members).

setGroupRelationsInternal

private void setGroupRelationsInternal(Set<GroupGroupRelation> s)
Sets a set of relations describing the groups associated with this group.

Parameters:
s - Set of groups related to this group.

getGroupRelations

public ManagedRelationSet<Group,Group,GroupGroupRelation> getGroupRelations()
Gets an immutable set of relations describing the groups associated with this group.

Returns:
Immutable set of groups related to this group (e.g. members).

getServiceRelationsInternal

private Set<GroupServiceRelation> getServiceRelationsInternal()
Gets a set of relations describing the services associated with this group.

Returns:
Set of services related to this group (viewers, admins, etc).

setServiceRelationsInternal

private void setServiceRelationsInternal(Set<GroupServiceRelation> s)
Sets a set of relations describing the services associated with this group.

Parameters:
s - Set of services related to this group.

getServiceRelations

public ManagedRelationSet<Group,Service,GroupServiceRelation> getServiceRelations()
Gets an immutable set of relations describing the services associated with this group.

Returns:
Immutable set of services related to this group.

getGroupRelationshipsInternal

private Set<GroupGroupRelation> getGroupRelationshipsInternal()
Gets a set of groups with relationships to this group. These groups can be thought of as owning or parent groups.

Returns:
Set of group relations.

setGroupRelationshipsInternal

private void setGroupRelationshipsInternal(Set<GroupGroupRelation> s)
Sets a set of groups with relationships to this group. These groups can be thought of as owning or parent groups.

Parameters:
s - Set of group relations.

getGroupRelationships

public ManagedRelationSet<Group,Group,GroupGroupRelation> getGroupRelationships()
Gets an immutable set of groups with any relationship to this group. These groups can be thought of as owning or parent groups.

Returns:
Immutable set of group relations.

getLabeledUrisInternal

private Set<LabeledUri> getLabeledUrisInternal()
Gets a set of labeled URIs belonging to this person.

Returns:
Set of labeled URIs.

setLabeledUrisInternal

private void setLabeledUrisInternal(Set<LabeledUri> s)
This sets the labeled uris.

Parameters:
s - List

getLabeledUris

public ManagedSet<LabeledUri> getLabeledUris()
Gets an immutable set of labeled URIs belonging to this person.

Returns:
Immutable Set of labeled URIs.

getGroupData

public List<String> getGroupData()
Gets an immutable list of group data entries.

Returns:
Immutable List of group data

getExpirationNotificationDate

public Calendar getExpirationNotificationDate()
This returns the expiration notification date.

Returns:
Calendar

setExpirationNotificationDate

public void setExpirationNotificationDate(Calendar c)
This sets the expiration notification date.

Parameters:
c - Calendar

loadBriefLazyProperties

public static void loadBriefLazyProperties(Group g)
Loads some lazy loaded group data.

Parameters:
g - Group to initialize

loadLazyProperties

public static void loadLazyProperties(Group g)
Loads all lazy loaded group data.

Parameters:
g - Group to initialize

loadLazyProperties

private static void loadLazyProperties(Group g,
                                       Set<Group> loaded)
Loads all lazy loaded group data. This method provided to allow recursive loading.

Parameters:
g - Group to initialize
loaded - Set recursion set of processed groups

getSortProperties

public boolean getSortProperties()
This returns whether properties are sorted.

Returns:
boolean

setSortProperties

public void setSortProperties(boolean b)
This sets whether properties are sorted.

Parameters:
b - boolean


Copyright © 2008 Virginia Tech. All Rights Reserved.