|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.0) E15995-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.webcenter.portalframework.genericsiteresources.GenericSiteResourceQueryOptions
public class GenericSiteResourceQueryOptions
This class exposes all the query options which can be used in combinations to search for a resource.
Querying resource(s) through API:
An instance of this class is used as a parameter to GenericSiteResourcesManager.getResources(MDSSession, GenericSiteResourceQueryOptions)
method.
So when one want to query for resource(s), he wourld, - Create an instance of GenericSiteResourceQueryOptions. - Set all the query parameters on it. - Call Managet.getResources to get the result set. Code E.g. GenericSiteResourcesManager manager = getManager(); GenericSiteResourceQueryOptions queryOptions = new GenericSiteResourceQueryOptions(); queryOptions.setResourceScope(this.scope); queryOptions.setResourceType(this.resType);
// get all the site templates List<GenericSiteResource> siteTemplates = manager.getResources(this.mdsSession, queryOptions);
Quering resource(s) through Expression Language:
It is possible to query for resource(s) through EL also. All the methods of this class are Expression Language compliant and are available to be used for EL based query.
Querying for a resource through EL is similar to querying for it through API calls, meaning you need to set the query parameter(s) as a conjunction of condition expressions in the format [wCond['p1']['like']['v1'] ['and'] [wCond['p2']['like']['v2']] ['and'] [wCond['p3']['like']['v3']] ...] where p1, p2, p3, ... are names of resource attributes e.g. id, resourceScope etc and v1, v2, v3, ... are the search values for the respective attributes.
Query can result into single result or multiple results and a query designer needs to mandatorily decide what s/he wants. He decides that by using one of the following values:
  singleResult - to return only a single resource as query result. null is returned in case no matching resource is found,
  resultList - to return a list of resources as query result. empty list is returned in case no matching resource is found.
