|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectokapi.coreobjects.OkapiObject
okapi.coreobjects.OkapiNexus
public class OkapiNexus
OkapiNexus is the building block for Okapi organization. OkapiNexus provides the basic building block for Okapi space. This includes departments, labs, centers, courses, sections, etc. For example, a department might have an OkapiNexus as the basic object grouping people associated with the department (faculty and students) and the essential info about the department, with a set of OkapiNexuses for the courses offered in the department. A flat organization might have one OkapiNexus for the site, with a set of OkapiNexuses for the classes being offered. A more complex organization can use the OkapiNexus in a hierarchical arrangement. The heirarchy of Nexuses is reflected in the URL used to reach that Nexus. However, the same Nexus may be reached by more than one URL. Whatever the path used to reach the Nexus, the URLs below the Nexus map to OkapiTools, which display content or perform more complex funcitons (e.g. discussion, quizzing) In an OkapiNexus is the basic OkapiObject information including Name and Description, as well as the association of URL paths with Tools. Styles, that is, preferences for the appearance of web pages, may be set in a Nexus and influence the appearance of pages in itself and all it's descendent Nexuses. OkapiNexus may be subclassed to classes better describing e.g. Subjects, Organizations, Student groups, or owned by individuals.
Field Summary | |
---|---|
static int |
ARCHIVED
|
static java.util.HashMap |
BASIC_WITH_ATTRIBUTES
Options constant for getAsXml methods indicating basic info and attributes. |
static int |
CURENT_SUBSECTION
|
static int |
CURRENT
|
static int |
DEACTIVATED_SUBSECTION
|
static int |
DELETED
|
static int |
ERROR
|
static int |
HIERARCHICAL
|
static int |
PAST
|
static int |
PAST_SUBSECTION
|
static int |
PAST_UNLISTED
|
Fields inherited from class okapi.coreobjects.OkapiObject |
---|
createdBy, createdDate, description, lastModifiedBy, lastModifiedDate, longName, name, objectID, status |
Constructor Summary | |
---|---|
OkapiNexus()
Create a new empty Nexus. |
|
OkapiNexus(int nexusCode)
Return new Nexus object with settings for this nexusCode compare and contrast with getNexus(int nexusCode) |
Method Summary | |
---|---|
void |
addArc(java.lang.String path,
OkapiArc arc)
Add Arc to Nexus at a specified path from the Nexus. |
void |
addGroup(OkapiGroup group,
OkapiRole role)
Add Groups associated with this Nexus. |
void |
addNexus(java.lang.String path,
OkapiNexus child)
Add a child Nexus and add self as parent to child |
void |
addParent(java.lang.String path,
OkapiNexus parent)
Add nexus as parent of current. |
void |
addTool(java.lang.String path,
OkapiToolController tool)
Add tool to Nexus at a specified path from the Nexus. |
void |
addToolView(OkapiToolController tool,
OkapiView view)
Add a View for a Tool |
void |
addUser(OkapiUser user)
Add User to this Nexus if not already there |
void |
addUserAttribute(OkapiUser user,
java.lang.String key,
java.lang.String value)
Add attribute for this User within this Nexus. |
static int |
cacheCheck()
Method cacheCheck |
boolean |
checkAuthorization(OkapiUser user,
OkapiOperation operation)
Checks to see if the specified user is authorized to perform the specified operation on this object. |
static int |
countOfNexusesForGroup(int groupCode)
Returns the number of nexuses associated with a specified group. |
void |
descend(java.util.List pathVector,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
java.util.List nexusHistory)
Process the path from this Nexus. |
boolean |
equals(java.lang.Object o)
override Object equals method to compare two nexuses |
java.util.Map |
getArcs()
Return all Arcs |
java.lang.String |
getAsXml(java.util.Map options,
java.lang.String tag,
int indent)
Overrides the method in OkapiObject to add Nexus specific information. |
java.lang.Object |
getAttributeByKey(java.lang.Object key)
Return an attribute for this Nexus. |
java.util.Map |
getAttributes()
Return the attributes Hashtable for this Nexus. |
java.util.Map |
getGroups()
Return all Groups associated with this Nexus. |
static OkapiNexus |
getNexus(int nexusCode)
Get a nexus from the cache if cached, instantiate and add to cache if not. |
static OkapiNexus |
getNexus(java.lang.String siteHandle)
Returns the nexus by objectId |
int |
getNexusCode()
Return nexusCode of this Nexus |
java.util.Map |
getNexuses()
Return all child nexuses |
java.util.Map |
getParents()
Return all parent nexuses |
java.lang.String |
getPath()
Find and return the path of this nexus. |
OkapiNexus |
getPrimaryParentNexus()
Return primary parent Nexus, if any, of this Nexus. |
java.util.Map |
getTools()
Return all tools |
java.util.Map |
getToolViews()
Return all toolViews. |
java.util.List |
getToolViews(OkapiToolController tool)
Return all toolViews for a tool. |
java.lang.Object |
getUserAttribute(OkapiUser user,
java.lang.Object key)
Get attribute for the User within this Nexus. |
java.util.Map |
getUserAttributes(OkapiUser user)
Get all attributes for the User within this Nexus. |
java.util.Map |
getUsers()
Return all Users associated with this nexus. |
int |
hashCode()
override hashCode to use the database table sequence number |
static java.util.List |
nexusesForArc(int arcCode)
Return a List of all Nexuses the Arc is in. |
static java.util.List |
nexusesForArc(OkapiArc arc)
Return a List of all Nexuses the Arc is in. |
static java.util.Map |
nexusesForGroup(int groupCode)
Return a Map of all Nexuses the Group is in and the Roles of the Group in them. |
static java.util.Map |
nexusesForGroup(OkapiGroup group)
Return a Map of all Nexuses the Group is in and the Roles of the Group in them. |
void |
refreshFromDB()
Refresh this object with the data currently stored in the DB. |
void |
removeArc(java.lang.String path,
OkapiArc arc)
Remove Arc from Nexus |
void |
removeAttribute(java.lang.String key)
Remove an attribute from this Nexus. |
void |
removeGroup(OkapiGroup group)
Remove Group from this Nexus. |
void |
removeNexus(java.lang.String path,
OkapiNexus child)
Remove nexus and remove self from child |
void |
removeParent(java.lang.String path,
OkapiNexus parent)
Remove parent |
void |
removeTool(java.lang.String path,
OkapiToolController tool)
Remove tool from Nexus |
void |
removeToolView(OkapiToolController tool,
OkapiView view)
Remove a View for a Tool |
void |
removeUser(OkapiUser user)
Remove User from this Nexus |
void |
removeUserAttribute(OkapiUser user,
java.lang.Object key)
Remove attribute for the User within this Nexus. |
void |
setAttribute(java.lang.String key,
java.lang.String value)
Set an attribute for this Nexus. |
void |
setDataSource(javax.sql.DataSource dataSource)
Set the dataSource to be used for data access. |
void |
setDescription(java.lang.String newDescription)
Method setDescription |
void |
setLongName(java.lang.String newLongName)
Method setLongName |
void |
setName(java.lang.String newName)
Method setName |
void |
setPrimaryParentNexus(OkapiNexus primaryParentNexus)
Set Nexus as primary parent of this Nexus |
void |
setStatus(int newStatus)
Method setStatus |
void |
setToolViews(java.util.Map toolViews)
Set all toolViews. |
void |
updateDB()
Update the database record for this object. |
Methods inherited from class okapi.coreobjects.OkapiObject |
---|
currentDateTimeOracle, getAsXml, getAsXml, getAsXml, getCreatedBy, getCreatedDate, getDescription, getLastModifiedBy, getLastModifiedDate, getLongName, getName, getObjectID, getStatus, isEncryptionRequired, setAuthorization, setCreatedBy, setCreatedDate, setLastModifiedBy, setLastModifiedBy, setLastModifiedDate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERROR
public static final int CURRENT
public static final int PAST
public static final int ARCHIVED
public static final int PAST_UNLISTED
public static final int CURENT_SUBSECTION
public static final int PAST_SUBSECTION
public static final int DEACTIVATED_SUBSECTION
public static final int HIERARCHICAL
public static final int DELETED
public static final java.util.HashMap BASIC_WITH_ATTRIBUTES
Constructor Detail |
---|
public OkapiNexus()
public OkapiNexus(int nexusCode)
Method Detail |
---|
public static int cacheCheck()
public static OkapiNexus getNexus(int nexusCode)
public int getNexusCode()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void addToolView(OkapiToolController tool, OkapiView view)
public void removeToolView(OkapiToolController tool, OkapiView view)
public java.util.Map getToolViews()
public java.util.List getToolViews(OkapiToolController tool)
public void setToolViews(java.util.Map toolViews)
public void addNexus(java.lang.String path, OkapiNexus child)
public void removeNexus(java.lang.String path, OkapiNexus child)
public java.util.Map getNexuses()
public void addParent(java.lang.String path, OkapiNexus parent)
public void removeParent(java.lang.String path, OkapiNexus parent)
public java.util.Map getParents()
public void setPrimaryParentNexus(OkapiNexus primaryParentNexus)
public OkapiNexus getPrimaryParentNexus()
public java.lang.String getPath()
public void addTool(java.lang.String path, OkapiToolController tool)
public void removeTool(java.lang.String path, OkapiToolController tool)
public java.util.Map getTools()
public void addArc(java.lang.String path, OkapiArc arc)
public void removeArc(java.lang.String path, OkapiArc arc)
public java.util.Map getArcs()
public void addUser(OkapiUser user)
public void removeUser(OkapiUser user)
public java.util.Map getUsers()
public void addUserAttribute(OkapiUser user, java.lang.String key, java.lang.String value)
public void removeUserAttribute(OkapiUser user, java.lang.Object key)
public java.lang.Object getUserAttribute(OkapiUser user, java.lang.Object key)
public java.util.Map getUserAttributes(OkapiUser user)
public void addGroup(OkapiGroup group, OkapiRole role)
public void removeGroup(OkapiGroup group)
public java.util.Map getAttributes()
public void removeAttribute(java.lang.String key)
public void setAttribute(java.lang.String key, java.lang.String value)
public java.lang.Object getAttributeByKey(java.lang.Object key)
key
-
public java.util.Map getGroups()
public void descend(java.util.List pathVector, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext context, java.util.List nexusHistory) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
public void updateDB()
updateDB
in class OkapiObject
public void refreshFromDB()
refreshFromDB
in class OkapiObject
public static java.util.Map nexusesForGroup(int groupCode)
public static java.util.List nexusesForArc(int arcCode)
public static java.util.Map nexusesForGroup(OkapiGroup group)
public static java.util.List nexusesForArc(OkapiArc arc)
public boolean checkAuthorization(OkapiUser user, OkapiOperation operation)
checkAuthorization
in class OkapiObject
public void setStatus(int newStatus)
setStatus
in class OkapiObject
newStatus
- public void setName(java.lang.String newName)
setName
in class OkapiObject
newName
- public void setLongName(java.lang.String newLongName)
setLongName
in class OkapiObject
newLongName
- public void setDescription(java.lang.String newDescription)
setDescription
in class OkapiObject
newDescription
- public java.lang.String getAsXml(java.util.Map options, java.lang.String tag, int indent)
getAsXml
in class OkapiObject
public static int countOfNexusesForGroup(int groupCode)
public static OkapiNexus getNexus(java.lang.String siteHandle)
public void setDataSource(javax.sql.DataSource dataSource)
dataSource
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |