Class Versions
java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.Versions
- All Implemented Interfaces:
NewerNewStyleService
,STService
This class provides services for handling versions of a repository.
- Author:
- Manuel Fiorelli
-
Field Summary
Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
applicationEventPublisher, cfManager, exptManager, stServiceContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
closeVersion
(String versionId) createVersionDump
(RepositoryAccess repositoryAccess, String repositoryId, PluginSpecification repoConfigurerSpecification, String backendType, String versionId) Dumps the current content of the core repository to a dedicated repository.void
deleteVersion
(String versionId) getVersions
(boolean setRepositoryStatus, boolean setRepositoryLocation) Methods inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter
addValue, checkNotLocallyDefined, createQueryBuilder, generateIRI, generateNatureSPARQLSelectPart, generateNatureSPARQLWherePart, generateResourceWithCustomConstructor, getCodaLexModeForSearchFromLexicalizationModel, getDeleteGraph, getGraphFromNature, getInitializedCodaCore, getManagedConnection, getMetadataGraph, getOptionalProject, getPlatformTransactionManager, getProject, getRepository, getRoleFromNature, getUserNamedGraphs, getWorkingGraph, instantiateSearchStrategy, instantiateSearchStrategy, parseReference, publishResourceDeleted, publishResourceDeleted, removeReifiedValue, retrieveResources, shutDownCodaCore, updateTriplePredicate
-
Constructor Details
-
Versions
public Versions()
-
-
Method Details
-
getVersions
@STServiceOperation @PreAuthorize("@auth.isAuthorized(\'rdf(dataset, version)\', \'R\')") public List<VersionInfo> getVersions(@Optional(defaultValue="false") boolean setRepositoryStatus, @Optional(defaultValue="false") boolean setRepositoryLocation) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException - Throws:
com.fasterxml.jackson.core.JsonParseException
com.fasterxml.jackson.databind.JsonMappingException
IOException
-
createVersionDump
@STServiceOperation(method=POST) @Read @PreAuthorize("@auth.isAuthorized(\'rdf(dataset, version)\', \'C\')") public VersionInfo createVersionDump(@Optional RepositoryAccess repositoryAccess, @Optional String repositoryId, @Optional PluginSpecification repoConfigurerSpecification, @Optional String backendType, String versionId) throws AlreadyExistingRepositoryException, com.fasterxml.jackson.core.JsonProcessingException, ProjectUpdateException, ReservedPropertyUpdateException, Exception Dumps the current content of the core repository to a dedicated repository.- Parameters:
repositoryAccess
- tells the location of the repository. Ifnull
, the default repository location associated with the project is usedrepositoryId
- tells the name of the version repository. If the repository is local, this parameter must benull
repoConfigurerSpecification
- specifies the configuration of the repositorybackendType
- type of the triple store that will host the dumpversionId
- the version identifier- Returns:
- Throws:
AlreadyExistingRepositoryException
ReservedPropertyUpdateException
ProjectUpdateException
com.fasterxml.jackson.core.JsonProcessingException
Exception
-
closeVersion
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'rdf(dataset, version)\', \'R\')") public void closeVersion(String versionId) -
deleteVersion
@STServiceOperation(method=POST) @PreAuthorize("@auth.isAuthorized(\'rdf(dataset, version)\', \'D\')") public void deleteVersion(String versionId) throws com.fasterxml.jackson.core.JsonProcessingException, ProjectUpdateException, ReservedPropertyUpdateException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
ProjectUpdateException
ReservedPropertyUpdateException
-