|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.nurelm.nucontent.model.Site
Corresponds to a NuContent Web site. Through this object,
programmers can access every page on the entire site. NuContent
provides access to the current Site object via each request
in the attribute called "site".
For example, say we create a Site object in the usual
way:
Site mySite = (Site) request.getAttribute("site");
Here's how to get a list of all root pages on the site:
ArrayList rootPages = (ArrayList) mySite.getRootPages();
Once a Page is retrieved, any piece of content in
that object can easily be retrieved or modified.
| Field Summary | |
|---|---|
protected static java.lang.String |
EXCEEDS_MAXIMUM_NUMBER_OF_USERS
|
protected static java.lang.String |
GROUP_ALREADY_EXISTS
|
protected static java.lang.String |
GROUP_NOT_FOUND
|
protected static java.lang.String |
ROOT_PAGE_ALREADY_EXISTS
|
protected static java.lang.String |
ROOT_PAGE_NOT_FOUND
|
protected static java.lang.String |
USER_ALREADY_EXISTS
|
protected static java.lang.String |
USER_NOT_FOUND
|
| Method Summary | |
|---|---|
Page |
addRootPage(java.lang.String contentGroupId)
Creates a new root page containing a default name and short description. |
Page |
addRootPage(java.lang.String contentGroupId,
java.lang.String id)
Use the other addRootPage method in preference over this one. |
Group |
createGroup(java.lang.String groupname)
|
User |
createUser(java.lang.String username)
|
java.util.Collection |
getEditPages(java.lang.String username)
Return a collection of all working Pages with open EDIT
Tasks registered to the User with the given
username. |
Group |
getGroup(java.lang.String groupname)
|
java.lang.String[] |
getGroupNames()
|
java.util.Collection |
getGroups()
|
Group[] |
getGroups(java.lang.String[] groupnames)
|
java.util.Collection |
getLockedPages(java.lang.String username)
Return a collection of all Pages locked by the User
with the given username. |
Node |
getNode(java.lang.String id)
Returns the Node object associated with the supplied id. |
Node |
getNodeLockIfNeeded(java.lang.String id,
UserValueObject userVO,
java.lang.String pageURI,
boolean isLockable)
Returns the requested Node, but locks it and returns the
working copy instead if necessary (if the Node is really a
Page. |
java.util.Collection |
getNonSiteAdminUsers()
Returns a Collection of Users who are all not in site admin group. |
java.util.Collection |
getNoReviewerAssinedWorkingPages()
Return a collection of all the Pages that are workign versions
of pages that are being reviewed and assigned no
reviewer group user to review |
int |
getNumberOfUsers()
Returns Existing number of users. |
int |
getNumberOfUsers(java.lang.String GroupName)
Returns Existing number of users in the Group. |
java.util.Collection |
getOpenTasks()
Returns all opened Tasks, sorted by username. |
Page |
getPageCreateRootIfNeeded(java.lang.String contentGroupId,
java.lang.String pageId)
First attempts to find the page based on the pageId. |
Page |
getPageLockIfNeeded(java.lang.String id,
UserValueObject userVO,
java.lang.String pageURI,
boolean isLockable)
Returns the requested Page, but locks it and returns the working
copy instead if necessary. |
java.util.Collection |
getReviewPages(java.lang.String username)
Return a collection of all working Pages with open REVIEW
Tasks registered to the User with the given
username. |
Page |
getRootPage(java.lang.String contentGroupId)
Returns the root Page for the specified contentGroupId. |
Page |
getRootPageCreateIfNeeded(java.lang.String contentGroupId)
Returns the specified root Page, but creates it if it
does not exist. |
java.util.Collection |
getRootPages()
Returns all of this Site's root Pages. |
Group |
getSiteAdminGroup()
|
java.lang.String |
getSiteId()
Provides access to the current Site's ID |
User |
getUser(java.lang.String username)
|
java.util.Collection |
getUsers()
|
java.util.Collection |
getUsersWithLockedPages()
Returns a list of Users with locked pages, sorted by alpha. |
java.util.Collection |
getWorkingPagesForEdit(java.lang.String username)
Return a collection of all the Pages that are workign versions
of pages locked by the User with the given username
that are being edited. |
java.util.Collection |
getWorkingPagesForReview(java.lang.String username)
Return a collection of all the Pages that are workign versions
of pages locked by the User with the given username
that are being reviewed. |
boolean |
isGroupNameExists(java.lang.String groupname)
Used to check if a group with the given name exists. |
boolean |
isPagedLockedByUser(java.lang.String pageId,
java.lang.String username)
Returns true if the page with the specified page id is locked by the specified user. |
UserValueObject |
login(java.lang.String username,
java.lang.String password)
|
void |
removeGroup(java.lang.String groupname)
|
void |
removeRepeatItemsByLinkedPageId(java.lang.String linkedPageId)
Removes any repeat items with the specified linkedPageId. |
void |
removeRootPage(java.lang.String contentGroupId)
Removes the root page with the specified template ID from the data store. |
void |
removeUser(java.lang.String username)
|
boolean |
rootPageExists(java.lang.String contentGroupId)
Used to check if a root Page for the given content group id
(also referred to as template id) exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String ROOT_PAGE_NOT_FOUND
protected static final java.lang.String ROOT_PAGE_ALREADY_EXISTS
protected static final java.lang.String USER_NOT_FOUND
protected static final java.lang.String USER_ALREADY_EXISTS
protected static final java.lang.String GROUP_NOT_FOUND
protected static final java.lang.String GROUP_ALREADY_EXISTS
protected static final java.lang.String EXCEEDS_MAXIMUM_NUMBER_OF_USERS
| Method Detail |
public java.lang.String getSiteId()
Site's ID
Site's ID.public boolean rootPageExists(java.lang.String contentGroupId)
Page for the given content group id
(also referred to as template id) exists.
contentGroupId - The template ID.
public Page getRootPage(java.lang.String contentGroupId)
throws DataAccessException
Page for the specified contentGroupId.
contentGroupId - The template ID
Page corresponding to the specified ID.
DataAccessException - if a root Page does not exist for the
contentGroupId.
public java.util.Collection getRootPages()
throws DataAccessException
Site's root Pages.
Site's root Pages
DataAccessException
public Page getRootPageCreateIfNeeded(java.lang.String contentGroupId)
throws DataAccessException
Page, but creates it if it
does not exist.
Page object specified (or the new one just
created if necessary)
DataAccessException
public Page getPageCreateRootIfNeeded(java.lang.String contentGroupId,
java.lang.String pageId)
throws DataAccessException
DataAccessException
public Page addRootPage(java.lang.String contentGroupId)
throws DataAccessException
DataAccessException
public Page addRootPage(java.lang.String contentGroupId,
java.lang.String id)
throws DataAccessException
DataAccessException
public void removeRootPage(java.lang.String contentGroupId)
throws DataAccessException
contentGroupId - Also known as the template ID.
DataAccessExceptionpublic void removeRepeatItemsByLinkedPageId(java.lang.String linkedPageId)
linkedPageId - The linkedPageId to search for when finding repeat
items to remove.public Node getNode(java.lang.String id)
id - The ID of the node to be fetched.
public Page getPageLockIfNeeded(java.lang.String id,
UserValueObject userVO,
java.lang.String pageURI,
boolean isLockable)
Page, but locks it and returns the working
copy instead if necessary.
id - The id of the page to be returned.userVO - The user value object of the current user.isLockable - True if the page has locking enabled.
public Node getNodeLockIfNeeded(java.lang.String id,
UserValueObject userVO,
java.lang.String pageURI,
boolean isLockable)
Node, but locks it and returns the
working copy instead if necessary (if the Node is really a
Page.
id - The id of the page to be returned.userVO - The user value object of the current user.isLockable - True if the page has locking enabled.
public java.util.Collection getLockedPages(java.lang.String username)
Pages locked by the User
with the given username.
username - The name of the User to be looked up.
Collection of Pages which have
LOCK Tasks associated with the given User
public boolean isPagedLockedByUser(java.lang.String pageId,
java.lang.String username)
username - The username of the user for which we are checking.pageId - The ID of the page.
public java.util.Collection getEditPages(java.lang.String username)
Pages with open EDIT
Tasks registered to the User with the given
username.
username - The name of the User to be looked up.
Collection of working Pages which have
EDIT Tasks associated with the given Userpublic java.util.Collection getReviewPages(java.lang.String username)
Pages with open REVIEW
Tasks registered to the User with the given
username.
username - The name of the User to be looked up.
Collection of working Pages which have
REVIEW Tasks associated with the given Userpublic java.util.Collection getWorkingPagesForEdit(java.lang.String username)
Pages that are workign versions
of pages locked by the User with the given username
that are being edited.
username - The name of the User to be looked up.
Collection of Pages which have
LOCK Tasks associated with the given User that have
an open Task type of type EDITpublic java.util.Collection getWorkingPagesForReview(java.lang.String username)
Pages that are workign versions
of pages locked by the User with the given username
that are being reviewed.
username - The name of the User to be looked up.
Collection of Pages which have
LOCK Tasks associated with the given User that have
an open Task type of type REVIEW
public java.util.Collection getNoReviewerAssinedWorkingPages()
throws DataAccessException
Pages that are workign versions
of pages that are being reviewed and assigned no
reviewer group user to review
Collection of Pages which have
REVIEWS Tasks not associated with the Reviewer Group User that have
an open Task type of type REVIEW
DataAccessException
public User getUser(java.lang.String username)
throws DataAccessException
DataAccessException
public User createUser(java.lang.String username)
throws DataAccessException
DataAccessException
public void removeUser(java.lang.String username)
throws DataAccessException
DataAccessException
public Group getGroup(java.lang.String groupname)
throws DataAccessException
DataAccessExceptionpublic Group getSiteAdminGroup()
public Group[] getGroups(java.lang.String[] groupnames)
throws DataAccessException
DataAccessException
public Group createGroup(java.lang.String groupname)
throws DataAccessException
DataAccessException
public void removeGroup(java.lang.String groupname)
throws DataAccessException
DataAccessException
public UserValueObject login(java.lang.String username,
java.lang.String password)
public java.lang.String[] getGroupNames()
public java.util.Collection getUsers()
public java.util.Collection getNonSiteAdminUsers()
Users who are all not in site admin group.
public java.util.Collection getUsersWithLockedPages()
Users with locked pages, sorted by alpha.
public int getNumberOfUsers()
public int getNumberOfUsers(java.lang.String GroupName)
throws DataAccessException
GroupName - The name of the Group to be looked up.
DataAccessExceptionpublic java.util.Collection getOpenTasks()
Tasks, sorted by username.
public java.util.Collection getGroups()
public boolean isGroupNameExists(java.lang.String groupname)
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||