Interface IRepositoryReadOnlyConnection
- All Known Subinterfaces:
IRepositoryConnection
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether given location exists.getChanges
(String startState, String endState) Return the locations changes for whole repository from state (exclusive) to state (inclusive)getChanges
(Collection loctions, String startState, String endState) Return the locations changes for selected location from state (exclusive) to state (inclusive)getChanges
(Collection loctions, Date startDate, Date endDate) Return the locations changes for selected location from date to dategetChanges
(Date startDate, Date endDate) Return the locations changes for whole repository from date to dategetContent
(ILocation loc) Get file content.Return the id of a current repository state.The first ("oldest") revision name for the given location.getLastRevision
(ILocation loc) Get the last revision for the given location.getMergedRevisionsMetaData
(String state) Returns list (in implementation-dependent order) of meta data of revisions which were merged into given state.getNextState
(String repositoryState) Returns the next state for given state.getPreviousState
(String repositoryState) Returns the previous state for the given state.getProperties
(ILocation loc) Get properties map.getProperty
(ILocation loc, String name) Get property value.getRepositoryState
(Date date) Return the id of a repository state at the given moment.getRepositoryStateDate
(String repositoryState) Return a date of some repository state.Return system properties for resource on given location.getRevisionMetaData
(ILocation loc, boolean extended) Return meta data for given resource and revision.getRevisionsMetaData
(ILocation loc, boolean extended) Return all meta data for given resource.getRevisionsMetaData
(ILocation loc, String toRevision, boolean extended) Return selected metadata for given resource.getSubLocations
(ILocation loc, boolean recurse) Return list of locations which are under given location.getSubLocations
(ILocation loc, boolean recurse, boolean foldersOnly) Return list of locations filtered by type which are under given location.boolean
boolean
Whether given location exists and is a file.boolean
Whether given location exists and is a folder.
-
Method Details
-
getRepositoryInfo
IRepositoryInfo getRepositoryInfo()- Returns:
- the information about connected repository (
IRepositoryInfo
)
-
isConnected
- Returns:
- whether it is connected
- Throws:
RepositoryException
-
exists
Whether given location exists.The location can't be a
null
- Parameters:
loc
- location- Returns:
true
if location exists- Throws:
RepositoryException
- if error occurs
-
isFolder
Whether given location exists and is a folder.The location can't be a
null
- Parameters:
loc
- location- Returns:
true
if location exists and is a folder- Throws:
RepositoryException
- if error occurs
-
isFile
Whether given location exists and is a file.The location can't be a
null
- Parameters:
loc
- location- Returns:
true
if location exists and is a file- Throws:
RepositoryException
- if error occurs
-
getSubLocations
Return list of locations which are under given location.The location can't be a
null
- Parameters:
loc
- locationrecurse
- whether recurse deep inside- Returns:
- collection of
ILocation
s. The locations are always ordered in such a way, that parents go before their children. - Throws:
RepositoryException
- if error occurs
-
getSubLocations
List<ILocation> getSubLocations(ILocation loc, boolean recurse, boolean foldersOnly) throws RepositoryException Return list of locations filtered by type which are under given location.The location can't be a
null
- Parameters:
loc
- locationrecurse
- whether recurse deep insidefoldersOnly
- whether to return only folders or only files- Returns:
- collection of
ILocation
s. The locations are always ordered in such a way, that parents go before their children. - Throws:
RepositoryException
- if error occurs- Since:
- 3.5.0
-
getResourceProperties
Return system properties for resource on given location.The location can't be a
null
- Parameters:
loc
- location- Returns:
- resource properties
- Throws:
RepositoryException
- if error occurs
-
getContent
Get file content.The location can't be a
null
- Parameters:
loc
- location- Returns:
- file content as stream of bytes
- Throws:
RepositoryException
- if error occurs
-
getFirstRevision
The first ("oldest") revision name for the given location. If location has the revision it will be returnedThe location can't be a
null
- Returns:
- the first ("oldest") revision name, can't be a
null
- Throws:
RepositoryException
-
getLastRevision
Get the last revision for the given location. If location has the revision it will be returnedThe location can't be a
null
- Parameters:
loc
- location- Returns:
- current revision
- Throws:
RepositoryException
- if error occurs
-
getChanges
Map getChanges(Collection loctions, Date startDate, Date endDate) throws com.polarion.platform.service.repository.driver.DriverException Return the locations changes for selected location from date to date- Parameters:
loctions
-startDate
- start dateendDate
- end date- Returns:
- Map from revision
IRevisionMetaData
to List ofILocationChangeMetaData
. Map will include all changes which happen AFTER start date and BEFORE end date inside given locations. Exception if startDate is the same as endDate. In that case should returns changes for the lastest revision of selected locations and all sublocations BEFORE endDate. In case repository-wide revision it means all changes in the latest revision, in case of location wide revision will be returned information for ALL resources in the in the givel locations which have at least one modification BEFORE endDate. - Throws:
com.polarion.platform.service.repository.driver.DriverException
RepositoryException
- if error occurs
-
getChanges
Map getChanges(Date startDate, Date endDate) throws com.polarion.platform.service.repository.driver.DriverException Return the locations changes for whole repository from date to date- Parameters:
startDate
- start dateendDate
- end date- Returns:
- Map from revision
IRevisionMetaData
to List ofILocationChangeMetaData
. Map will include all changes which happen AFTER start date and BEFORE end date. Exception if startDate is the same as endDate. In that case should returns changes for the lastest revision BEFORE endDate. In case repository-wide revision it means all changes in the latest revision, in case of location wide revision will be returned information for ALL resources in the repository which have at least one modification BEFORE endDate. - Throws:
com.polarion.platform.service.repository.driver.DriverException
RepositoryException
- if error occurs
-
getRevisionMetaData
Return meta data for given resource and revision.If revision is not specified in location, latest revision is taken.
The location can't be a
null
- Parameters:
loc
- resource locationextended
- ifIExtendedRevisionMetaData
should be returned- Returns:
- revision meta data
- Throws:
RepositoryException
- if error occurs
-
getRevisionsMetaData
Return all meta data for given resource.If revision will specified in location, it will be ignored.
The location can't be a
null
- Parameters:
loc
- resource locationextended
- ifIExtendedRevisionMetaData
should be returned. NOTE that ifextended == true
, then the call is much more expensive than forfalse
.- Returns:
List
ofIRevisionMetaData
s- Throws:
RepositoryException
- if error occurs
-
getRevisionsMetaData
List getRevisionsMetaData(ILocation loc, String toRevision, boolean extended) throws com.polarion.platform.service.repository.driver.DriverException Return selected metadata for given resource. The location can be anull
.- Parameters:
loc
- resource location with start revision. Ifnull
then only metadata fortoRevision
are returned (thus returned List has just one item).toRevision
- end revision ornull
for latestextended
- ifIExtendedRevisionMetaData
should be returned NOTE that ifextended == true
, then the call is much more expensive than forfalse
.- Returns:
List
ofIRevisionMetaData
s- Throws:
com.polarion.platform.service.repository.driver.DriverException
RepositoryException
- if error occurs
-
getProperty
Get property value.The location or name can't be a
null
- Parameters:
loc
- resource locationname
- property name- Returns:
- property value or
null
if not set - Throws:
RepositoryException
- if error occurs
-
getProperties
Get properties map. The location can't be anull
.The location can't be a
null
- Parameters:
loc
- resource location- Returns:
Map
(property name (String
) -> property value (String
)) (notnull
)- Throws:
RepositoryException
- if error occurs
-
getCurrentRepositoryState
Return the id of a current repository state.The
IDataService.getLastStorageRevision()
method should be used instead of this one in use cases related to the model objects (i.e. the ones returned byIDataService.getInstance(IObjectId)
).The meaning of a repository state depends on the repository itself and the driver implementation. Generally it is a repository-wide identifier that reflects the state of the repository in time. E.g. for SVN, it is a revision for CVS - it can be a date or tag. for CVS it can be a date or tag.
- Returns:
- the id of a current state of a repository
- Throws:
RepositoryException
-
getRepositoryState
Return the id of a repository state at the given moment.The
IDataService.getStorageRevisionAt(Date)
method should be used instead of this one in use cases related to the model objects (i.e. the ones returned byIDataService.getInstance(IObjectId)
).See
getCurrentRepositoryState()
for explanation of the meaning of a repository state.The date can't be a
null
- Parameters:
date
- - timestamp used to get the state- Returns:
- the id of a repository state for a given time
- Throws:
RepositoryException
-
getPreviousState
Returns the previous state for the given state.The
IDataService.getPreviousStorageRevision(String)
method should be used instead of this one in use cases related to the model objects (i.e. the ones returned byIDataService.getInstance(IObjectId)
).- Parameters:
repositoryState
- can't be anull
- Returns:
- the previous state
- Throws:
RepositoryException
-
getNextState
Returns the next state for given state.state can't be a
null
- Parameters:
repositoryState
- state to get next- Returns:
- the next state
- Throws:
RepositoryException
-
getRepositoryStateDate
Return a date of some repository state.See
getCurrentRepositoryState()
for explanation of the meaning of a repository state.The state can't be a
null
- Parameters:
repositoryState
-- Returns:
- Date of given state or
null
if repository newer had such state. - Throws:
RepositoryException
-
getChanges
Map getChanges(Collection loctions, String startState, String endState) throws com.polarion.platform.service.repository.driver.DriverException Return the locations changes for selected location from state (exclusive) to state (inclusive)See
getCurrentRepositoryState()
for explanation of the meaning of a repository state.- Parameters:
loctions
-startState
- start state ifnull
from the initial stateendState
- end state ifnull
to the current state- Returns:
- Map from revision
IRevisionMetaData
to List ofILocationChangeMetaData
. Map will include all changes which happen from the start state to the end state (inclusive) inside given locations. - Throws:
com.polarion.platform.service.repository.driver.DriverException
RepositoryException
- if error occurs
-
getChanges
Map getChanges(String startState, String endState) throws com.polarion.platform.service.repository.driver.DriverException Return the locations changes for whole repository from state (exclusive) to state (inclusive)See
getCurrentRepositoryState()
for explanation of the meaning of a repository state.- Parameters:
startState
- start state ifnull
from the initial stateendState
- end state ifnull
to the current state- Returns:
- Map from revision
IRevisionMetaData
to List ofILocationChangeMetaData
. Map will include all changes which happen from the start state to the end state (inclusive). - Throws:
com.polarion.platform.service.repository.driver.DriverException
RepositoryException
- if error occurs
-
getMergedRevisionsMetaData
List<IRevisionMetaData> getMergedRevisionsMetaData(String state) throws com.polarion.platform.service.repository.driver.DriverException Returns list (in implementation-dependent order) of meta data of revisions which were merged into given state.Empty list will be returned if repository does not support merges/merge tracking.
- Parameters:
state
- repository state (current state ifnull
)- Returns:
List
ofIRevisionMetaData
s (notnull
)- Throws:
com.polarion.platform.service.repository.driver.DriverException
- if error occurs- Since:
- 3.3.0
-