public class RepositoryClient extends java.lang.Object implements com.ibm.dbb.repository.internal.RepositoryConstants, IRepositoryClient
AMPERSAND, ARTIFACT, ASC, ATTACHMENT, ATTACHMENTS, BASIC_AUTHENTICATION, BUILD, BUILD_REPORT, BUILD_REPORT_DATA, BUILD_RESULT, CATEGORY, CICS, COLLECTION, COMMA, CONTENT, CONTENT_TYPE, CREATED, CREATED_BY, DATE, DEFAULT_SSL_PROTOCOLS, DESC, DLI, EQUALS, FILE, FORM_AUTHENTICATION, GROUP, GROUPS, ID, IMPACT_FILES, LABEL, LABELS, LANGUAGE, LAST_UPDATED, LAST_UPDATED_BY, LD_PREFIX, LIBRARY, LNAME, LOGICAL_DEPENDENCIES, LOGICAL_FILE, MINIMAL, MQ, NAME, ORDER, ORDER_BY, OWNER, PERMISSION, PROPERTIES, PROPERTY, QUESTION_MARK, REST, SIZE, SLASH, SQL, STATE, STATUS, TEAM, VALUE, VERSION
Constructor and Description |
---|
RepositoryClient()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
IRepositoryClient |
authentication(java.lang.String authentication) |
boolean |
collectionExists(java.lang.String collectionName)
Test whether a collection exist with the given name
|
Collection |
copyCollection(Collection collection,
java.lang.String newName)
Create a copy of the collection with the new name
|
Collection |
copyCollection(long id,
java.lang.String newName)
Create a copy of the collection with the new name
|
Collection |
copyCollection(java.lang.String collectionName,
java.lang.String newName)
Create a copy of the collection with the new name
|
BuildResult |
createBuildResult(java.lang.String group,
java.lang.String label) |
java.lang.String |
createCollection(java.lang.String collectionName)
Create a new collection
|
Collection |
createCollection(java.lang.String name,
java.lang.String owner,
java.lang.String team,
int permission)
Create a new collection
|
void |
deleteBuildResult(BuildResult buildResult) |
void |
deleteBuildResult(long id) |
void |
deleteBuildResults(java.lang.String group) |
void |
deleteCollection(Collection collection) |
void |
deleteCollection(long id) |
void |
deleteCollection(java.lang.String collectionName)
Delete the given collection
|
void |
deleteLogicalFile(java.lang.String collectionName,
java.lang.String file)
Delete a logical file for a given source file
|
IRepositoryClient |
errorStatusCode(int errorStatusCode) |
IRepositoryClient |
forceSSLTrusted(boolean forceSSLTrusted) |
java.util.List<BuildResult> |
getAllBuildResults(java.util.Map<java.lang.String,java.lang.String> queryParms) |
java.util.List<Collection> |
getAllCollections() |
java.util.List<ImpactFile> |
getAllImpactedFiles(java.util.List<java.lang.String> collections,
java.util.List<LogicalDependency> lds)
Get all impacted logical files that match a given logical dependency
|
java.util.List<LogicalFile> |
getAllLogicalFiles(java.lang.String collectionName,
LogicalDependency logicalDependency)
Get all logical dependencies that match a given logical dependency
|
java.util.List<LogicalFile> |
getAllLogicalFiles(java.lang.String collectionName,
java.lang.String logicalName)
Return a list of logical dependency for a program
|
java.lang.String |
getAuthentication() |
BuildResult |
getBuildResult(long id) |
BuildResult |
getBuildResult(java.lang.String group,
java.lang.String label) |
Collection |
getCollection(long id) |
Collection |
getCollectionByName(java.lang.String name) |
int |
getErrorStatusCode() |
BuildResult |
getLastBuildResult(java.lang.String group,
int state,
int status) |
java.lang.String |
getLastStatus() |
int |
getLastStatusCode() |
LogicalFile |
getLogicalFile(java.lang.String collectionName,
java.lang.String file)
Return a logical file for a source file
|
java.lang.String |
getPassword() |
java.io.File |
getPasswordFile() |
Version |
getServerVersion()
Retrieve server version
|
java.lang.String[] |
getSslProtocols() |
java.lang.String |
getUrl() |
java.lang.String |
getUserId() |
boolean |
isForceSSLTrusted() |
java.util.List<java.lang.String> |
listBuildResultGroups() |
java.util.List<java.lang.String> |
listBuildResultLabels(java.lang.String group) |
IRepositoryClient |
password(java.lang.String password) |
IRepositoryClient |
passwordFile(java.io.File passwordFile) |
void |
saveLogicalFile(java.lang.String collectionName,
LogicalFile lfile)
Convenient method to save a logical file to the repository
|
void |
saveLogicalFiles(java.lang.String collectionName,
java.util.List<LogicalFile> lfiles)
Save a list of logical files
|
void |
setAuthentication(java.lang.String authentication) |
void |
setErrorStatusCode(int errorStatusCode) |
void |
setForceSSLTrusted(boolean forceSSLTrusted) |
void |
setPassword(java.lang.String password) |
void |
setPasswordFile(java.io.File passwordFile) |
void |
setSslProtocol(java.lang.String protocols) |
void |
setSslProtocol(java.lang.String[] protocols) |
void |
setUrl(java.lang.String url) |
void |
setUserId(java.lang.String userId) |
IRepositoryClient |
url(java.lang.String url) |
IRepositoryClient |
userId(java.lang.String userId) |
public void saveLogicalFile(java.lang.String collectionName, LogicalFile lfile) throws ConnectionException
saveLogicalFile
in interface IRepositoryClient
collectionName
- the name of the collectionlfile
- the logical fileConnectionException
- an exception occurredpublic void saveLogicalFiles(java.lang.String collectionName, java.util.List<LogicalFile> lfiles) throws ConnectionException
saveLogicalFiles
in interface IRepositoryClient
collectionName
- the name of the collectionlfiles
- the list of logical filesConnectionException
- an exception occurredpublic LogicalFile getLogicalFile(java.lang.String collectionName, java.lang.String file) throws ConnectionException
getLogicalFile
in interface IRepositoryClient
collectionName
- the name of the collectionfile
- the source fileConnectionException
- an exception occurredpublic java.util.List<LogicalFile> getAllLogicalFiles(java.lang.String collectionName, java.lang.String logicalName) throws ConnectionException
getAllLogicalFiles
in interface IRepositoryClient
collectionName
- the name of the collectionlogicalName
- the name of the programConnectionException
- an exception occurredpublic java.util.List<ImpactFile> getAllImpactedFiles(java.util.List<java.lang.String> collections, java.util.List<LogicalDependency> lds) throws ConnectionException
getAllImpactedFiles
in interface IRepositoryClient
collections
- the names of the collections to searchlogicalDependency
- the logical dependency whose criteria is used to find matching
dependenciesConnectionException
- an exception occurredpublic java.util.List<LogicalFile> getAllLogicalFiles(java.lang.String collectionName, LogicalDependency logicalDependency) throws ConnectionException
getAllLogicalFiles
in interface IRepositoryClient
collectionName
- the name of the collectionlogicalDependency
- the logical dependency whose criteria is used to find matching
dependenciesConnectionException
- an exception occurredpublic void deleteLogicalFile(java.lang.String collectionName, java.lang.String file) throws ConnectionException
deleteLogicalFile
in interface IRepositoryClient
collectionName
- the name of the collectionfile
- the source fileConnectionException
- an exception occurredpublic void deleteCollection(java.lang.String collectionName) throws ConnectionException
deleteCollection
in interface IRepositoryClient
collectionName
- the name of the collectionConnectionException
- an exception occurredpublic void deleteCollection(Collection collection) throws ConnectionException
deleteCollection
in interface IRepositoryClient
ConnectionException
public void deleteCollection(long id) throws ConnectionException
deleteCollection
in interface IRepositoryClient
ConnectionException
public Collection copyCollection(Collection collection, java.lang.String newName) throws ConnectionException
copyCollection
in interface IRepositoryClient
collection
- collection to be copiednewName
- Name of new collectionConnectionException
- an exception occurredpublic Collection copyCollection(java.lang.String collectionName, java.lang.String newName) throws ConnectionException
copyCollection
in interface IRepositoryClient
collectionName
- Name of collection to be copiednewName
- Name of new collectionConnectionException
- an exception occurredpublic Collection copyCollection(long id, java.lang.String newName) throws ConnectionException
copyCollection
in interface IRepositoryClient
id
- id of collection to be copiednewName
- Name of new collectionConnectionException
- an exception occurredpublic java.lang.String createCollection(java.lang.String collectionName) throws ConnectionException
createCollection
in interface IRepositoryClient
collectionName
- the name of the collectionConnectionException
- an exception occurredpublic Collection createCollection(java.lang.String name, java.lang.String owner, java.lang.String team, int permission) throws ConnectionException
createCollection
in interface IRepositoryClient
name
- the name of the collectionowner
- the owner of the collectionteam
- the team for the collectionpermission
- The permission for the collection is represented by an octal
number (i.e. 664) where the first octal digit is the owner
permission, the second digit is the team permission, and the
third digit is the permission for everyone else. The digits
can be 4 (Read), 2 (Write), or 6 (Read and Write).ConnectionException
- an exception occurredpublic boolean collectionExists(java.lang.String collectionName) throws ConnectionException
collectionExists
in interface IRepositoryClient
collectionName
- the name of the collectiontrue
if an collection already exist with the given nameConnectionException
- an exception occurredpublic java.lang.String getLastStatus()
getLastStatus
in interface IRepositoryClient
public int getLastStatusCode()
getLastStatusCode
in interface IRepositoryClient
public BuildResult createBuildResult(java.lang.String group, java.lang.String label) throws ConnectionException
createBuildResult
in interface IRepositoryClient
ConnectionException
public BuildResult getLastBuildResult(java.lang.String group, int state, int status) throws ConnectionException
getLastBuildResult
in interface IRepositoryClient
ConnectionException
public java.util.List<BuildResult> getAllBuildResults(java.util.Map<java.lang.String,java.lang.String> queryParms) throws ConnectionException
getAllBuildResults
in interface IRepositoryClient
ConnectionException
public java.util.List<Collection> getAllCollections() throws ConnectionException
getAllCollections
in interface IRepositoryClient
ConnectionException
public BuildResult getBuildResult(long id) throws ConnectionException
getBuildResult
in interface IRepositoryClient
ConnectionException
public Collection getCollection(long id) throws ConnectionException
getCollection
in interface IRepositoryClient
ConnectionException
public Collection getCollectionByName(java.lang.String name) throws ConnectionException
getCollectionByName
in interface IRepositoryClient
ConnectionException
public BuildResult getBuildResult(java.lang.String group, java.lang.String label) throws ConnectionException
getBuildResult
in interface IRepositoryClient
ConnectionException
public java.util.List<java.lang.String> listBuildResultGroups() throws ConnectionException
listBuildResultGroups
in interface IRepositoryClient
ConnectionException
public java.util.List<java.lang.String> listBuildResultLabels(java.lang.String group) throws ConnectionException
listBuildResultLabels
in interface IRepositoryClient
ConnectionException
public void deleteBuildResults(java.lang.String group) throws ConnectionException
deleteBuildResults
in interface IRepositoryClient
ConnectionException
public void deleteBuildResult(long id) throws ConnectionException
deleteBuildResult
in interface IRepositoryClient
ConnectionException
public void deleteBuildResult(BuildResult buildResult) throws ConnectionException
deleteBuildResult
in interface IRepositoryClient
ConnectionException
public void setSslProtocol(java.lang.String protocols)
setSslProtocol
in interface IRepositoryClient
public void setSslProtocol(java.lang.String[] protocols)
setSslProtocol
in interface IRepositoryClient
public java.lang.String[] getSslProtocols()
getSslProtocols
in interface IRepositoryClient
public void setUrl(java.lang.String url)
setUrl
in interface IRepositoryClient
public void setUserId(java.lang.String userId)
setUserId
in interface IRepositoryClient
public java.lang.String getUrl()
getUrl
in interface IRepositoryClient
public void setPassword(java.lang.String password)
setPassword
in interface IRepositoryClient
public void setPasswordFile(java.io.File passwordFile)
setPasswordFile
in interface IRepositoryClient
public void setAuthentication(java.lang.String authentication)
setAuthentication
in interface IRepositoryClient
public void setForceSSLTrusted(boolean forceSSLTrusted)
setForceSSLTrusted
in interface IRepositoryClient
public void setErrorStatusCode(int errorStatusCode)
setErrorStatusCode
in interface IRepositoryClient
public IRepositoryClient url(java.lang.String url)
url
in interface IRepositoryClient
public IRepositoryClient userId(java.lang.String userId)
userId
in interface IRepositoryClient
public IRepositoryClient password(java.lang.String password)
password
in interface IRepositoryClient
public IRepositoryClient errorStatusCode(int errorStatusCode)
errorStatusCode
in interface IRepositoryClient
public IRepositoryClient passwordFile(java.io.File passwordFile)
passwordFile
in interface IRepositoryClient
public IRepositoryClient authentication(java.lang.String authentication)
authentication
in interface IRepositoryClient
public IRepositoryClient forceSSLTrusted(boolean forceSSLTrusted)
forceSSLTrusted
in interface IRepositoryClient
public java.lang.String getUserId()
getUserId
in interface IRepositoryClient
public java.lang.String getPassword()
getPassword
in interface IRepositoryClient
public java.io.File getPasswordFile()
getPasswordFile
in interface IRepositoryClient
public java.lang.String getAuthentication()
getAuthentication
in interface IRepositoryClient
public boolean isForceSSLTrusted()
isForceSSLTrusted
in interface IRepositoryClient
public int getErrorStatusCode()
getErrorStatusCode
in interface IRepositoryClient
public Version getServerVersion() throws ConnectionException
getServerVersion
in interface IRepositoryClient
ConnectionException
- an exception occurred<IBM Copyright © 2018 IBM Corp. All Rights Reserved.