atg.repository
Interface RepositoryView

All Known Subinterfaces:
NamedQueryView, ParameterSupportView, SecuredRepositoryView
All Known Implementing Classes:
IntegrationRepositoryView, RepositoryViewImpl

public interface RepositoryView

The RepositoryView defines a constrained representation of the entire Repository. It is used to perform query operations into the repository and defines the known RepositoryItemDescriptor for the view.

Sets of RepositoryItems can be gathered by queries which can be built up from the QueryBuilder interface. Once a query is built each RepositoryView implementation will translate the data structure into it's native query language (e.g. SQL) and then return an array of RepositoryItems which match the supplied criteria.

The RepositoryView impl returned can also implement RepositoryViewContainer if the Repository needs to express a hierarchy of RepositoryViews. For example a document management system may have a root view for all "documents." From that you may have sub-document types like "whitepapers," "promo blurbs", "images," etc. Further, the sub-view "images" may also have a refinement for specifics types like "JPEG" and "GIF." The QueryBuilder for each sub-view may decide to limit the query scope.

In a content management system you may have different views that constrain queries (e.g. target content that are just white papers).


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 int executeCountQuery(Query pQuery)
          Executes a query that returns the number of items that would be returned by given query.
 RepositoryItem[] executeQuery(Query pQuery)
          Executes the given query and returns an array of the matching RepositoryItems (not ids)
 RepositoryItem[] executeQuery(Query pQuery, int pStartingIndex)
          Executes the given query and returns an array of matching RepositoryItems, beginning at the starting index element.
 RepositoryItem[] executeQuery(Query pQuery, int pStartingIndex, int pEndingIndex)
          Executes the given query and returns an array of matching RepositoryItems, which are contained within a total potential result set.
 RepositoryItem[] executeQuery(Query pQuery, int pStartingIndex, int pEndingIndex, SortDirectives pSortDirectives)
          Executes the given query and returns an array of matching RepositoryItems, which are contained within a total potential result set.
 RepositoryItem[] executeQuery(Query pQuery, int pStartingIndex, SortDirectives pSortDirectives)
          Executes the given query and returns an array of matching RepositoryItems, beginning at the starting index element.
 RepositoryItem[] executeQuery(Query pQuery, QueryOptions pQueryOptions)
          Executes the given query and returns an array of the matching RepositoryItems (not ids)
 RepositoryItem[] executeQuery(Query pQuery, SortDirectives pSortDirectives)
          Executes the given query and returns an array of the matching RepositoryItems (not ids)
 RepositoryItemDescriptor getItemDescriptor()
          Returns the RepositoryItemDescriptor property, which describes the known properties for all the items in the view
 QueryBuilder getQueryBuilder()
          Returns a QueryBuilder to use for creating Query objects
 java.lang.String getViewName()
          Returns the name of the RepositoryView
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

getViewName

java.lang.String getViewName()
Returns the name of the RepositoryView


getItemDescriptor

RepositoryItemDescriptor getItemDescriptor()
                                           throws RepositoryException
Returns the RepositoryItemDescriptor property, which describes the known properties for all the items in the view

Throws:
RepositoryException

getQueryBuilder

QueryBuilder getQueryBuilder()
Returns a QueryBuilder to use for creating Query objects

Returns:
null if the RepositoryView does not support query operations

executeQuery

RepositoryItem[] executeQuery(Query pQuery)
                              throws RepositoryException
Executes the given query and returns an array of the matching RepositoryItems (not ids)

Parameters:
pQuery - the query to execute
Returns:
null if no items could be found to match the query or if the RepositoryView does not support query operations
Throws:
RepositoryException - if there is an error while performing the query operation

executeQuery

RepositoryItem[] executeQuery(Query pQuery,
                              SortDirectives pSortDirectives)
                              throws RepositoryException
Executes the given query and returns an array of the matching RepositoryItems (not ids)

Parameters:
pQuery - the query to execute
pSortDirectives - the directives to sort the result set with
Returns:
null if no items could be found to match the query or if the RepositoryView does not support query operations
Throws:
RepositoryException - if there is an error while performing the query operation

executeQuery

RepositoryItem[] executeQuery(Query pQuery,
                              int pStartingIndex)
                              throws RepositoryException
Executes the given query and returns an array of matching RepositoryItems, beginning at the starting index element.

Parameters:
pQuery - the query to execute
pStartingIndex - the beginning index, inclusive
Returns:
null if no items could be found to match the query or if the RepositoryView does not support query operations
Throws:
RepositoryException - if there is an error while performing the query operation

executeQuery

RepositoryItem[] executeQuery(Query pQuery,
                              int pStartingIndex,
                              SortDirectives pSortDirectives)
                              throws RepositoryException
Executes the given query and returns an array of matching RepositoryItems, beginning at the starting index element.

Parameters:
pQuery - the query to execute
pStartingIndex - the beginning index, inclusive
pSortDirectives - the directives to sort the result set with
Returns:
null if no items could be found to match the query or if the RepositoryView does not support query operations
Throws:
RepositoryException - if there is an error while performing the query operation

executeQuery

RepositoryItem[] executeQuery(Query pQuery,
                              int pStartingIndex,
                              int pEndingIndex)
                              throws RepositoryException
Executes the given query and returns an array of matching RepositoryItems, which are contained within a total potential result set. For example used if one wanted to retrieve elements 50-60 from a query which could return 100 elements.

Parameters:
pQuery - the query to execute
pStartingIndex - the beginning index, inclusive
pEndingIndex - the ending index, exclusive. A value of -1 signals to query all items in the list.
Returns:
null if no items could be found to match the query or if the RepositoryView does not support query operations
Throws:
RepositoryException - if there is an error while performing the query operation

executeQuery

RepositoryItem[] executeQuery(Query pQuery,
                              int pStartingIndex,
                              int pEndingIndex,
                              SortDirectives pSortDirectives)
                              throws RepositoryException
Executes the given query and returns an array of matching RepositoryItems, which are contained within a total potential result set. For example used if one wanted to retrieve elements 50-60 from a query which could return 100 elements.

Parameters:
pQuery - the query to execute
pStartingIndex - the beginning index, inclusive
pEndingIndex - the ending index, exclusive.
pSortDirectives - the directives to sort the result set with
Returns:
null if no items could be found to match the query or if the RepositoryView does not support query operations
Throws:
RepositoryException - if there is an error while performing the query operation

executeQuery

RepositoryItem[] executeQuery(Query pQuery,
                              QueryOptions pQueryOptions)
                              throws RepositoryException
Executes the given query and returns an array of the matching RepositoryItems (not ids)

Parameters:
pQuery - the query to execute
pQueryOptions - A set of options that may modify the query
Returns:
null if no items could be found to match the query or if the RepositoryView does not support query operations
Throws:
RepositoryException - if there is an error while performing the query operation

executeCountQuery

int executeCountQuery(Query pQuery)
                      throws RepositoryException
Executes a query that returns the number of items that would be returned by given query.

Parameters:
pQuery - the query to execute
Returns:
The number of RepositoryItems that would be returned by executeQuery(pQuery)
Throws:
RepositoryException - if there is an error while performing the query operation