|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.opencms.flex.jsp.CmsJspNavBuilder
Bean to provide a convenient way to build navigation structures based on
CmsJspNavElement
.
CmsJspNavElement
Constructor Summary | |
CmsJspNavBuilder()
Empty constructor, so that this bean can be initialized from a JSP. |
|
CmsJspNavBuilder(com.opencms.file.CmsObject cms)
Default constructor. |
Method Summary | |
static java.util.ArrayList |
getChannelSubFolders(com.opencms.file.CmsObject cms,
java.lang.String channel)
Returns all subfolders of a channel, or an empty array if the folder does not exist or has no subfolders. |
static java.util.ArrayList |
getChannelSubFolders(com.opencms.file.CmsObject cms,
java.lang.String parentChannel,
java.lang.String subChannel)
Returns all subfolders of a sub channel that has the given parent channel, or an empty array if that combination does not exist or has no subfolders. |
java.util.ArrayList |
getChannelSubFolders(java.lang.String channel)
Returns all subfolders of a channel, or an empty array if the folder does not exist or has no subfolders. |
java.util.ArrayList |
getChannelSubFolders(java.lang.String parentChannel,
java.lang.String subChannel)
Returns all subfolders of a sub channel that has the given parent channel, or an empty array if that combination does not exist or has no subfolders. |
static java.util.ArrayList |
getChannelSubFoldersSortTitleAsc(com.opencms.file.CmsObject cms,
java.lang.String channel,
java.lang.String subChannel)
Returns all subfolders of a channel, sorted by "Title" property ascending, or an empty array if the folder does not exist or has no subfolders. |
java.util.ArrayList |
getChannelSubFoldersSortTitleAsc(java.lang.String channel,
java.lang.String subChannel)
Returns all subfolders of a channel, sorted by "Title" property ascending, or an empty array if the folder does not exist or has no subfolders. |
java.util.ArrayList |
getNavigationForFolder()
Collect all navigation elements from the files of the folder of the current request URI, navigation elements are of class CmsJspNavElement. |
static java.util.ArrayList |
getNavigationForFolder(com.opencms.file.CmsObject cms,
java.lang.String folder)
Collect all navigation elements from the files in the given folder, navigation elements are of class CmsJspNavElement. |
static java.util.ArrayList |
getNavigationForFolder(com.opencms.file.CmsObject cms,
java.lang.String folder,
int level)
Build a navigation for the folder that is either minus levels up from the given folder, or that is plus levels down from the root folder towards the given folder. |
java.util.ArrayList |
getNavigationForFolder(int level)
Build a navigation for the folder that is either minus levels up from of the folder of the current request URI, or that is plus levels down from the root folder towards the current request URI. |
java.util.ArrayList |
getNavigationForFolder(java.lang.String folder)
Collect all navigation elements from the files in the given folder, navigation elements are of class CmsJspNavElement. |
java.util.ArrayList |
getNavigationForFolder(java.lang.String folder,
int level)
Build a navigation for the folder that is either minus levels up from the given folder, or that is plus levels down from the root folder towards the given folder. |
com.opencms.flex.jsp.CmsJspNavElement |
getNavigationForResource()
Returns a CmsJspNavElement for the resource of the current request URI. |
static com.opencms.flex.jsp.CmsJspNavElement |
getNavigationForResource(com.opencms.file.CmsObject cms,
java.lang.String resource)
Returns a CmsJspNavElement for the named resource. |
com.opencms.flex.jsp.CmsJspNavElement |
getNavigationForResource(java.lang.String resource)
Returns a CmsJspNavElement for the named resource. |
static java.util.ArrayList |
getNavigationTreeForFolder(com.opencms.file.CmsObject cms,
java.lang.String folder,
int startlevel,
int endlevel)
Builds a tree navigation for the folders between the provided start and end level. |
java.util.ArrayList |
getNavigationTreeForFolder(int startlevel,
int endlevel)
|
java.util.ArrayList |
getNavigationTreeForFolder(java.lang.String folder,
int startlevel,
int endlevel)
|
void |
init(com.opencms.file.CmsObject cms)
Initiliazes this bean. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CmsJspNavBuilder()
Object.Object()
public CmsJspNavBuilder(com.opencms.file.CmsObject cms)
cms
- context provider for the current requestMethod Detail |
public void init(com.opencms.file.CmsObject cms)
cms
- context provider for the current requestpublic com.opencms.flex.jsp.CmsJspNavElement getNavigationForResource()
public com.opencms.flex.jsp.CmsJspNavElement getNavigationForResource(java.lang.String resource)
resource
- the resource name to get the nav information for,
must be a full path name, e.g. "/docs/index.html".
public static com.opencms.flex.jsp.CmsJspNavElement getNavigationForResource(com.opencms.file.CmsObject cms, java.lang.String resource)
cms
- context provider for the current requestresource
- the resource name to get the nav information for,
must be a full path name, e.g. "/docs/index.html".
public java.util.ArrayList getNavigationForFolder()
public java.util.ArrayList getNavigationForFolder(java.lang.String folder)
folder
- the selected folder
public static java.util.ArrayList getNavigationForFolder(com.opencms.file.CmsObject cms, java.lang.String folder)
cms
- context provider for the current requestfolder
- the selected folder
public java.util.ArrayList getNavigationForFolder(int level)
If level is set to zero the root folder is used by convention.
level
- if negative, walk this many levels up, if positive, walk this many
levels down from root folderpublic java.util.ArrayList getNavigationForFolder(java.lang.String folder, int level)
If level is set to zero the root folder is used by convention.
folder
- the selected folderlevel
- if negative, walk this many levels up, if positive, walk this many
levels down from root folderpublic static java.util.ArrayList getNavigationForFolder(com.opencms.file.CmsObject cms, java.lang.String folder, int level)
If level is set to zero the root folder is used by convention.
cms
- context provider for the current requestfolder
- the selected folderlevel
- if negative, walk this many levels up, if positive, walk this many
levels down from root folderpublic java.util.ArrayList getNavigationTreeForFolder(int startlevel, int endlevel)
getNavigationTreeForFolder(CmsObject, String, int, int)
public java.util.ArrayList getNavigationTreeForFolder(java.lang.String folder, int startlevel, int endlevel)
getNavigationTreeForFolder(CmsObject, String, int, int)
public static java.util.ArrayList getNavigationTreeForFolder(com.opencms.file.CmsObject cms, java.lang.String folder, int startlevel, int endlevel)
A tree navigation includes all nav elements that are required to display a tree structure.
However, the data structure is a simple list.
Each of the nav elements in the list has the CmsJspNavElement.getNavTreeLevel()
set
to the level it belongs to. Use this information to distinguish between the nav levels.
cms
- context provider for the current requestfolder
- the selected folderstartlevel
- the start levelendlevel
- the end level
public java.util.ArrayList getChannelSubFolders(java.lang.String parentChannel, java.lang.String subChannel)
parentChannel
- the parent channelsubChannel
- the sub channel
public static java.util.ArrayList getChannelSubFolders(com.opencms.file.CmsObject cms, java.lang.String parentChannel, java.lang.String subChannel)
cms
- context provider for the current requestparentChannel
- the parent channelsubChannel
- the sub channel
public java.util.ArrayList getChannelSubFolders(java.lang.String channel)
channel
- the channel to look for subfolders in
public static java.util.ArrayList getChannelSubFolders(com.opencms.file.CmsObject cms, java.lang.String channel)
cms
- context provider for the current requestchannel
- the channel to look for subfolders in
public java.util.ArrayList getChannelSubFoldersSortTitleAsc(java.lang.String channel, java.lang.String subChannel)
channel
- the parent channelsubChannel
- the sub channel
public static java.util.ArrayList getChannelSubFoldersSortTitleAsc(com.opencms.file.CmsObject cms, java.lang.String channel, java.lang.String subChannel)
cms
- context provider for the current requestchannel
- the parent channelsubChannel
- the sub channel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |