|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectokapi.coreobjects.OkapiObject
public class OkapiObject
Base class for all Okapi fundamental objects. Base class for which are access controlled, are stored persistently in the database, and have some or all of: name, long name, description, ID, and last modified date. It contains methods for checking authorization on the pair {user, operation}, checking whether the object must only be sent over a secure communications channel, updating to and refreshing from the database, and fields common to all objects.
Field Summary | |
---|---|
protected java.lang.String |
createdBy
User or entity responsible for creation of this object. |
protected java.util.Date |
createdDate
Date of creation of this object. |
protected java.lang.String |
description
description of the entity represented by this object. |
protected java.lang.String |
lastModifiedBy
User or entity responsible for latest modification of this object. |
protected java.util.Date |
lastModifiedDate
Date of latest modification of this object. |
protected java.lang.String |
longName
Long-form name for the entity represented by this object. |
protected java.lang.String |
name
Short, single word name for the entity represented by this object. |
protected OkapiObjectID |
objectID
Identifier for this object, usually globally unique. |
protected int |
status
Number encoding status: active, inactive, etc. |
Constructor Summary | |
---|---|
|
OkapiObject()
Creates an object setting objectID to GUID and modified date to now. |
protected |
OkapiObject(OkapiObjectID objectID)
Creates an object with the specified objectID. |
|
OkapiObject(OkapiUser user)
Creates an object setting objectID to GUID, modified date to now, and modified by user. |
|
OkapiObject(OkapiUser user,
java.lang.String stringID)
Creates an object with a fixed objectID, sets modified date to now, and modified by user. |
protected |
OkapiObject(java.lang.String stringID)
Creates an object with a fixed objectID. |
Method Summary | |
---|---|
boolean |
checkAuthorization(OkapiUser user,
OkapiOperation operation)
Checks to see if the specified user is authorized to perform the specified operation on this object. |
java.lang.String |
currentDateTimeOracle(java.util.Date date)
Method currentDateTimeOracle |
java.lang.String |
getAsXml(java.util.Map options)
Method getAsXml |
java.lang.String |
getAsXml(java.util.Map options,
int indent)
Method getAsXml |
java.lang.String |
getAsXml(java.util.Map options,
java.lang.String tag)
Method getAsXml |
java.lang.String |
getAsXml(java.util.Map options,
java.lang.String tag,
int indent)
Returns an xml representation of this object, with the options defined by the options map, an element of type tag surrounding the xml, and the first line indented indent times. |
java.lang.String |
getCreatedBy()
Method getCreatedBy |
java.util.Date |
getCreatedDate()
Method getCreatedDate |
java.lang.String |
getDescription()
Method getDescription |
java.lang.String |
getLastModifiedBy()
Method getLastModifiedBy |
java.util.Date |
getLastModifiedDate()
Method getLastModifiedDate |
java.lang.String |
getLongName()
Method getLongName |
java.lang.String |
getName()
Method getName |
OkapiObjectID |
getObjectID()
Method getObjectID |
int |
getStatus()
Method getStatus |
boolean |
isEncryptionRequired(OkapiUser user,
OkapiOperation operation)
Checks to see if this object should only be provided over encrypted channels. |
void |
refreshFromDB()
Refresh this object with the data currently stored in the DB. |
void |
setAuthorization(OkapiUser user,
OkapiOperation operation)
Sets the authorization on this object for the specified user and operation, not restricted by date range. |
protected void |
setCreatedBy(java.lang.String newCreatedBy)
|
protected void |
setCreatedDate(java.util.Date newCreatedDate)
|
void |
setDescription(java.lang.String newDescription)
Method setDescription |
protected void |
setLastModifiedBy(OkapiUser newLastModifiedBy)
|
protected void |
setLastModifiedBy(java.lang.String newLastModifiedBy)
|
protected void |
setLastModifiedDate(java.util.Date newLastModifiedDate)
|
void |
setLongName(java.lang.String newLongName)
Method setLongName |
void |
setName(java.lang.String newName)
Method setName |
protected void |
setStatus(int newStatus)
|
void |
updateDB()
Update the database record for this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.lang.String longName
protected java.lang.String description
protected OkapiObjectID objectID
protected int status
protected java.util.Date createdDate
protected java.lang.String createdBy
protected java.util.Date lastModifiedDate
protected java.lang.String lastModifiedBy
Constructor Detail |
---|
public OkapiObject()
public OkapiObject(OkapiUser user)
protected OkapiObject(java.lang.String stringID)
protected OkapiObject(OkapiObjectID objectID)
public OkapiObject(OkapiUser user, java.lang.String stringID)
Method Detail |
---|
public boolean checkAuthorization(OkapiUser user, OkapiOperation operation)
public void setAuthorization(OkapiUser user, OkapiOperation operation)
public boolean isEncryptionRequired(OkapiUser user, OkapiOperation operation)
public void updateDB()
public void refreshFromDB()
public void setName(java.lang.String newName)
newName
- public java.lang.String getName()
public void setLongName(java.lang.String newLongName)
newLongName
- public java.lang.String getLongName()
public void setDescription(java.lang.String newDescription)
newDescription
- public java.lang.String getDescription()
public OkapiObjectID getObjectID()
protected void setStatus(int newStatus)
public int getStatus()
protected void setCreatedDate(java.util.Date newCreatedDate)
public java.util.Date getCreatedDate()
protected void setLastModifiedDate(java.util.Date newLastModifiedDate)
public java.util.Date getLastModifiedDate()
protected void setLastModifiedBy(OkapiUser newLastModifiedBy)
protected void setLastModifiedBy(java.lang.String newLastModifiedBy)
public java.lang.String getLastModifiedBy()
protected void setCreatedBy(java.lang.String newCreatedBy)
public java.lang.String getCreatedBy()
public java.lang.String currentDateTimeOracle(java.util.Date date)
date
-
public java.lang.String getAsXml(java.util.Map options, java.lang.String tag, int indent)
public java.lang.String getAsXml(java.util.Map options, java.lang.String tag)
options
- tag
-
public java.lang.String getAsXml(java.util.Map options, int indent)
options
- indent
-
public java.lang.String getAsXml(java.util.Map options)
options
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |