|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.internet2.middleware.grouper.GrouperAPI edu.internet2.middleware.grouper.RegistrySubject
public class RegistrySubject
A Subject
local to the Groups Registry.
NOTE: THIS CLASS IS NOT CONSIDERED STABLE AND MAY CHANGE IN FUTURE RELEASES.
Field Summary |
---|
Fields inherited from class edu.internet2.middleware.grouper.GrouperAPI |
---|
COLUMN_HIBERNATE_VERSION_NUMBER, FIELD_DB_VERSION, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER |
Fields inherited from interface org.hibernate.classic.Lifecycle |
---|
NO_VETO, VETO |
Constructor Summary | |
---|---|
RegistrySubject()
|
Method Summary | |
---|---|
static RegistrySubject |
add(GrouperSession s,
String id,
String type,
String name)
Add a Subject to a Source within the Groups Registry. |
RegistrySubject |
clone()
deep clone the fields in this object |
void |
delete(GrouperSession s)
Delete existing RegistrySubject . |
boolean |
equals(Object obj)
|
Map<String,Set<String>> |
getAttributes()
|
Map<String,Set<String>> |
getAttributes(boolean excludeInternalAttributes)
|
String |
getAttributeValue(String name)
Return the value of the specified attribute. |
String |
getAttributeValue(String attributeName,
boolean excludeInternalAttributes)
|
String |
getAttributeValueOrCommaSeparated(String attributeName)
|
String |
getAttributeValueOrCommaSeparated(String attributeName,
boolean excludeInternalAttributes)
|
Set<String> |
getAttributeValues(String name)
Return the values for the specified attribute. |
Set<String> |
getAttributeValues(String attributeName,
boolean excludeInternalAttributes)
|
String |
getAttributeValueSingleValued(String attributeName)
|
String |
getAttributeValueSingleValued(String attributeName,
boolean excludeInternalAttributes)
|
String |
getDescription()
Return this subject's description. |
String |
getId()
Return the subject id. |
String |
getName()
Return the subject's name. |
edu.internet2.middleware.subject.Source |
getSource()
Return the source. |
String |
getSourceId()
|
edu.internet2.middleware.subject.SubjectType |
getType()
Return this subject's SubjectType . |
String |
getTypeName()
|
String |
getTypeString()
|
int |
hashCode()
|
void |
setId(String id)
|
void |
setName(String name)
|
void |
setTypeString(String type)
|
String |
toString()
|
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI |
---|
dbVersion, dbVersionClear, dbVersionDifferentFields, dbVersionIsDifferent, dbVersionReset, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onPreDelete, onPreSave, onPreUpdate, onSave, onUpdate, setHibernateVersionNumber |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RegistrySubject()
Method Detail |
---|
public RegistrySubject clone()
GrouperAPI
clone
in interface GrouperCloneable
clone
in class GrouperAPI
GrouperAPI.clone()
public static RegistrySubject add(GrouperSession s, String id, String type, String name) throws GrouperException, InsufficientPrivilegeException
Subject
to a Source
within the Groups Registry.
Subjects may only be added within a root-like session.
try { RegistrySubject subj = RegistrySubject.add(s, "subject id", "person", "name"); } catch (GrouperException eG) { // unable to add subject } catch (InsufficientPrivilegeException eIP) { // not privileged to add subject }
s
- Create subject within this session context.id
- The subject id to assign to the subject.type
- The subject type to assign to the subject.name
- The name to assign to the subject.
RegistrySubject
.
GrouperException
InsufficientPrivilegeException
public void delete(GrouperSession s) throws GrouperException, IllegalStateException, InsufficientPrivilegeException
RegistrySubject
.
try { rSubj.delete(s); } catch (GrouperException eG) { // failed to delete this RegistrySubject } catch (InsufficientPrivilegeException eIP) { // not privileged to delete this RegistrySubject }
s
- Delete RegistrySubject within this GrouperSession context.
GrouperException
- if RegistrySubject cannot be deleted.
IllegalStateException
- if GrouperSession is null.
InsufficientPrivilegeException
- if not privileged to delete RegistrySubjects.public String getAttributeValue(String name)
getAttributeValue
in interface edu.internet2.middleware.subject.Subject
name
-
public Set<String> getAttributeValues(String name)
getAttributeValues
in interface edu.internet2.middleware.subject.Subject
name
-
public String getDescription()
getDescription
in interface edu.internet2.middleware.subject.Subject
public String getId()
getId
in interface edu.internet2.middleware.subject.Subject
public String getName()
getName
in interface edu.internet2.middleware.subject.Subject
public edu.internet2.middleware.subject.Source getSource() throws IllegalStateException
NOTE: The current implementation is very crude and inefficient. It attempts to query for the subject to identify the source.
getSource
in interface edu.internet2.middleware.subject.Subject
IllegalStateException
- if source cannot be returned.public edu.internet2.middleware.subject.SubjectType getType()
SubjectType
.
getType
in interface edu.internet2.middleware.subject.Subject
public String getTypeString()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public void setId(String id)
id
- public void setName(String name)
name
- public void setTypeString(String type)
type
- public String toString()
toString
in class Object
Object.toString()
public String getAttributeValueOrCommaSeparated(String attributeName)
getAttributeValueOrCommaSeparated
in interface edu.internet2.middleware.subject.Subject
Subject.getAttributeValueOrCommaSeparated(java.lang.String)
public String getAttributeValueSingleValued(String attributeName)
getAttributeValueSingleValued
in interface edu.internet2.middleware.subject.Subject
Subject.getAttributeValueSingleValued(java.lang.String)
public String getSourceId()
getSourceId
in interface edu.internet2.middleware.subject.Subject
Subject.getSourceId()
public String getTypeName()
getTypeName
in interface edu.internet2.middleware.subject.Subject
Subject.getTypeName()
public Map<String,Set<String>> getAttributes()
getAttributes
in interface edu.internet2.middleware.subject.Subject
Subject.getAttributes()
public String getAttributeValue(String attributeName, boolean excludeInternalAttributes)
getAttributeValue
in interface edu.internet2.middleware.subject.Subject
Subject.getAttributeValue(java.lang.String, boolean)
public String getAttributeValueOrCommaSeparated(String attributeName, boolean excludeInternalAttributes)
getAttributeValueOrCommaSeparated
in interface edu.internet2.middleware.subject.Subject
Subject.getAttributeValueOrCommaSeparated(java.lang.String, boolean)
public String getAttributeValueSingleValued(String attributeName, boolean excludeInternalAttributes)
getAttributeValueSingleValued
in interface edu.internet2.middleware.subject.Subject
Subject.getAttributeValueSingleValued(java.lang.String, boolean)
public Set<String> getAttributeValues(String attributeName, boolean excludeInternalAttributes)
getAttributeValues
in interface edu.internet2.middleware.subject.Subject
Subject.getAttributeValues(java.lang.String, boolean)
public Map<String,Set<String>> getAttributes(boolean excludeInternalAttributes)
getAttributes
in interface edu.internet2.middleware.subject.Subject
Subject.getAttributes(boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |