|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VersioningDatasource
Interface for datasource that may support versioning (although specific
datasources using implementations of this interface may be configured not to
use versioning). Generally, objects managed by versioning datasources should
implement the Interface VersionedObject
.
Implementation note: Do not implement this interface directly, but extend
AbstractVersioningDatasource
instead.
Nested Class Summary | |
---|---|
static class |
VersioningDatasource.Version
provides meta information about a single version of a dataset. |
Nested classes/interfaces inherited from interface com.gentics.api.lib.datasource.Datasource |
---|
Datasource.Sorting |
Field Summary | |
---|---|
static VersioningDatasource.Version[] |
EMPTY_VERSIONLIST
constant for an empty version list |
Fields inherited from interface com.gentics.api.lib.datasource.Datasource |
---|
SORTORDER_ASC, SORTORDER_DESC, SORTORDER_NONE |
Method Summary | |
---|---|
boolean |
checkRequirements()
check the requirements for versioning |
Changeable |
create(Map objectParameters,
int versionTimestamp)
Create a datasource object with the given object data at the given timestamp |
int |
getCount(DatasourceFilter filter,
int versionTimestamp)
Get the number of resolvables matching the given filter at the versionTimestamp |
int |
getCount(DatasourceFilter filter,
Map specificParameters,
int versionTimestamp)
Get the number of resolvables matching the given filter at the versionTimestamp |
Collection |
getResult(DatasourceFilter filter,
String[] prefillAttributes,
int versionTimestamp)
Get the resolvables matching the given datasource filter at the timestamp |
Collection |
getResult(DatasourceFilter filter,
String[] prefillAttributes,
int start,
int count,
Datasource.Sorting[] sortedColumns,
int versionTimestamp)
Get the resolvables matching the given datasource filter at the timestamp |
Collection |
getResult(DatasourceFilter filter,
String[] prefillAttributes,
int start,
int count,
Datasource.Sorting[] sortedColumns,
Map specificParameters,
int versionTimestamp)
Get the resolvables matching the given datasource filter at the timestamp |
VersioningDatasource.Version[] |
getVersions(String id)
get the lst of available versions for the given contentid |
boolean |
isVersioning()
return true when this datasource supports versioning, false if not |
void |
setVersionTimestamp(int timestamp)
set the version timestamp to be used for querying, when the datasource is versioning. |
Methods inherited from interface com.gentics.api.lib.datasource.Datasource |
---|
clone, createDatasourceFilter, getCount, getCount, getCount, getCount2, getHandlePool, getId, getResult, getResult, getResult, getResult, getResult, getResult, getResult, hasChanged, hasChanged, isValidAttribute, setAttributeNames, setRuleTree |
Field Detail |
---|
static final VersioningDatasource.Version[] EMPTY_VERSIONLIST
Method Detail |
---|
boolean isVersioning()
void setVersionTimestamp(int timestamp)
timestamp
- timestamp to be used or -1 to reset versioned queryingisVersioning()
boolean checkRequirements()
VersioningDatasource.Version[] getVersions(String id)
id
- id of the object
Changeable create(Map objectParameters, int versionTimestamp) throws DatasourceException
objectParameters
- object dataversionTimestamp
- version timestamp
DatasourceException
Collection getResult(DatasourceFilter filter, String[] prefillAttributes, int versionTimestamp) throws DatasourceException
filter
- datasource filterprefillAttributes
- array of attribute names to prefill (null or empty for no prefilling)versionTimestamp
- version timestamp (-1 for current versions)
DatasourceException
Collection getResult(DatasourceFilter filter, String[] prefillAttributes, int start, int count, Datasource.Sorting[] sortedColumns, int versionTimestamp) throws DatasourceException
filter
- datasource filterprefillAttributes
- array of attribute names to prefill (null or empty for no prefilling)start
- index of the first returned objectcount
- maximum number of objects returned, -1 for all objectssortedColumns
- sorted columns, may be null (no sorting used)versionTimestamp
- version timestamp (-1 for current versions)
DatasourceException
Collection getResult(DatasourceFilter filter, String[] prefillAttributes, int start, int count, Datasource.Sorting[] sortedColumns, Map specificParameters, int versionTimestamp) throws DatasourceException
filter
- datasource filterprefillAttributes
- array of attribute names to prefill (null or empty for no prefilling)start
- index of the first returned objectcount
- maximum number of objects returned, -1 for all objectssortedColumns
- sorted columns, may be null (no sorting used)specificParameters
- map of specific parameters, which will be
interpreted by some specific Datasources, may be null or empty (no
specific parameters)versionTimestamp
- version timestamp (-1 for current versions)
DatasourceException
int getCount(DatasourceFilter filter, int versionTimestamp) throws DatasourceException
filter
- datasource filterversionTimestamp
- version timestamp, -1 for current versions
DatasourceException
int getCount(DatasourceFilter filter, Map specificParameters, int versionTimestamp) throws DatasourceException
filter
- datasource filterspecificParameters
- map of specific parameters, which will be
interpreted by some specific Datasources, may be null or empty (no
specific parameters)versionTimestamp
- version timestamp, -1 for current versions
DatasourceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |