Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.webcenter.portalframework.genericsiteresources
Class GenericSiteResourceQueryOptions

java.lang.Object
  extended by oracle.webcenter.portalframework.genericsiteresources.GenericSiteResourceQueryOptions


public class GenericSiteResourceQueryOptions
extends java.lang.Object

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:
&nbsp singleResult - to return only a single resource as query result. null is returned in case no matching resource is found,

&nbsp 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()
           

 

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 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 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

ALL_SCOPES

public static oracle.webcenter.framework.service.Scope ALL_SCOPES

Constructor Detail

GenericSiteResourceQueryOptions

public GenericSiteResourceQueryOptions()

Method Detail

setId

public void setId(java.lang.String id)
Sets the value of resource Id to search for.

EL: #{srmContext[wCond['id']['like'][resourceId]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
resourceId - Id of the resource.

getId

public java.lang.String getId()
Gets the value of resource Id to search for.
Returns:
resourceId Id of the resource.

setCategory

public void setCategory(java.lang.String category)
Sets the value of category in which search will be performed.

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]

Parameters:
resource - resource category

getCategory

public java.lang.String getCategory()
Gets the value of the resource category.
Returns:
category of the resource.

setDisplayName

public void setDisplayName(java.lang.String displayName)
Sets the value of display name of the resource.

EL: #{srmContext[wCond['displayName']['like'][displayName]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
displayName - the Display Name of the resource to search for

getDisplayName

public java.lang.String getDisplayName()
Gets the value of DisplayName.
Returns:
DisplayName of the resource.

setDisplayNameKey

public void setDisplayNameKey(java.lang.String displayNameKey)
Sets the value of display name key corresponding to display name of the resource.

EL: #{srmContext[wCond['displayNameKey']['like'][displayNameKey]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
displayNameKey - the key in xsrt file for resource display name

getDisplayNameKey

public java.lang.String getDisplayNameKey()
Gets the value of DisplayNameKey.
Returns:
DisplayNameKey of the resource.

setDescription

public void setDescription(java.lang.String discription)
Sets the description of the resource.

EL: #{srmContext[wCond['description']['like'][resourceDescription]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
description - the description of the resource to search for

getDescription

public java.lang.String getDescription()
Gets the Description of the resource.
Returns:
Description of the resource.

setDescriptionKey

public void setDescriptionKey(java.lang.String discriptionKey)
Sets the value of description key corresponding to description of the resource.

EL: #{srmContext[wCond['descriptionKey']['like'][descriptionKey]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
descriptionKey - the key in xsrt file for resource description

getDescriptionKey

public java.lang.String getDescriptionKey()
Gets the DescriptionKey of the resource.
Returns:
DescriptionKey of the resource.

setContentDirectory

public void setContentDirectory(java.lang.String contentDirectory)
Sets the location or content directory info for the resource.

EL: #{srmContext[wCond['contentDirectory']['like'][contentDirectory]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
contentDirectory - the directory location where resource content is stored.

getContentDirectory

public java.lang.String getContentDirectory()
Gets the Content Directory of the resource.
Returns:
Content Directory location of the resource.

setMetadataFile

public void setMetadataFile(java.lang.String metadataFile)
Sets the metadata file location for the resource.

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]

Parameters:
metadataFile - the location of the metadata file

getMetadataFile

public java.lang.String getMetadataFile()
Gets the Metadata file location of the resource.
Returns:
Metadata file location of the resource

setJspx

public void setJspx(java.lang.String jspx)
Sets the jspx file location for the resource.

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]

Parameters:
jspx - the location of the jspx file

getJspx

public java.lang.String getJspx()
Gets the jspx file location for the resource.
Returns:
jspx file location

setPageDef

public void setPageDef(java.lang.String pageDef)
Sets the page definition of the resource page.

EL: #{srmContext[wCond['pageDef']['like'][pageDefinition]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
pageDef - the page definition of the resource in case the resource is a jspx page

getPageDef

public java.lang.String getPageDef()
Gets the page definition of the resource page.
Returns:
page definition of the resource page

setIconURI

public void setIconURI(java.lang.String iconURI)
Sets the resource icon URI.

EL: #{srmContext[wCond['iconURI']['like'][iconURI]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
URI - the URI string for the icon image

getIconURI

public java.lang.String getIconURI()
Gets the resource icon URI for icon.
Returns:
icon URI

setExcludeFrom

public void setExcludeFrom(java.lang.String excludeFrom)
Sets exclution for the resource from scopes.

EL: #{srmContext[wCond['excludeFrom']['like'][excludeFrom]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
excludeFrom - the scopes from where the resource will be excluded

getExcludeFrom

public java.lang.String getExcludeFrom()
Gets exclution for the resource from scopes.
Returns:
exclution for the resource from scopes

setUsesCustomSecurity

public void setUsesCustomSecurity(java.lang.Boolean usesCustomSecurity)
Sets whether custom security is used for resource security.

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]

Parameters:
usesCustomSecurity - the value indicating if custom security is enabled for this resource

isUsesCustomSecurity

public java.lang.Boolean isUsesCustomSecurity()
Check whether custom security is used for resource security.
Returns:
the value of property UsesCustomSecurity

setSeeded

public void setSeeded(java.lang.Boolean seeded)
Sets whether resource is seeded resource.

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]

Parameters:
seeded - the value indicating if the resource is seeded type

isSeeded

public java.lang.Boolean isSeeded()
Check whether the resource is a seeded type resource.
Returns:
the value of property seeded

setVisibleType

public void setVisibleType(java.util.List<SRMConstants.ResourceVisibility> visibleType)
Sets the visibility of the resource.

EL: #{srmContext[wCond['visibleType']['like'][visibleType]]}
[Note: Refer to class level documentation for complete details on EL based Query]


Example: #{srmContext[wCond['visibleType']['like']['TRUE']]} will set resource to be visible in the scope. Other possible options are FALSE, to hide the resource and NEVER to never show the resource.
Parameters:
List<SRMConstants.ResourceVisibility> - the list of enum values for visibility options for resource

getVisibleType

public java.util.List<SRMConstants.ResourceVisibility> getVisibleType()
Gets the Visible Type for the resource.
Returns:
List of visible type options

setVisible

public void setVisible(java.lang.Boolean visible)
Sets the visibility of the resource to either TRUE or FALSE.

EL: #{srmContext[wCond['visible']['like'][visible]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
visible - the visibility value

isVisible

public java.lang.Boolean isVisible()
Check whether the resource is visible.
Returns:
the value of property visible

setCreatedBy

public void setCreatedBy(java.lang.String createdBy)
Sets the name of the creator of the resource.

EL: #{srmContext[wCond['createdBy']['like'][resourceCreator]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
resourceCreator - the creator of the resource

getCreatedBy

public java.lang.String getCreatedBy()
Gets the name of the resource creator.
Returns:
value of property createdBy.

setCreatedDate

public void setCreatedDate(java.util.Date createdDate)
Sets the date the creation of the resource.

EL: #{srmContext[wCond['createdDate']['like'][creationDate]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
createdDate - the date on which the resource was created

getCreatedDate

public java.util.Date getCreatedDate()
Gets the date of the resource creation.
Returns:
value of property createdDate.

setModifiedBy

public void setModifiedBy(java.lang.String modifiedBy)
Sets the name of the user who modified the resource.

EL: #{srmContext[wCond['modifiedBy']['like'][modifiedBy]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
modifiedBy - the name of user who midified this resource

getModifiedBy

public java.lang.String getModifiedBy()
Gets the name of the resource creator.
Returns:
value of property createdBy.

setModifiedDate

public void setModifiedDate(java.util.Date modifiedDate)
Sets the date when resource was modified.

EL: #{srmContext[wCond['modifiedDate']['like'][modifiedDate]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
modifiedDate - the date on which the resource was modified

getModifiedDate

public java.util.Date getModifiedDate()
Gets the Modified Date.
Returns:
value of property modifiedDate.

setLockedBy

public void setLockedBy(java.lang.String lockedBy)
Sets the name of the user who locked the resource.

EL: #{srmContext[wCond['lockedBy']['like'][lockedBy]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
lockedBy - the name of user who locked this resource

getLockedBy

public java.lang.String getLockedBy()
Gets the name of the user who locked this resource
Returns:
value of property lockedBy.

setLockedDate

public void setLockedDate(java.util.Date lockedDate)
Sets the date when resource was locked.

EL: #{srmContext[wCond['lockedDate']['like'][lockedDate]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
lockedDate - the date on which the resource was locked

getLockedDate

public java.util.Date getLockedDate()
Gets the Locked Date.
Returns:
value of property lockedDate.

setResourceType

public void setResourceType(java.lang.String resourceType)
Sets the type of the resource.

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]

Parameters:
resourceType - the type of the resource GenericSiteResourceTypes

getResourceType

public java.lang.String getResourceType()
Gets the resource type name.
Returns:
value of property resourceType.

setVersion

public void setVersion(java.lang.String version)
Sets the application version in which resource was created.

EL: #{srmContext[wCond['version']['like'][version]]}
[Note: Refer to class level documentation for complete details on EL based Query]

Parameters:
version - the spaces application version

getVersion

public java.lang.String getVersion()
Gets the version name.
Returns:
value of property version.

setResourceScope

public void setResourceScope(oracle.webcenter.framework.service.Scope resourceScope)
Sets the access scope of the resource.

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]

Parameters:
resourceScope - the resource scope

getResourceScope

public oracle.webcenter.framework.service.Scope getResourceScope()
Gets the resource scope.
Returns:
value of property resourceScope.

setSearchType

public void setSearchType(GenericSiteResourceQueryOptions.SearchTypes searchType)
Sets the type of search to be performed on resources.

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]

Parameters:
searchType - the type of search to be performed

getSearchType

public GenericSiteResourceQueryOptions.SearchTypes getSearchType()

setScopeOnly

public void setScopeOnly(boolean scopeOnly)
Sets a flag to choose, whether only scope level resources have to be retrieved

isScopeOnly

public boolean isScopeOnly()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setSortBy

public void setSortBy(SRMConstants.SortBy sortBy)
Sets the property on which the result will be sorted.
Parameters:
sortBy - enum values for sortBy for result list..

getSortBy

public SRMConstants.SortBy getSortBy()
Gets the property on which the result will be sorted.
Returns:
value of property sortBy.

setSortOrder

public void setSortOrder(SRMConstants.SortOrder sortOrder)
Sets the order in which the result will be sorted.
Parameters:
sortOrder - enum values for sortOrder for result list.

getSortOrder

public SRMConstants.SortOrder getSortOrder()
Gets the order in which the result will be sorted.
Returns:
value of property sortOrder.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.