public abstract class A_CmsListResourceCollector extends java.lang.Object implements I_CmsListResourceCollector
CmsResource objects for a explorer List.| 限定符和类型 | 字段和说明 |
|---|---|
protected java.lang.String |
m_collectorParameter
The collector parameter.
|
protected java.util.Map<java.lang.String,CmsListItem> |
m_liCache
List item cache.
|
protected java.util.Map<java.lang.String,CmsResource> |
m_resCache
Resource cache.
|
protected java.util.List<CmsResource> |
m_resources
Cache for resource list result.
|
static java.lang.String |
VFS_PATH_NONE
VFS path to use for a dummy resource object.
|
PARAM_FILTER, PARAM_ORDER, PARAM_PAGE, PARAM_RESOURCES, PARAM_SORTBY, SEP_KEYVAL, SEP_PARAM| 限定符 | 构造器和说明 |
|---|---|
protected |
A_CmsListResourceCollector(A_CmsListExplorerDialog wp)
Constructor, creates a new list collector.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(I_CmsResourceCollector arg0) |
protected CmsListItem |
createResourceListItem(CmsResource resource,
CmsHtmlList list,
boolean showPermissions,
boolean showDateLastMod,
boolean showUserLastMod,
boolean showDateCreate,
boolean showUserCreate,
boolean showDateRel,
boolean showDateExp,
boolean showState,
boolean showLockedBy,
boolean showSite)
Returns a list item created from the resource information, differs between valid resources and invalid resources.
|
java.lang.String |
getCreateLink(CmsObject cms)
Returns the link that must be executed when a user clicks on the direct edit
"new" button on a list created by the default collector.
|
java.lang.String |
getCreateLink(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
Returns the link that must be executed when a user clicks on the direct edit
"new" button on a list created by the named collector.
|
java.lang.String |
getCreateParam(CmsObject cms)
Returns the default parameter that must be passed to the
I_CmsResourceCollector.getCreateLink(CmsObject, String, String) method. |
java.lang.String |
getCreateParam(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
Returns the parameter that must be passed to the
I_CmsResourceCollector.getCreateLink(CmsObject, String, String) method. |
int |
getCreateTypeId(CmsObject cms,
java.lang.String collectorName,
java.lang.String param)
Returns the id of the resource type for new collector items.
|
java.lang.String |
getDefaultCollectorName()
Returns the default collector name to use for collecting resources.
|
java.lang.String |
getDefaultCollectorParam()
Returns the default collector parameter to use for collecting resources.
|
protected CmsListItem |
getDummyListItem(CmsHtmlList list)
Returns a dummy list item.
|
protected java.util.List<CmsResource> |
getInternalResources(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String> params)
Wrapper method for caching the result of
getResources(CmsObject, Map). |
java.util.List<CmsListItem> |
getListItems(java.lang.String parameter)
Returns a list of list items from a list of resources.
|
int |
getOrder()
Returns the "order weight" of this collector.
|
CmsResource |
getResource(CmsObject cms,
CmsListItem item)
Returns the resource for the given item.
|
protected java.util.List<java.lang.String> |
getResourceNamesFromParam(java.util.Map<java.lang.String,java.lang.String> params)
Returns the list of resource names from the parameter map.
|
abstract java.util.List<CmsResource> |
getResources(CmsObject cms,
java.util.Map<java.lang.String,java.lang.String> params)
Returns all, unsorted and unfiltered, resources.
|
java.util.List<CmsResource> |
getResults(CmsObject cms)
Returns a list of
CmsResource Objects that are
gathered in the VFS using the default collector name and parameter. |
java.util.List<CmsResource> |
getResults(CmsObject cms,
java.lang.String collectorName,
java.lang.String parameter)
The parameter must follow the syntax "page:nr" where nr is the number of the page to be displayed.
|
protected CmsListState |
getState(java.util.Map<java.lang.String,java.lang.String> params)
Returns the state of the parameter map.
|
A_CmsListExplorerDialog |
getWp()
Returns the workplace object.
|
protected abstract void |
setAdditionalColumns(CmsListItem item,
CmsResourceUtil resUtil)
Set additional column entries for a resource.
|
void |
setDefaultCollectorName(java.lang.String collectorName)
Sets the default collector name to use for collecting resources.
|
void |
setDefaultCollectorParam(java.lang.String param)
The parameter must follow the syntax "mode|projectId" where mode is either "new", "changed", "deleted"
or "modified" and projectId is the id of the project to be displayed.
|
void |
setOrder(int order)
Sets the "order weight" of this collector.
|
void |
setPage(int page)
Sets the current display page.
|
protected void |
setResourcesParam(java.util.List<java.lang.String> resources)
Sets the resources parameter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCollectorNamespublic static final java.lang.String VFS_PATH_NONE
protected java.lang.String m_collectorParameter
protected java.util.Map<java.lang.String,CmsListItem> m_liCache
protected java.util.Map<java.lang.String,CmsResource> m_resCache
protected java.util.List<CmsResource> m_resources
protected A_CmsListResourceCollector(A_CmsListExplorerDialog wp)
wp - the workplace object where the collector is used frompublic int compareTo(I_CmsResourceCollector arg0)
compareTo 在接口中 java.lang.Comparable<I_CmsResourceCollector>Comparable.compareTo(java.lang.Object)public java.lang.String getCreateLink(CmsObject cms)
I_CmsResourceCollector
If this method returns null,
it indicated that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
getCreateLink 在接口中 I_CmsResourceCollectorcms - the current CmsObjectI_CmsResourceCollector.getCreateLink(org.opencms.file.CmsObject)public java.lang.String getCreateLink(CmsObject cms, java.lang.String collectorName, java.lang.String param)
I_CmsResourceCollector
If this method returns null,
it indicated that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
getCreateLink 在接口中 I_CmsResourceCollectorcms - the current CmsObjectcollectorName - the name of the collector to useparam - an optional collector parameterI_CmsResourceCollector.getCreateLink(org.opencms.file.CmsObject, java.lang.String, java.lang.String)public int getCreateTypeId(CmsObject cms, java.lang.String collectorName, java.lang.String param)
I_CmsResourceCollectorReturns -1 if creation of new items is not supported.
getCreateTypeId 在接口中 I_CmsResourceCollectorcms - the current CmsObjectcollectorName - the name of the collector to useparam - an optional collector parameterI_CmsResourceCollector.getCreateTypeId(org.opencms.file.CmsObject, java.lang.String, java.lang.String)public java.lang.String getCreateParam(CmsObject cms)
I_CmsResourceCollectorI_CmsResourceCollector.getCreateLink(CmsObject, String, String) method.
If this method returns null,
it indicates that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
getCreateParam 在接口中 I_CmsResourceCollectorcms - the current CmsObjectI_CmsResourceCollector.getCreateLink(CmsObject, String, String) method, or nullI_CmsResourceCollector.getCreateParam(org.opencms.file.CmsObject)public java.lang.String getCreateParam(CmsObject cms, java.lang.String collectorName, java.lang.String param)
I_CmsResourceCollectorI_CmsResourceCollector.getCreateLink(CmsObject, String, String) method.
If this method returns null,
it indicates that the selected collector implementation does not support a "create link",
and so no "new" button will should shown on lists generated with this collector.
getCreateParam 在接口中 I_CmsResourceCollectorcms - the current CmsObjectcollectorName - the name of the collector to useparam - an optional collector parameter from the current page contextI_CmsResourceCollector.getCreateLink(CmsObject, String, String) method, or nullI_CmsResourceCollector.getCreateParam(org.opencms.file.CmsObject, java.lang.String, java.lang.String)public java.lang.String getDefaultCollectorName()
I_CmsResourceCollectorgetDefaultCollectorName 在接口中 I_CmsResourceCollectorI_CmsResourceCollector.getDefaultCollectorName()public java.lang.String getDefaultCollectorParam()
I_CmsResourceCollectorgetDefaultCollectorParam 在接口中 I_CmsResourceCollectorI_CmsResourceCollector.getDefaultCollectorParam()public java.util.List<CmsListItem> getListItems(java.lang.String parameter) throws CmsException
getListItems 在接口中 I_CmsListResourceCollectorparameter - the collector parameter or null for default.CmsListItem objectsCmsException - if something goes wrongpublic int getOrder()
I_CmsResourceCollectorThe "order weight" is important because two collector classes may provide a collector with the same name. If this is the case, the collector implementation with the higher order number "overrules" the lower order number class.
getOrder 在接口中 I_CmsResourceCollectorI_CmsResourceCollector.getOrder()public CmsResource getResource(CmsObject cms, CmsListItem item)
getResource 在接口中 I_CmsListResourceCollectorcms - the cms objectitem - the itempublic abstract java.util.List<CmsResource> getResources(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params) throws CmsException
Be sure to cache the resources.
getResources 在接口中 I_CmsListResourceCollectorcms - the cms objectparams - the parameter mapCmsResource objectsCmsException - if something goes wrongpublic java.util.List<CmsResource> getResults(CmsObject cms) throws CmsException
I_CmsResourceCollectorCmsResource Objects that are
gathered in the VFS using the default collector name and parameter.getResults 在接口中 I_CmsResourceCollectorcms - the current CmsObjectCmsException - if something goes wrongCmsDataAccessException - if the parameter attribute of the corresponding collector tag is invalidI_CmsResourceCollector.getResults(org.opencms.file.CmsObject)public java.util.List<CmsResource> getResults(CmsObject cms, java.lang.String collectorName, java.lang.String parameter) throws CmsException
getResults 在接口中 I_CmsResourceCollectorcms - the current CmsObjectcollectorName - the name of the collector to useparameter - an optional collector parameterCmsException - if something goes wrongCmsDataAccessException - if the parameter attribute of the corresponding collector tag is invalidI_CmsResourceCollector.getResults(org.opencms.file.CmsObject, java.lang.String, java.lang.String)public A_CmsListExplorerDialog getWp()
getWp 在接口中 I_CmsListResourceCollectorpublic void setDefaultCollectorName(java.lang.String collectorName)
I_CmsResourceCollectorsetDefaultCollectorName 在接口中 I_CmsResourceCollectorcollectorName - the default collector nameI_CmsResourceCollector.setDefaultCollectorName(java.lang.String)public void setDefaultCollectorParam(java.lang.String param)
setDefaultCollectorParam 在接口中 I_CmsResourceCollectorparam - the default collector parameterI_CmsResourceCollector.setDefaultCollectorParam(java.lang.String)public void setOrder(int order)
I_CmsResourceCollectorsetOrder 在接口中 I_CmsResourceCollectororder - the order weight to setI_CmsResourceCollector.setOrder(int)public void setPage(int page)
setPage 在接口中 I_CmsListResourceCollectorpage - the new display pageprotected CmsListItem createResourceListItem(CmsResource resource, CmsHtmlList list, boolean showPermissions, boolean showDateLastMod, boolean showUserLastMod, boolean showDateCreate, boolean showUserCreate, boolean showDateRel, boolean showDateExp, boolean showState, boolean showLockedBy, boolean showSite)
resource - the resource to create the list item fromlist - the listshowPermissions - if to show permissionsshowDateLastMod - if to show the last modification dateshowUserLastMod - if to show the last modification usershowDateCreate - if to show the creation dateshowUserCreate - if to show the creation dateshowDateRel - if to show the date releasedshowDateExp - if to show the date expiredshowState - if to show the stateshowLockedBy - if to show the lock usershowSite - if to show the siteprotected CmsListItem getDummyListItem(CmsHtmlList list)
list - the list object to create the entry forprotected java.util.List<CmsResource> getInternalResources(CmsObject cms, java.util.Map<java.lang.String,java.lang.String> params) throws CmsException
getResources(CmsObject, Map).cms - the cms objectparams - the parameter mapgetResources(CmsObject, Map)CmsException - if something goes wrongprotected java.util.List<java.lang.String> getResourceNamesFromParam(java.util.Map<java.lang.String,java.lang.String> params)
params - the parameter mapI_CmsListResourceCollector.PARAM_RESOURCESprotected CmsListState getState(java.util.Map<java.lang.String,java.lang.String> params)
params - the parameter mapprotected abstract void setAdditionalColumns(CmsListItem item, CmsResourceUtil resUtil)
Overwrite this method to set additional column entries.
item - the current list itemresUtil - the resource util object for getting the info fromprotected void setResourcesParam(java.util.List<java.lang.String> resources)
resources - the list of resource names to use