|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.GroupType
public class GroupType
Schema specification for a Group type.
Field Summary | |
---|---|
static java.lang.String |
COLUMN_OLD_ID
old id col for id conversion |
static java.lang.String |
COLUMN_OLD_TYPE_UUID
old uuid id col for id conversion |
static java.lang.String |
COLUMN_TYPE_UUID
uuid col in db |
static java.lang.String |
FIELD_CREATE_TIME
constant for field name for: createTime |
static java.lang.String |
FIELD_NAME
constant for field name for: name |
static java.lang.String |
FIELD_UUID
constant for field name for: uuid |
static long |
serialVersionUID
|
static java.lang.String |
TABLE_OLD_GROUPER_TYPES
name of table for grouper_types |
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 | |
---|---|
GroupType()
|
Method Summary | |
---|---|
AttributeDefName |
addAttribute(GrouperSession s,
java.lang.String name)
Deprecated. |
AttributeDefName |
addAttribute(GrouperSession s,
java.lang.String name,
boolean exceptionIfExists)
Deprecated. |
AttributeDefName |
addAttribute(GrouperSession s,
java.lang.String name,
boolean exceptionIfExists,
java.lang.String uuid)
Deprecated. |
Field |
addList(GrouperSession s,
java.lang.String name,
Privilege read,
Privilege write)
Deprecated. |
GroupType |
clone()
deep clone the fields in this object |
int |
compareTo(java.lang.Object o)
|
static GroupType |
createType(GrouperSession s,
java.lang.String name)
Deprecated. |
static GroupType |
createType(GrouperSession s,
java.lang.String name,
boolean exceptionIfExists)
Deprecated. |
static GroupType |
createType(GrouperSession s,
java.lang.String name,
boolean exceptionIfExists,
java.lang.String uuid)
Deprecated. |
void |
delete(GrouperSession s)
Deprecated. |
void |
deleteField(GrouperSession s,
java.lang.String name)
Deprecated. |
boolean |
equals(java.lang.Object other)
|
AttributeDefName |
getAttributeDefName()
|
java.lang.String |
getContextId()
context id of the transaction |
long |
getCreateTime()
|
java.util.Set<Field> |
getFields()
|
java.util.Set<AttributeDefName> |
getLegacyAttributes()
|
java.lang.String |
getName()
|
java.lang.String |
getUuid()
|
int |
hashCode()
|
Field |
internal_addList(GrouperSession s,
java.lang.String name,
Privilege read,
Privilege write,
java.lang.String fieldId,
boolean exceptionIfExists)
|
static GroupType |
internal_createType(GrouperSession s,
java.lang.String name,
boolean exceptionIfExists,
boolean[] changed,
java.lang.String uuid)
|
AttributeDef |
internal_getAttributeDefForAttributes()
|
AttributeDef |
internal_getAttributeDefForCustomLists()
|
AttributeDefName |
internal_getAttributeDefNameForCustomLists()
|
static GroupType |
internal_getGroupType(AttributeDefName attribute,
boolean exceptionIfNotLegacyGroupType)
|
void |
internalSetAttributeDefName(AttributeDefName attributeDefName1)
|
boolean |
isSystemType()
|
void |
setContextId(java.lang.String contextId1)
context id of the transaction |
void |
setCreateTime(long createTime)
|
void |
setFields(java.util.Set fields)
|
void |
setName(java.lang.String name)
|
void |
setUuid(java.lang.String uuid)
|
java.lang.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 |
Field Detail |
---|
public static final java.lang.String TABLE_OLD_GROUPER_TYPES
public static final java.lang.String COLUMN_TYPE_UUID
public static final java.lang.String COLUMN_OLD_ID
public static final java.lang.String COLUMN_OLD_TYPE_UUID
public static final java.lang.String FIELD_CREATE_TIME
public static final java.lang.String FIELD_NAME
public static final java.lang.String FIELD_UUID
public static final long serialVersionUID
Constructor Detail |
---|
public GroupType()
Method Detail |
---|
public static GroupType createType(GrouperSession s, java.lang.String name) throws InsufficientPrivilegeException, SchemaException
GroupType
.
Create a new custom group type that can be assigned to existing or
new groups. If the type already exists, a SchemaException
will be thrown. If the subject is not root-like, an
InsufficientPrivilegeException
will be thrown.
try { GroupType type = GroupType.createType(s, "my custom type"); } catch (InsufficientPrivilegeException eIP) { // Subject not privileged to add group types. } catch (SchemaException eS) { // Type not created }
s
- Create type within this session context.name
- Create type with this name.
GroupType
.
InsufficientPrivilegeException
SchemaException
public static GroupType createType(GrouperSession s, java.lang.String name, boolean exceptionIfExists) throws InsufficientPrivilegeException, SchemaException
GroupType
.
Create a new custom group type that can be assigned to existing or
new groups. If the type already exists, a SchemaException
will be thrown. If the subject is not root-like, an
InsufficientPrivilegeException
will be thrown.
try { GroupType type = GroupType.createType(s, "my custom type"); } catch (InsufficientPrivilegeException eIP) { // Subject not privileged to add group types. } catch (SchemaException eS) { // Type not created }
s
- Create type within this session context.name
- Create type with this name.exceptionIfExists
-
GroupType
.
InsufficientPrivilegeException
SchemaException
public static GroupType createType(GrouperSession s, java.lang.String name, boolean exceptionIfExists, java.lang.String uuid) throws InsufficientPrivilegeException, SchemaException
GroupType
.
Create a new custom group type that can be assigned to existing or
new groups. If the type already exists, a SchemaException
will be thrown. If the subject is not root-like, an
InsufficientPrivilegeException
will be thrown.
try { GroupType type = GroupType.createType(s, "my custom type"); } catch (InsufficientPrivilegeException eIP) { // Subject not privileged to add group types. } catch (SchemaException eS) { // Type not created }
s
- Create type within this session context.name
- Create type with this name.exceptionIfExists
- uuid
-
GroupType
.
InsufficientPrivilegeException
SchemaException
public java.lang.String getContextId()
public void setContextId(java.lang.String contextId1)
contextId1
- public AttributeDefName addAttribute(GrouperSession s, java.lang.String name) throws InsufficientPrivilegeException, SchemaException
Field
to a custom GroupType
.
try {
Field myAttr = type.addAttribute(
"my attribute", AccessPrivilege.VIEW, AccessPrivilege.UPDATE, false
);
}
catch (InsufficientPrivilegeException eIP) {
// Not privileged to add attribute
}
catch (SchemaException eS) {
// Invalid schema
}
s
- Add attribute within this session context.name
- Name of attribute.
InsufficientPrivilegeException
SchemaException
public AttributeDefName addAttribute(GrouperSession s, java.lang.String name, boolean exceptionIfExists) throws InsufficientPrivilegeException, SchemaException
Field
to a custom GroupType
.
try {
Field myAttr = type.addAttribute(
"my attribute", AccessPrivilege.VIEW, AccessPrivilege.UPDATE, false
);
}
catch (InsufficientPrivilegeException eIP) {
// Not privileged to add attribute
}
catch (SchemaException eS) {
// Invalid schema
}
s
- Add attribute within this session context.name
- Name of attribute.exceptionIfExists
-
InsufficientPrivilegeException
SchemaException
public AttributeDefName addAttribute(GrouperSession s, java.lang.String name, boolean exceptionIfExists, java.lang.String uuid) throws InsufficientPrivilegeException, SchemaException
Field
to a custom GroupType
.
try {
Field myAttr = type.addAttribute(
"my attribute", AccessPrivilege.VIEW, AccessPrivilege.UPDATE, false
);
}
catch (InsufficientPrivilegeException eIP) {
// Not privileged to add attribute
}
catch (SchemaException eS) {
// Invalid schema
}
s
- Add attribute within this session context.name
- Name of attribute.exceptionIfExists
- uuid
-
InsufficientPrivilegeException
SchemaException
public Field addList(GrouperSession s, java.lang.String name, Privilege read, Privilege write) throws InsufficientPrivilegeException, SchemaException
Field
to a custom GroupType
.
try {
Field myList = type.addList(
s, "my list", AccessPrivilege.VIEW, AccessPrivilege.UPDATE
);
}
catch (InsufficientPrivilegeException eIP) {
// Not privileged to add list
}
catch (SchemaException eS) {
// Invalid schema
}
s
- Add list within this session context.name
- Name of list.read
- Privilege
required to write to this Field
.write
- Privilege
required to write to this Field
.
InsufficientPrivilegeException
SchemaException
public Field internal_addList(GrouperSession s, java.lang.String name, Privilege read, Privilege write, java.lang.String fieldId, boolean exceptionIfExists) throws InsufficientPrivilegeException, SchemaException
s
- name
- read
- write
- fieldId
- exceptionIfExists
-
InsufficientPrivilegeException
SchemaException
public void delete(GrouperSession s) throws InsufficientPrivilegeException, SchemaException
GroupType
definition.
try { aGroupType.delete(s); } catch (InsufficientPrivilegeException eIP) { // Subject not privileged to delete group type. } catch (SchemaException eS) { // Type could not be deleted }
s
- Delete type within this session context.
InsufficientPrivilegeException
SchemaException
public void deleteField(GrouperSession s, java.lang.String name) throws InsufficientPrivilegeException, SchemaException
Field
from a custom GroupType
.
Delete a field from this group type. If the field does not exist
in this type a SchemaException
will be thrown. If the
subject is not root-like, an InsufficientPrivilegeException
will be thrown.
try { type.deleteField(s, "my field"); ); } catch (InsufficientPrivilegeException eIP) { // Not privileged to delete field } catch (SchemaException eS) { // Invalid schema }
s
- Delete field within this session context.name
- Name of field to delete.
InsufficientPrivilegeException
SchemaException
public boolean isSystemType()
public static GroupType internal_createType(GrouperSession s, java.lang.String name, boolean exceptionIfExists, boolean[] changed, java.lang.String uuid) throws InsufficientPrivilegeException, SchemaException
s
- name
- exceptionIfExists
- changed
- boolean array, the fisrt index will be in it existed alreadyuuid
- to use or null for one to be assigned
InsufficientPrivilegeException
SchemaException
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public long getCreateTime()
public java.util.Set<Field> getFields()
public java.lang.String getName()
public java.lang.String getUuid()
public int hashCode()
hashCode
in class java.lang.Object
public void setCreateTime(long createTime)
createTime
- public void setFields(java.util.Set fields)
fields
- public void setName(java.lang.String name)
name
- public void setUuid(java.lang.String uuid)
uuid
- public java.lang.String toString()
toString
in class java.lang.Object
public GroupType clone()
clone
in interface GrouperCloneable
clone
in class GrouperAPI
Object.clone()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(java.lang.Object)
public AttributeDefName getAttributeDefName()
public void internalSetAttributeDefName(AttributeDefName attributeDefName1)
attributeDefName1
- public static GroupType internal_getGroupType(AttributeDefName attribute, boolean exceptionIfNotLegacyGroupType)
attribute
- exceptionIfNotLegacyGroupType
-
public AttributeDef internal_getAttributeDefForAttributes()
public AttributeDef internal_getAttributeDefForCustomLists()
public AttributeDefName internal_getAttributeDefNameForCustomLists()
public java.util.Set<AttributeDefName> getLegacyAttributes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |