org.gcube.vremanagement.softwarerepository.impl
Class ServiceContext
java.lang.Object
GCUBEServiceContext
org.gcube.vremanagement.softwarerepository.impl.ServiceContext
public class ServiceContext
- extends GCUBEServiceContext
- Author:
- Luca Frosini (ISTI-CNR)
Field Summary |
static java.lang.String |
JNDI_NAME
JNDI Name |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JNDI_NAME
public static final java.lang.String JNDI_NAME
- JNDI Name
- See Also:
- Constant Field Values
getContext
public static ServiceContext getContext()
- Returns:
- the singleton instance of the Service Context
getJNDIName
public java.lang.String getJNDIName()
- Returns:
- JNDI NAME
getReportGeneratorInstance
public ReportGenerator getReportGeneratorInstance()
throws java.lang.Exception
- Returns:
- ReportGenerator
- Throws:
java.lang.Exception
- if fails
getGroupIDManagerInstance
public GroupIDManager getGroupIDManagerInstance()
throws java.lang.Exception
- Returns:
- GroupIDManager
- Throws:
java.lang.Exception
- if fails
getPublisher
public static Publisher getPublisher()
throws java.lang.Exception
- Returns:
- Publisher
- Throws:
java.lang.Exception
- if fails
getReportGenerator
public ReportGenerator getReportGenerator()
- Returns:
- ReportGenerator
getArtifact
public static Artifact getArtifact()
throws java.lang.Exception
- Returns:
- Artifact
- Throws:
java.lang.Exception
- if fails
getDependeciesSolver
public static DependenciesSolver getDependeciesSolver()
throws java.lang.Exception
- Returns:
- DependenciesSolver
- Throws:
java.lang.Exception
- if fails
getValidator
public static SoftwareArchiveValidator getValidator()
throws java.lang.Exception
- Returns:
- Validator
- Throws:
java.lang.Exception
- if fails
getApprover
public static SoftwareArchiveApprover getApprover()
throws java.lang.Exception
- Returns:
- Approver
- Throws:
java.lang.Exception
- if fails
getDbFileName
public java.lang.String getDbFileName()
- Returns:
- DB filename
getDbManager
public SQLDBManager getDbManager()
- Returns:
- DB Manager
getUsername
public java.lang.String getUsername()
- Returns:
- Username for DB connection
getPassword
public java.lang.String getPassword()
- Returns:
- Password for DB connection
getQueriesFile
public java.io.File getQueriesFile()
- Returns:
- init DB queries file
getHttpServerBasePath
public java.io.File getHttpServerBasePath()
- Returns:
- HTTP Server local path
getHttpServerPort
public int getHttpServerPort()
- Returns:
- HTTP server port
getMavenRelativeDir
public java.lang.String getMavenRelativeDir()
- Returns:
- HTTP relative Maven directory
getTmp
public java.io.File getTmp()
- Returns:
- Temporary directory
getPending
public java.io.File getPending()
- Returns:
- Pending directory
getMaven
public java.io.File getMaven()
- Returns:
- Maven service directory
getMavenSettingsFileName
public java.lang.String getMavenSettingsFileName()
- Returns:
- Maven settings file
getReportRelativeDir
public java.lang.String getReportRelativeDir()
- Returns:
- HTTP relative report Dir
getXsltDir
public java.io.File getXsltDir()
- Returns:
- XSLT service directory
getIndexXSLTfilename
public java.lang.String getIndexXSLTfilename()
- Returns:
- Index XSLT filename
getReportXSLTfilename
public java.lang.String getReportXSLTfilename()
- Returns:
- Report XSLT filename
getRelativeDocumentationPath
public java.lang.String getRelativeDocumentationPath()
- Returns:
- th relative documentation path to look for in the service archive
getSourceLinkPathfilename
public java.lang.String getSourceLinkPathfilename()
- Returns:
- THE Name of the file containing SVN link of the source code
isPublishServiceProfile
public boolean isPublishServiceProfile()
- Returns:
- if publish Service Profile or not
isJavadocCheck
public boolean isJavadocCheck()
- Returns:
- if the service has to check if the javadoc is provided with the package
isEticsSubmission
public boolean isEticsSubmission()
- Returns:
- if restrict the controls for automatic ETICS submission are allowed
isCheckSourceLink
public boolean isCheckSourceLink()
- Returns:
- if the service has to check for a file with the source code link
isCheckExtraDocumentation
public boolean isCheckExtraDocumentation()
- Returns:
- if the service has to check extra documentation
isCheckTestSuite
public boolean isCheckTestSuite()
- Returns:
- if the service has to check test suite presence
getServer
public WebServer getServer()
- Returns:
- the server
getBannedVersion
public java.lang.String getBannedVersion()
getXPathsVersionCheck
public java.lang.String[] getXPathsVersionCheck()
getFile
public java.io.File getFile(java.lang.String path,
boolean... writeMode)
throws java.lang.IllegalArgumentException
- Gives read or write access to a
File
.
Write access induces backups and read access relies on backups to recover from failures.
- Parameters:
path
- the file path.writeMode
- (optional) the access mode, true
for write access and false
for read access (default).
- Returns:
- the file.
- Throws:
java.lang.IllegalArgumentException
- if access is in write mode and the path is to a folder.
getAcceptedDependencyVersion
public java.lang.String getAcceptedDependencyVersion()
setAcceptedDependencyVersion
public void setAcceptedDependencyVersion(java.lang.String acceptedDependencyVersion)