[NOTE: occurences of singleResult or resultList in the EL is used internally as the query end point and query is immediately executed after this. So, anything set after this might result into unexpected behaviour.]
Example-1:
#{srmContext[wCond['resourceType']['like']['siteTemplate'] ['and'] [wCond['displayName']['like']['myPage']] ].singleResult}
will return the first page template resource with display name containing 'myPage'.
Example-2:
#{srmContext[wCond['resourceType']['like']['siteTemplate'] ['and'] [wCond['description']['like']['sampleDesc']] ['and'] [wCond['contentDirectory']['like']['resourceDir']] ].resultList}
will return a list of page template resources residing in 'resourceDir' with description containing 'sampleDesc'.
A property of the object(s) returned by this expression is any attribute of the resource that it(they) represent(s). Example of property are: Id DisplayName iconURI contentDirectory
etc.
While the value of the property can be an explicit value or an EL expression reterning that type of property.
Example:
following two query may return the same result.
#{srmContext[wCond['id']['like']['resourceIdForCurrentSpacePageTemplate']].singleResult}
#{srmContext[wCond['id']['like'][spacesContext.currentSpace.uiMetadata.siteTemplateId]].singleResult}
The condition expressions used for querying resources can be conjuncted in any order, e.g. the following two queries should evaluate to the same result -
#{srmContext[wCond['resourceScope']['like'][scopeName] ['and'] [wCond['id']['like'][resourceId]] ].singleResult}
#{srmContext[wCond['id']['like'][resourceId] ['and'] [wCond['resourceScope']['like'][scopeName]] ].singleResult}
Nested Class Summary | |
---|---|
static class |
GenericSiteResourceQueryOptions.PROPERTY_NAME |
static class |
GenericSiteResourceQueryOptions.SearchTypes |
Field Summary | |
---|---|
static oracle.webcenter.framework.service.Scope |
ALL_SCOPES |
Constructor Summary | |
---|---|
GenericSiteResourceQueryOptions() |
|
GenericSiteResourceQueryOptions(oracle.webcenter.framework.service.Scope scope) |
Method Summary | |
---|---|
java.lang.String |
getCategory() Gets the value of the resource category. |
java.lang.String |
getContentDirectory() Gets the Content Directory of the resource. |
java.lang.String |
getCreatedBy() Gets the name of the resource creator. |
java.util.Date |
getCreatedDate() Gets the date of the resource creation. |
java.lang.String |
getDescription() Gets the Description of the resource. |
java.lang.String |
getDescriptionKey() Gets the DescriptionKey of the resource. |
java.lang.String |
getDiagram() Gets the diagram of the resource scenario. |
java.lang.String |
getDisplayName() Gets the value of DisplayName. |
java.lang.String |
getDisplayNameKey() Gets the value of DisplayNameKey. |
java.lang.String |
getExcludeFrom() Gets exclution for the resource from scopes. |
java.lang.String |
getIconURI() Gets the resource icon URI for icon. |
java.lang.String |
getId() Gets the value of resource Id to search for. |
java.lang.String |
getJspx() Gets the jspx file location for the resource. |
java.lang.String |
getLockedBy() Gets the name of the user who locked this resource |
java.util.Date |
getLockedDate() Gets the Locked Date. |
java.lang.String |
getMetadataFile() Gets the Metadata file location of the resource. |
java.lang.String |
getModifiedBy() Gets the name of the resource creator. |
java.util.Date |
getModifiedDate() Gets the Modified Date. |
java.lang.String |
getPageDef() Gets the page definition of the resource page. |
oracle.webcenter.framework.service.Scope |
getResourceScope() Gets the resource scope. |
java.lang.String |
getResourceType() Gets the resource type name. |
GenericSiteResourceQueryOptions.SearchTypes |
getSearchType() |
SRMConstants.SortBy |
getSortBy() Gets the property on which the result will be sorted. |
SRMConstants.SortOrder |
getSortOrder() Gets the order in which the result will be sorted. |
java.lang.String |
getVersion() Gets the version name. |
java.util.List<SRMConstants.ResourceVisibility> |
getVisibleType() Gets the Visible Type for the resource. |
boolean |
isScopeOnly() |
java.lang.Boolean |
isSeeded() Check whether the resource is a seeded type resource. |
java.lang.Boolean |
isUsesCustomSecurity() Check whether custom security is used for resource security. |
java.lang.Boolean |
isVisible() Check whether the resource is visible. |
void |
setCategory(java.lang.String category) Sets the value of category in which search will be performed. |
void |
setContentDirectory(java.lang.String contentDirectory) Sets the location or content directory info for the resource. |
void |
setCreatedBy(java.lang.String createdBy) Sets the name of the creator of the resource. |
void |
setCreatedDate(java.util.Date createdDate) Sets the date the creation of the resource. |
void |
setDescription(java.lang.String discription) Sets the description of the resource. |
void |
setDescriptionKey(java.lang.String discriptionKey) Sets the value of description key corresponding to description of the resource. |
void |
setDiagram(java.lang.String diagram) Sets the diagram of the scenario metadata. |
void |
setDisplayName(java.lang.String displayName) Sets the value of display name of the resource. |
void |
setDisplayNameKey(java.lang.String displayNameKey) Sets the value of display name key corresponding to display name of the resource. |
void |
setExcludeFrom(java.lang.String excludeFrom) Sets exclution for the resource from scopes. |
void |
setIconURI(java.lang.String iconURI) Sets the resource icon URI. |
void |
setId(java.lang.String id) Sets the value of resource Id to search for. |
void |
setJspx(java.lang.String jspx) Sets the jspx file location for the resource. |
void |
setLockedBy(java.lang.String lockedBy) Sets the name of the user who locked the resource. |
void |
setLockedDate(java.util.Date lockedDate) Sets the date when resource was locked. |
void |
setMetadataFile(java.lang.String metadataFile) Sets the metadata file location for the resource. |
void |
setModifiedBy(java.lang.String modifiedBy) Sets the name of the user who modified the resource. |
void |
setModifiedDate(java.util.Date modifiedDate) Sets the date when resource was modified. |
void |
setPageDef(java.lang.String pageDef) Sets the page definition of the resource page. |
void |
setResourceScope(oracle.webcenter.framework.service.Scope resourceScope) Sets the access scope of the resource. |
void |
setResourceType(java.lang.String resourceType) Sets the type of the resource. |
void |
setScopeOnly(boolean scopeOnly) Sets a flag to choose, whether only scope level resources have to be retrieved |
void |
setSearchType(GenericSiteResourceQueryOptions.SearchTypes searchType) Sets the type of search to be performed on resources. |
void |
setSeeded(java.lang.Boolean seeded) Sets whether resource is seeded resource. |
void |
setSortBy(SRMConstants.SortBy sortBy) Sets the property on which the result will be sorted. |
void |
setSortOrder(SRMConstants.SortOrder sortOrder) Sets the order in which the result will be sorted. |
void |
setUsesCustomSecurity(java.lang.Boolean usesCustomSecurity) Sets whether custom security is used for resource security. |
void |
setVersion(java.lang.String version) Sets the application version in which resource was created. |
void |
setVisible(java.lang.Boolean visible) Sets the visibility of the resource to either TRUE or FALSE. |
void |
setVisibleType(java.util.List<SRMConstants.ResourceVisibility> visibleType) Sets the visibility of the resource. |
java.lang.String |
toString() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static oracle.webcenter.framework.service.Scope ALL_SCOPES
Constructor Detail |
---|
public GenericSiteResourceQueryOptions()
public GenericSiteResourceQueryOptions(oracle.webcenter.framework.service.Scope scope)
Method Detail |
---|
public void setId(java.lang.String id)
EL: #{srmContext[wCond['id']['like'][resourceId]]}
[Note: Refer to class level documentation for complete details on EL based Query]
resourceId
- Id of the resource.public java.lang.String getId()
public void setCategory(java.lang.String category)
EL: #{srmContext[wCond['category']['like'][categoryName]]}
Example: #{srmContext[wCond['category']['like']['siteTemplates']]} will set category to siteTemplates.
[Note: Refer to class level documentation for complete details on EL based Query]
resource
- resource categorypublic java.lang.String getCategory()
public void setDisplayName(java.lang.String displayName)
EL: #{srmContext[wCond['displayName']['like'][displayName]]}
[Note: Refer to class level documentation for complete details on EL based Query]
displayName
- the Display Name of the resource to search forpublic java.lang.String getDisplayName()
public void setDisplayNameKey(java.lang.String displayNameKey)
EL: #{srmContext[wCond['displayNameKey']['like'][displayNameKey]]}
[Note: Refer to class level documentation for complete details on EL based Query]
displayNameKey
- the key in xsrt file for resource display namepublic java.lang.String getDisplayNameKey()
public void setDescription(java.lang.String discription)
EL: #{srmContext[wCond['description']['like'][resourceDescription]]}
[Note: Refer to class level documentation for complete details on EL based Query]
description
- the description of the resource to search forpublic java.lang.String getDescription()
public void setDescriptionKey(java.lang.String discriptionKey)
EL: #{srmContext[wCond['descriptionKey']['like'][descriptionKey]]}
[Note: Refer to class level documentation for complete details on EL based Query]
descriptionKey
- the key in xsrt file for resource descriptionpublic java.lang.String getDescriptionKey()
public void setContentDirectory(java.lang.String contentDirectory)
EL: #{srmContext[wCond['contentDirectory']['like'][contentDirectory]]}
[Note: Refer to class level documentation for complete details on EL based Query]
contentDirectory
- the directory location where resource content is stored.public java.lang.String getContentDirectory()
public void setMetadataFile(java.lang.String metadataFile)
EL: #{srmContext[wCond['metadataFile']['like'][metadataFileLocation]]}
Example: #{srmContext[wCond['metadataFile']['like'][/home/metadat/data.xml]]} will set metadata file location to /home/metadat/data.xml.
[Note: Refer to class level documentation for complete details on EL based Query]
metadataFile
- the location of the metadata filepublic java.lang.String getMetadataFile()
public void setJspx(java.lang.String jspx)
EL: #{srmContext[wCond['jspx']['like'][metadataFileLocation]]}
Example: #{srmContext[wCond['jspx']['like'][/home/web/page.jspx]]} will set category to /home/web/page.jspx.
[Note: Refer to class level documentation for complete details on EL based Query]
jspx
- the location of the jspx filepublic java.lang.String getJspx()
public void setPageDef(java.lang.String pageDef)
EL: #{srmContext[wCond['pageDef']['like'][pageDefinition]]}
[Note: Refer to class level documentation for complete details on EL based Query]
pageDef
- the page definition of the resource in case the resource is a jspx pagepublic java.lang.String getPageDef()
public void setDiagram(java.lang.String diagram)
diagram
- the diagram of the resource in case the resource is a scenariopublic java.lang.String getDiagram()
public void setIconURI(java.lang.String iconURI)
EL: #{srmContext[wCond['iconURI']['like'][iconURI]]}
[Note: Refer to class level documentation for complete details on EL based Query]
URI
- the URI string for the icon imagepublic java.lang.String getIconURI()
public void setExcludeFrom(java.lang.String excludeFrom)
EL: #{srmContext[wCond['excludeFrom']['like'][excludeFrom]]}
[Note: Refer to class level documentation for complete details on EL based Query]
excludeFrom
- the scopes from where the resource will be excludedpublic java.lang.String getExcludeFrom()
public void setUsesCustomSecurity(java.lang.Boolean usesCustomSecurity)
EL: #{srmContext[wCond['usesCustomSecurity']['like'][usesCustomSecurity]]}
Example: #{srmContext[wCond['usesCustomSecurity']['like'][TRUE]]} will set usesCustomSecurity to TRUE.
[Note: Refer to class level documentation for complete details on EL based Query]
usesCustomSecurity
- the value indicating if custom security is enabled for this resourcepublic java.lang.Boolean isUsesCustomSecurity()
public void setSeeded(java.lang.Boolean seeded)
EL: #{srmContext[wCond['seeded']['like'][seeded]]}
Example: #{srmContext[wCond['seeded']['like'][TRUE]]} will set seeded to TRUE.
[Note: Refer to class level documentation for complete details on EL based Query]
seeded
- the value indicating if the resource is seeded typepublic java.lang.Boolean isSeeded()
public void setVisibleType(java.util.List<SRMConstants.ResourceVisibility> visibleType)
EL: #{srmContext[wCond['visibleType']['like'][visibleType]]}
[Note: Refer to class level documentation for complete details on EL based Query]
List<SRMConstants.ResourceVisibility>
- the list of enum values for visibility options for resourcepublic java.util.List<SRMConstants.ResourceVisibility> getVisibleType()
public void setVisible(java.lang.Boolean visible)
EL: #{srmContext[wCond['visible']['like'][visible]]}
[Note: Refer to class level documentation for complete details on EL based Query]
visible
- the visibility valuepublic java.lang.Boolean isVisible()
public void setCreatedBy(java.lang.String createdBy)
EL: #{srmContext[wCond['createdBy']['like'][resourceCreator]]}
[Note: Refer to class level documentation for complete details on EL based Query]
resourceCreator
- the creator of the resourcepublic java.lang.String getCreatedBy()
public void setCreatedDate(java.util.Date createdDate)
EL: #{srmContext[wCond['createdDate']['like'][creationDate]]}
[Note: Refer to class level documentation for complete details on EL based Query]
createdDate
- the date on which the resource was createdpublic java.util.Date getCreatedDate()
public void setModifiedBy(java.lang.String modifiedBy)
EL: #{srmContext[wCond['modifiedBy']['like'][modifiedBy]]}
[Note: Refer to class level documentation for complete details on EL based Query]
modifiedBy
- the name of user who midified this resourcepublic java.lang.String getModifiedBy()
public void setModifiedDate(java.util.Date modifiedDate)
EL: #{srmContext[wCond['modifiedDate']['like'][modifiedDate]]}
[Note: Refer to class level documentation for complete details on EL based Query]
modifiedDate
- the date on which the resource was modifiedpublic java.util.Date getModifiedDate()
public void setLockedBy(java.lang.String lockedBy)
EL: #{srmContext[wCond['lockedBy']['like'][lockedBy]]}
[Note: Refer to class level documentation for complete details on EL based Query]
lockedBy
- the name of user who locked this resourcepublic java.lang.String getLockedBy()
public void setLockedDate(java.util.Date lockedDate)
EL: #{srmContext[wCond['lockedDate']['like'][lockedDate]]}
[Note: Refer to class level documentation for complete details on EL based Query]
lockedDate
- the date on which the resource was lockedpublic java.util.Date getLockedDate()
public void setResourceType(java.lang.String resourceType)
EL: #{srmContext[wCond['resourceType']['like'][resourceType]]}
Example: #{srmContext[wCond['resourceType']['like']['siteTemplate']]} will set resource type to siteTemplate. All resource types are listed in GenericSiteResourceTypes class.
[Note: Refer to class level documentation for complete details on EL based Query]
resourceType
- the type of the resource GenericSiteResourceTypes
public java.lang.String getResourceType()
public void setVersion(java.lang.String version)
EL: #{srmContext[wCond['version']['like'][version]]}
[Note: Refer to class level documentation for complete details on EL based Query]
version
- the spaces application versionpublic java.lang.String getVersion()
public void setResourceScope(oracle.webcenter.framework.service.Scope resourceScope)
EL: #{srmContext[wCond['resourceScope']['like']['scopeName']]}
Example: #{srmContext[wCond['resourceScope']['like']['groupSpace']]} will set scope to groupSpace. For default scope, the scope name is'defaultScope'.
[Note: Refer to class level documentation for complete details on EL based Query]
resourceScope
- the resource scopepublic oracle.webcenter.framework.service.Scope getResourceScope()
public void setSearchType(GenericSiteResourceQueryOptions.SearchTypes searchType)
EL: #{srmContext[wCond['searchType']['like'][searchType]]}
Example: #{srmContext[wCond['searchType']['like']['EQUALS']]} will perform the exact search on the resource.
[Note: Refer to class level documentation for complete details on EL based Query]
searchType
- the type of search to be performedpublic GenericSiteResourceQueryOptions.SearchTypes getSearchType()
public void setScopeOnly(boolean scopeOnly)
public boolean isScopeOnly()
public java.lang.String toString()
toString
in class java.lang.Object
public void setSortBy(SRMConstants.SortBy sortBy)
sortBy
- enum values for sortBy for result list..public SRMConstants.SortBy getSortBy()
public void setSortOrder(SRMConstants.SortOrder sortOrder)
sortOrder
- enum values for sortOrder for result list.public SRMConstants.SortOrder getSortOrder()
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.0) E15995-07 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |