public class Field extends GrouperAPI implements Comparable<Field>, GrouperHasContext, Hib3GrouperVersioned, XmlImportable<Field>
| Modifier and Type | Field and Description |
|---|---|
static String |
COLUMN_CONTEXT_ID
col
|
static String |
COLUMN_FIELD_UUID
uuid col in db
|
static String |
COLUMN_ID
col
|
static String |
COLUMN_NAME
col
|
static String |
COLUMN_OLD_FIELD_UUID
old uuid id col for id conversion
|
static String |
COLUMN_OLD_ID
old id col for id conversion
|
static String |
COLUMN_READ_PRIVILEGE
col
|
static String |
COLUMN_TYPE
col
|
static String |
COLUMN_WRITE_PRIVILEGE
col
|
static String |
FIELD_DB_VERSION
constant for field name for: dbVersion
|
static String |
FIELD_NAME
constant for field name for: name
|
static String |
FIELD_NAME_ADMINS
field name for admins
|
static String |
FIELD_NAME_ATTR_ADMINS
field name for attr admins
|
static String |
FIELD_NAME_ATTR_DEF_ATTR_READERS
field name for attrDefAttrReaders
|
static String |
FIELD_NAME_ATTR_DEF_ATTR_UPDATERS
field name for attrDefAttrUpdaters
|
static String |
FIELD_NAME_ATTR_OPTINS
field name for attr optins
|
static String |
FIELD_NAME_ATTR_OPTOUTS
field name for attr optouts
|
static String |
FIELD_NAME_ATTR_READERS
field name for attr readers
|
static String |
FIELD_NAME_ATTR_UPDATERS
field name for attr updaters
|
static String |
FIELD_NAME_ATTR_VIEWERS
field name for attr viewers
|
static String |
FIELD_NAME_CREATORS
field name for creators
|
static String |
FIELD_NAME_GROUP_ATTR_READERS
field name for groupAttrReaders
|
static String |
FIELD_NAME_GROUP_ATTR_UPDATERS
field name for groupAttrUpdaters
|
static String |
FIELD_NAME_OPTINS
field name for optins
|
static String |
FIELD_NAME_OPTOUTS
field name for optouts
|
static String |
FIELD_NAME_READERS
field name for readers
|
static String |
FIELD_NAME_STEM_ADMINS
field name for stemAdmins
|
static String |
FIELD_NAME_STEM_ATTR_READERS
field name for stemAttrReaders
|
static String |
FIELD_NAME_STEM_ATTR_UPDATERS
field name for stemAttrUpdaters
|
static String |
FIELD_NAME_STEMMERS
field name for stemmers
|
static String |
FIELD_NAME_UPDATERS
field name for updaters
|
static String |
FIELD_NAME_VIEWERS
field name for viewers
|
static String |
FIELD_READ_PRIVILEGE
constant for field name for: readPrivilege
|
static String |
FIELD_TYPE
constant for field name for: type
|
static String |
FIELD_UUID
constant for field name for: uuid
|
static String |
FIELD_WRITE_PRIVILEGE
constant for field name for: writePrivilege
|
static String |
PROPERTY_UUID
constant for property name for: uuid
|
static long |
serialVersionUID |
static String |
TABLE_GROUPER_FIELDS
table name for fields
|
COLUMN_HIBERNATE_VERSION_NUMBER, dbVersion, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER| Constructor and Description |
|---|
Field() |
| Modifier and Type | Method and Description |
|---|---|
static Collection<Field> |
calculateInheritedPrivileges(Collection<Field> fields,
boolean includeInheritedPrivileges)
see if there are inherited privileges to also include
|
Field |
clone()
deep clone the fields in this object
|
int |
compareTo(Field that) |
Field |
dbVersion()
save the state when retrieving from DB
|
Set<String> |
dbVersionDifferentFields()
note, these are massaged so that name, extension, etc look like normal fields.
|
void |
dbVersionReset()
take a snapshot of the data since this is what is in the db
|
boolean |
equals(Object other) |
static String |
fieldNames(Collection<Field> collection)
print out a collection of fields
|
String |
getContextId()
context id of the transaction
|
GroupType |
getGroupType() |
GroupType |
getGroupType(boolean exceptionIfNoGroupType) |
String |
getId()
return the uuid
|
Collection<Field> |
getImpliedFields()
get the fields that this field implies by inheritance
|
String |
getName() |
Privilege |
getReadPriv() |
String |
getReadPrivilege() |
FieldType |
getType() |
String |
getTypeString() |
String |
getUuid() |
Privilege |
getWritePriv() |
String |
getWritePrivilege() |
int |
hashCode() |
static Field |
internal_addField(GrouperSession s,
String name,
FieldType type,
Privilege read,
Privilege write,
boolean exceptionIfExists,
boolean updateIfExists,
boolean[] changedArray,
String uuid)
add a field if it is not already there
|
boolean |
isAttributeDefListField()
see if this is a list of members field for attributeDefs
|
boolean |
isAttributeName()
Deprecated.
|
boolean |
isEntityListField()
see if this is a list of members field for groups
|
boolean |
isGroupAccessField()
see if this is privilege field for groups
|
boolean |
isGroupListField()
see if this is a list of members field for groups
|
boolean |
isPrivilege() |
boolean |
isStemListField()
see if this is a list of members field for stems
|
void |
onPostDelete(HibernateSession hibernateSession)
after a delete occurs
|
void |
onPostSave(HibernateSession hibernateSession)
after a save (insert) occurs
|
void |
onPostUpdate(HibernateSession hibernateSession)
after an update occurs
|
void |
onPreDelete(HibernateSession hibernateSession)
before a delete (insert) occurs
|
void |
onPreSave(HibernateSession hibernateSession)
before a save (insert) occurs
|
void |
onPreUpdate(HibernateSession hibernateSession)
before an update occurs
|
void |
setContextId(String contextId1)
context id of the transaction
|
void |
setName(String name) |
void |
setReadPrivilege(Privilege readPrivilege) |
void |
setReadPrivilege(String readPrivilege) |
void |
setType(FieldType type) |
void |
setTypeString(String type) |
void |
setUuid(String uuid) |
void |
setWritePrivilege(Privilege writePrivilege) |
void |
setWritePrivilege(String writePrivilege) |
void |
store()
store this object to the DB.
|
String |
toString() |
void |
xmlCopyBusinessPropertiesToExisting(Field existingRecord)
copy business (non update) properties to an existing record
|
boolean |
xmlDifferentBusinessProperties(Field other)
see if the non update cols are different (e.g.
|
boolean |
xmlDifferentUpdateProperties(Field other)
see if the update cols are different (e.g.
|
String |
xmlGetId()
set id key in db
|
Field |
xmlRetrieveByIdOrKey()
retrieve from db by id or key.
|
Field |
xmlSaveBusinessProperties(Field existingRecord)
save the business properties (not update properties)
|
void |
xmlSaveUpdateProperties()
save the udpate properties (e.g.
|
void |
xmlSetId(String theId)
set id key in db
|
XmlExportField |
xmlToExportField(GrouperVersion grouperVersion)
convert to xml bean for export
|
String |
xmlToString()
convert to string for log
|
dbVersionClear, dbVersionIsDifferent, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onSave, onUpdate, setHibernateVersionNumberpublic static final String FIELD_NAME_CREATORS
public static final String FIELD_NAME_STEMMERS
public static final String FIELD_NAME_VIEWERS
public static final String FIELD_NAME_ATTR_VIEWERS
public static final String FIELD_NAME_ADMINS
public static final String FIELD_NAME_ATTR_ADMINS
public static final String FIELD_NAME_READERS
public static final String FIELD_NAME_ATTR_READERS
public static final String FIELD_NAME_UPDATERS
public static final String FIELD_NAME_ATTR_UPDATERS
public static final String FIELD_NAME_OPTINS
public static final String FIELD_NAME_ATTR_OPTINS
public static final String FIELD_NAME_OPTOUTS
public static final String FIELD_NAME_ATTR_OPTOUTS
public static final String FIELD_NAME_GROUP_ATTR_READERS
public static final String FIELD_NAME_GROUP_ATTR_UPDATERS
public static final String FIELD_NAME_ATTR_DEF_ATTR_READERS
public static final String FIELD_NAME_ATTR_DEF_ATTR_UPDATERS
public static final String FIELD_NAME_STEM_ATTR_READERS
public static final String FIELD_NAME_STEM_ATTR_UPDATERS
public static final String FIELD_NAME_STEM_ADMINS
public static final String COLUMN_ID
public static final String COLUMN_NAME
public static final String COLUMN_READ_PRIVILEGE
public static final String COLUMN_TYPE
public static final String COLUMN_WRITE_PRIVILEGE
public static final String COLUMN_CONTEXT_ID
public static final String TABLE_GROUPER_FIELDS
public static final String COLUMN_FIELD_UUID
public static final String COLUMN_OLD_ID
public static final String COLUMN_OLD_FIELD_UUID
public static final String FIELD_DB_VERSION
public static final String FIELD_NAME
public static final String FIELD_READ_PRIVILEGE
public static final String FIELD_TYPE
public static final String FIELD_UUID
public static final String FIELD_WRITE_PRIVILEGE
public static final String PROPERTY_UUID
public static final long serialVersionUID
public Collection<Field> getImpliedFields()
public boolean isPrivilege()
public String getId()
public static Collection<Field> calculateInheritedPrivileges(Collection<Field> fields, boolean includeInheritedPrivileges)
public static String fieldNames(Collection<Field> collection)
collection - public String getContextId()
public void setContextId(String contextId1)
setContextId in interface GrouperHasContextcontextId1 - public boolean isStemListField()
public boolean isAttributeDefListField()
public boolean isGroupListField()
public boolean isGroupAccessField()
public boolean isEntityListField()
public FieldType getType()
public Privilege getReadPriv()
public Privilege getWritePriv()
public boolean equals(Object other)
public String getName()
public String getReadPrivilege()
public String getTypeString()
public String getUuid()
public String getWritePrivilege()
public int hashCode()
hashCode in class ObjectObject.hashCode()public void setName(String name)
name - public void setReadPrivilege(Privilege readPrivilege)
readPrivilege - public void setReadPrivilege(String readPrivilege)
readPrivilege - public void setType(FieldType type)
type - public void setTypeString(String type)
type - public boolean isAttributeName()
public void setUuid(String uuid)
uuid - public void setWritePrivilege(Privilege writePrivilege)
writePrivilege - public void setWritePrivilege(String writePrivilege)
writePrivilege - public void onPostDelete(HibernateSession hibernateSession)
HibGrouperLifecycleonPostDelete in interface HibGrouperLifecycleonPostDelete in class GrouperAPIGrouperAPI.onPostDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPostSave(HibernateSession hibernateSession)
HibGrouperLifecycleonPostSave in interface HibGrouperLifecycleonPostSave in class GrouperAPIGrouperAPI.onPostSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPostUpdate(HibernateSession hibernateSession)
HibGrouperLifecycleonPostUpdate in interface HibGrouperLifecycleonPostUpdate in class GrouperAPIGrouperAPI.onPostUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPreDelete(HibernateSession hibernateSession)
HibGrouperLifecycleonPreDelete in interface HibGrouperLifecycleonPreDelete in class GrouperAPIGrouperAPI.onPreDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPreSave(HibernateSession hibernateSession)
HibGrouperLifecycleonPreSave in interface HibGrouperLifecycleonPreSave in class GrouperAPIGrouperAPI.onPreSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPreUpdate(HibernateSession hibernateSession)
HibGrouperLifecycleonPreUpdate in interface HibGrouperLifecycleonPreUpdate in class GrouperAPIGrouperAPI.onPreUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)public Field dbVersion()
dbVersion in class GrouperAPIpublic Set<String> dbVersionDifferentFields()
dbVersionDifferentFields in class GrouperAPIGrouperAPI.dbVersionDifferentFields()public void dbVersionReset()
dbVersionReset in class GrouperAPIpublic Field clone()
clone in interface GrouperCloneableclone in class GrouperAPIObject.clone()public void store()
public void xmlCopyBusinessPropertiesToExisting(Field existingRecord)
XmlImportableBasexmlCopyBusinessPropertiesToExisting in interface XmlImportableBase<Field>XmlImportableBase.xmlCopyBusinessPropertiesToExisting(java.lang.Object)public boolean xmlDifferentBusinessProperties(Field other)
XmlImportableBasexmlDifferentBusinessProperties in interface XmlImportableBase<Field>other - the one to compare withXmlImportableBase.xmlDifferentBusinessProperties(java.lang.Object)public boolean xmlDifferentUpdateProperties(Field other)
XmlImportableBasexmlDifferentUpdateProperties in interface XmlImportableBase<Field>other - the one to compare withXmlImportableBase.xmlDifferentUpdateProperties(java.lang.Object)public Field xmlRetrieveByIdOrKey()
XmlImportablexmlRetrieveByIdOrKey in interface XmlImportable<Field>XmlImportable.xmlRetrieveByIdOrKey()public Field xmlSaveBusinessProperties(Field existingRecord)
XmlImportableBasexmlSaveBusinessProperties in interface XmlImportableBase<Field>existingRecord - null if insert, the object if exists in DB
generally just copy the hibernate version number, and last updated to the
object and store itXmlImportableBase.xmlSaveBusinessProperties(java.lang.Object)public void xmlSaveUpdateProperties()
XmlImportableBasexmlSaveUpdateProperties in interface XmlImportableBase<Field>XmlImportableBase.xmlSaveUpdateProperties()public XmlExportField xmlToExportField(GrouperVersion grouperVersion)
grouperVersion - public String xmlGetId()
XmlImportableBasexmlGetId in interface XmlImportableBase<Field>XmlImportableBase.xmlGetId()public void xmlSetId(String theId)
XmlImportableBasexmlSetId in interface XmlImportableBase<Field>XmlImportableBase.xmlSetId(java.lang.String)public String xmlToString()
XmlImportableBasexmlToString in interface XmlImportableBase<Field>XmlImportableBase.xmlToString()public GroupType getGroupType(boolean exceptionIfNoGroupType)
exceptionIfNoGroupType - public GroupType getGroupType()
public int compareTo(Field that)
compareTo in interface Comparable<Field>Comparable.compareTo(java.lang.Object)public static Field internal_addField(GrouperSession s, String name, FieldType type, Privilege read, Privilege write, boolean exceptionIfExists, boolean updateIfExists, boolean[] changedArray, String uuid) throws InsufficientPrivilegeException, SchemaException
s - name - type - read - write - exceptionIfExists - updateIfExists - changedArray - is an array of 1 if you want to know if this method changed anything, else nulluuid - InsufficientPrivilegeExceptionSchemaExceptionCopyright © 2016 Internet2. All rights reserved.