Package hudson.plugins.dimensionsscm
Class DimensionsAPI
- java.lang.Object
-
- hudson.plugins.dimensionsscm.DimensionsAPI
-
- All Implemented Interfaces:
Serializable
public class DimensionsAPI extends Object implements Serializable
Dimensions API facade.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DimensionsAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.serena.dmclient.api.DimensionsResultactionBaseline(long key, String projectId, Run<?,?> build, String state, String blnName)Action a baseline.com.serena.dmclient.api.DimensionsResultbuildBaseline(long key, String area, String projectId, boolean batch, boolean buildClean, String buildConfig, String options, boolean capture, String requests, String targets, Run<?,?> build, String blnName)Build a baseline.com.serena.dmclient.api.DimensionsResultbuildProject(long key, String area, String projectId, boolean batch, boolean buildClean, String buildConfig, String options, boolean capture, String requests, String targets, String stage, String type, boolean audit, boolean populate, boolean touch, Run<?,?> build)Build a project.booleancheckout(long key, String projectName, FilePath projectDir, FilePath workspaceName, StringBuffer cmdOutput, String baseline, String requests, boolean doRevert, boolean doExpand, boolean doNoMetadata, boolean doNoTouch, String permissions, String eol)Get a copy of the code.com.serena.dmclient.api.DimensionsResultcreateBaseline(long key, String dcmProjectVersion, Run<?,?> build, String blnScope, String blnTemplate, String blnOwningPart, String blnType, String requestId, String blnId, String blnName, StringBuffer cblId)Create a project tag.voidcreateChangeSetLogs(long key, String projectName, FilePath projectDir, Calendar fromDate, Calendar toDate, File changelogFile, TimeZone tz, String url, String baseline, String requests)Generate changelog file.com.serena.dmclient.api.DimensionsResultdeployBaseline(long key, String projectId, Run<?,?> build, String state, String blnName)Deploy a baseline.com.serena.dmclient.api.DimensionsConnectiongetCon(long key)Gets the repository connection classintgetDmVersion()Gets the Dimensions version if set.List<com.serena.dmclient.api.ItemRevision>getItemsInRequests(com.serena.dmclient.api.DimensionsConnection connection, String projectName, String requests, String dateAfter, String dateBefore)Populate list with all the items related to a set of requests.PrintStreamgetLogger()Gets the logger.StringgetSCMBaseDb()Gets the base database for the connection.StringgetSCMDatabase()Gets the base database for the connection (as "NAME@CONNECTION").StringgetSCMDsn()Gets the database DNS for the connection.StringgetSCMPath()Gets the project path.StringgetSCMProject()Gets the project ID for the connection.StringgetSCMServer()Gets the server for the connection.StringgetSCMUserID()Gets the user ID for the connection.booleanhasRepositoryBeenUpdated(long key, String projectName, FilePath workspace, Calendar fromDate, Calendar toDate, TimeZone tz)Has the repository had any changes made during a certain time?booleanisStream(long key, String projectId)com.serena.dmclient.api.DimensionsResultlockProject(long key, String projectId)Lock a project.longlogin(DimensionsSCM scm, Job<?,?> job)longlogin(DimensionsSCM scm, Run<?,?> run)longlogin(String userID, Secret password, String database, String server)longlogin(String server, String database, String certificateAlias, Secret certificatePassword, String keystorePath, Secret keystorePassword)voidlogout(long key)Disconnects from the Dimensions repositoryvoidlogout(long key, Run<?,?> build)Disconnects from the Dimensions repository, with additional tracing from supplied build details.voidsetLogger(PrintStream logger)Set the logger.com.serena.dmclient.api.DimensionsResultunlockProject(long key, String projectId)Unlock a project.com.serena.dmclient.api.DimensionsResultUploadFiles(long key, FilePath rootDir, String projectId, File cmdFile, String projectName, int buildNo, String requests, boolean forceCheckIn, boolean forceTip, String owningPart)Upload files.
-
-
-
Method Detail
-
getLogger
public final PrintStream getLogger()
Gets the logger.- Returns:
- the task logger
-
setLogger
public final void setLogger(PrintStream logger)
Set the logger.
-
getSCMUserID
public final String getSCMUserID()
Gets the user ID for the connection.- Returns:
- the user ID of the user as whom to connect
-
getDmVersion
public final int getDmVersion()
Gets the Dimensions version if set.- Returns:
- version
-
getSCMDatabase
public final String getSCMDatabase()
Gets the base database for the connection (as "NAME@CONNECTION").- Returns:
- the name of the base database to connect to
-
getSCMBaseDb
public final String getSCMBaseDb()
Gets the base database for the connection.- Returns:
- the name of the base database only
-
getSCMDsn
public final String getSCMDsn()
Gets the database DNS for the connection.- Returns:
- the name of the DSN only
-
getSCMServer
public final String getSCMServer()
Gets the server for the connection.- Returns:
- the name of the server to connect to
-
getSCMProject
public final String getSCMProject()
Gets the project ID for the connection.- Returns:
- the project ID
-
getSCMPath
public final String getSCMPath()
Gets the project path.- Returns:
- the project path
-
getCon
public final com.serena.dmclient.api.DimensionsConnection getCon(long key)
Gets the repository connection class- Returns:
- the SCM repository connection
-
login
public final long login(String server, String database, String certificateAlias, Secret certificatePassword, String keystorePath, Secret keystorePassword)
-
login
public final long login(DimensionsSCM scm, Job<?,?> job)
-
login
public final long login(DimensionsSCM scm, Run<?,?> run)
-
logout
public final void logout(long key)
Disconnects from the Dimensions repository
-
logout
public final void logout(long key, Run<?,?> build)Disconnects from the Dimensions repository, with additional tracing from supplied build details.
-
hasRepositoryBeenUpdated
public boolean hasRepositoryBeenUpdated(long key, String projectName, FilePath workspace, Calendar fromDate, Calendar toDate, TimeZone tz) throws IOExceptionHas the repository had any changes made during a certain time?- Throws:
IOException
-
checkout
public boolean checkout(long key, String projectName, FilePath projectDir, FilePath workspaceName, StringBuffer cmdOutput, String baseline, String requests, boolean doRevert, boolean doExpand, boolean doNoMetadata, boolean doNoTouch, String permissions, String eol) throws IOExceptionGet a copy of the code.- Throws:
IOException
-
createChangeSetLogs
public void createChangeSetLogs(long key, String projectName, FilePath projectDir, Calendar fromDate, Calendar toDate, File changelogFile, TimeZone tz, String url, String baseline, String requests) throws IOExceptionGenerate changelog file.- Throws:
IOException
-
lockProject
public com.serena.dmclient.api.DimensionsResult lockProject(long key, String projectId)Lock a project.
-
unlockProject
public com.serena.dmclient.api.DimensionsResult unlockProject(long key, String projectId)Unlock a project.
-
buildBaseline
public com.serena.dmclient.api.DimensionsResult buildBaseline(long key, String area, String projectId, boolean batch, boolean buildClean, String buildConfig, String options, boolean capture, String requests, String targets, Run<?,?> build, String blnName)Build a baseline.
-
buildProject
public com.serena.dmclient.api.DimensionsResult buildProject(long key, String area, String projectId, boolean batch, boolean buildClean, String buildConfig, String options, boolean capture, String requests, String targets, String stage, String type, boolean audit, boolean populate, boolean touch, Run<?,?> build)Build a project.
-
UploadFiles
public com.serena.dmclient.api.DimensionsResult UploadFiles(long key, FilePath rootDir, String projectId, File cmdFile, String projectName, int buildNo, String requests, boolean forceCheckIn, boolean forceTip, String owningPart)Upload files.
-
createBaseline
public com.serena.dmclient.api.DimensionsResult createBaseline(long key, String dcmProjectVersion, Run<?,?> build, String blnScope, String blnTemplate, String blnOwningPart, String blnType, String requestId, String blnId, String blnName, StringBuffer cblId)Create a project tag.
-
deployBaseline
public com.serena.dmclient.api.DimensionsResult deployBaseline(long key, String projectId, Run<?,?> build, String state, String blnName)Deploy a baseline.
-
actionBaseline
public com.serena.dmclient.api.DimensionsResult actionBaseline(long key, String projectId, Run<?,?> build, String state, String blnName)Action a baseline.
-
isStream
public boolean isStream(long key, String projectId)
-
getItemsInRequests
public List<com.serena.dmclient.api.ItemRevision> getItemsInRequests(com.serena.dmclient.api.DimensionsConnection connection, String projectName, String requests, String dateAfter, String dateBefore)
Populate list with all the items related to a set of requests.- Parameters:
connection- Dimensions connectionprojectName- Name of the projectrequests- List of requestsdateAfter- Date filterdateBefore- Date filter- Returns:
- List
-
-