Class GeneralInformationChangingService
- java.lang.Object
-
- ch.systemsx.cisd.openbis.common.spring.AbstractServiceWithLogger<T>
-
- ch.systemsx.cisd.openbis.generic.server.AbstractServer<IGeneralInformationChangingService>
-
- ch.systemsx.cisd.openbis.generic.server.api.v1.GeneralInformationChangingService
-
- All Implemented Interfaces:
IRpcService
,ch.systemsx.cisd.openbis.common.spring.IInvocationLoggerFactory<IGeneralInformationChangingService>
,IGeneralInformationChangingService
,ch.systemsx.cisd.openbis.generic.shared.IServer
,ch.systemsx.cisd.openbis.generic.shared.ISessionProvider
@Component("general-information-changing-api-server-v1") public class GeneralInformationChangingService extends ch.systemsx.cisd.openbis.generic.server.AbstractServer<IGeneralInformationChangingService> implements IGeneralInformationChangingService
-
-
Field Summary
Fields Modifier and Type Field Description static int
MINOR_VERSION
ch.systemsx.cisd.common.servlet.IRequestContextProvider
requestContextProvider
-
Fields inherited from class ch.systemsx.cisd.openbis.generic.server.AbstractServer
CISDHelpdeskEmail, configurer, displaySettingsProvider, executor, mailClientParameters, sessionManager
-
Fields inherited from class ch.systemsx.cisd.openbis.common.spring.AbstractServiceWithLogger
authenticationLog, notificationLog, operationLog
-
Fields inherited from interface ch.systemsx.cisd.openbis.generic.shared.api.v1.IGeneralInformationChangingService
JSON_SERVICE_URL, SERVICE_NAME, SERVICE_URL
-
-
Constructor Summary
Constructors Constructor Description GeneralInformationChangingService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId, MetaprojectAssignmentsIds assignmentsToAdd)
Adds given entities to an existing metaproject.void
addUnofficialVocabularyTerm(java.lang.String sessionToken, ch.systemsx.cisd.openbis.generic.shared.basic.TechId vocabularyId, java.lang.String code, java.lang.String label, java.lang.String description, java.lang.Long previousTermOrdinal)
Adds new unofficial terms to a vocabulary starting from specified ordinal + 1.void
addUnofficialVocabularyTerm(java.lang.String sessionToken, java.lang.Long vocabularyId, NewVocabularyTerm term)
Adds new unofficial terms to a vocabulary starting from specified ordinal + 1.IGeneralInformationChangingService
createLogger(ch.systemsx.cisd.openbis.common.spring.IInvocationLoggerContext context)
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject
createMetaproject(java.lang.String sessionToken, java.lang.String name, java.lang.String descriptionOrNull)
Creates a new metaproject.void
deleteDataSets(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes, java.lang.String reason, DeletionType deletionType)
Deletes or trashes the specified data sets depending on the chosen deletion type.void
deleteDataSetsForced(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes, java.lang.String reason, DeletionType deletionType)
Deletes or trashes the specified data sets depending on the chosen deletion type.void
deleteExperiments(java.lang.String sessionToken, java.util.List<java.lang.Long> experimentIds, java.lang.String reason, DeletionType deletionType)
Deletes or trashes the specified experiments depending on the chosen deletion type.void
deleteMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId)
Deletes an existing metaproject.void
deletePermanently(java.lang.String sessionToken, java.util.List<java.lang.Long> deletionIds)
Permanently deletes entities moved to trash in specified deletions.void
deletePermanentlyForced(java.lang.String sessionToken, java.util.List<java.lang.Long> deletionIds)
Permanently deletes entities moved to trash in specified deletions.void
deleteProjects(java.lang.String sessionToken, java.util.List<java.lang.Long> projectIds, java.lang.String reason)
Deletes the specified projects.void
deleteSamples(java.lang.String sessionToken, java.util.List<java.lang.Long> sampleIds, java.lang.String reason, DeletionType deletionType)
Deletes or trashes the specified samples depending on the chosen deletion type.int
getMajorVersion()
Returns the major version of the server side interface.int
getMinorVersion()
Returns the minor version of this server side interface.WebAppSettings
getWebAppSettings(java.lang.String sessionToken, java.lang.String webAppId)
Returns the persistent settings for a given custom web app.void
registerPerson(java.lang.String sessionToken, java.lang.String userID)
Registers Person, this person should be available in one of the configured login systems to be usable.void
registerPersonSpaceRole(java.lang.String sessionToken, java.lang.String spaceCode, java.lang.String userID, java.lang.String roleCode)
Registers a space role for a given person.java.lang.String
registerSamples(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String sessionKey, java.lang.String defaultGroupIdentifier)
Registers samples parsing a file stored on the HTTP Session.java.lang.String
registerSamplesWithSilentOverrides(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String spaceIdentifierSilentOverrideOrNull, java.lang.String experimentIdentifierSilentOverrideOrNull, java.lang.String sessionKey, java.lang.String defaultGroupIdentifier)
Registers samples parsing a file stored on the HTTP Session.void
registerSpace(java.lang.String sessionToken, java.lang.String spaceCode, java.lang.String spaceDescription)
Registers a space.void
removeFromMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId, MetaprojectAssignmentsIds assignmentsToRemove)
Removes given entities from an existing metaproject.void
revertDeletions(java.lang.String sessionToken, java.util.List<java.lang.Long> deletionIds)
Reverts specified deletions (puts back all entities moved to trash in the deletions).void
setWebAppSettings(java.lang.String sessionToken, WebAppSettings webAppSettings)
Sets the persistent settings for a given custom web app.ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject
updateMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId, java.lang.String name, java.lang.String descriptionOrNull)
Updates an existing metaproject.void
updateSampleProperties(java.lang.String sessionToken, long sampleID, java.util.Map<java.lang.String,java.lang.String> properties)
java.lang.String
updateSamples(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String sessionKey, java.lang.String defaultGroupIdentifier)
Updates samples parsing a file stored on the HTTP Session.java.lang.String
updateSamplesWithSilentOverrides(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String spaceIdentifierSilentOverrideOrNull, java.lang.String experimentIdentifierSilentOverrideOrNull, java.lang.String sessionKey, java.lang.String defaultGroupIdentifier)
Updates samples parsing a file stored on the HTTP Session.java.util.Map<java.lang.String,java.lang.Object>
uploadedSamplesInfo(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String sessionKey)
Returns information regarding the uploaded file without discarding it.-
Methods inherited from class ch.systemsx.cisd.openbis.generic.server.AbstractServer
changeUserHomeSpace, checkSession, countActivePersons, createPerson, deactivatePersons, executeASync, expireSession, fillHomeSpace, getAuthSession, getBaseIndexURL, getDAOFactory, getDataSetTypeSlaveServerPlugin, getDefaultDisplaySettings, getPropertiesBatchManager, getSampleTypeSlaveServerPlugin, getServerInformation, getSession, getSessionManager, getSystemUser, getVersion, injectPerson, isArchivingConfigured, isProjectLevelAuthorizationEnabled, isProjectLevelAuthorizationUser, isProjectSamplesEnabled, listGridCustomColumns, logout, registerAtSessionManager, registerSamples, saveDisplaySettings, sendEmail, setBaseIndexURL, setCISDHelpdeskEmail, setDataSetTypeSlaveServerPlugin, setDisplaySettingsProvider, setDssFactory, setSampleTypeSlaveServerPlugin, setSessionUser, setSessionWorkspaceProvider, tryAuthenticate, tryAuthenticateAnonymously, tryAuthenticateAs, tryGetDisabledText, tryGetSession, tryToAuthenticate, tryToAuthenticateAsSystem, updateDisplaySettings
-
-
-
-
Field Detail
-
MINOR_VERSION
public static final int MINOR_VERSION
- See Also:
- Constant Field Values
-
requestContextProvider
public ch.systemsx.cisd.common.servlet.IRequestContextProvider requestContextProvider
-
-
Method Detail
-
createLogger
public IGeneralInformationChangingService createLogger(ch.systemsx.cisd.openbis.common.spring.IInvocationLoggerContext context)
- Specified by:
createLogger
in interfacech.systemsx.cisd.openbis.common.spring.IInvocationLoggerFactory<IGeneralInformationChangingService>
-
updateSampleProperties
@Transactional public void updateSampleProperties(java.lang.String sessionToken, long sampleID, java.util.Map<java.lang.String,java.lang.String> properties)
- Specified by:
updateSampleProperties
in interfaceIGeneralInformationChangingService
-
addUnofficialVocabularyTerm
@Transactional public void addUnofficialVocabularyTerm(java.lang.String sessionToken, ch.systemsx.cisd.openbis.generic.shared.basic.TechId vocabularyId, java.lang.String code, java.lang.String label, java.lang.String description, java.lang.Long previousTermOrdinal)
Description copied from interface:IGeneralInformationChangingService
Adds new unofficial terms to a vocabulary starting from specified ordinal + 1.- Specified by:
addUnofficialVocabularyTerm
in interfaceIGeneralInformationChangingService
-
addUnofficialVocabularyTerm
@Transactional public void addUnofficialVocabularyTerm(java.lang.String sessionToken, java.lang.Long vocabularyId, NewVocabularyTerm term)
Description copied from interface:IGeneralInformationChangingService
Adds new unofficial terms to a vocabulary starting from specified ordinal + 1.- Specified by:
addUnofficialVocabularyTerm
in interfaceIGeneralInformationChangingService
-
getWebAppSettings
@Transactional(readOnly=true) public WebAppSettings getWebAppSettings(java.lang.String sessionToken, java.lang.String webAppId)
Description copied from interface:IGeneralInformationChangingService
Returns the persistent settings for a given custom web app.- Specified by:
getWebAppSettings
in interfaceIGeneralInformationChangingService
webAppId
- The id of the custom web app to get the display settings for.
-
setWebAppSettings
@Transactional(readOnly=false) public void setWebAppSettings(java.lang.String sessionToken, WebAppSettings webAppSettings)
Description copied from interface:IGeneralInformationChangingService
Sets the persistent settings for a given custom web app.- Specified by:
setWebAppSettings
in interfaceIGeneralInformationChangingService
webAppSettings
- The new display settings
-
createMetaproject
@Transactional(readOnly=false) public ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject createMetaproject(java.lang.String sessionToken, java.lang.String name, java.lang.String descriptionOrNull)
Description copied from interface:IGeneralInformationChangingService
Creates a new metaproject.- Specified by:
createMetaproject
in interfaceIGeneralInformationChangingService
name
- Name of the metaprojectdescriptionOrNull
- Description of the metaproject- Returns:
- Newly created metaproject
-
updateMetaproject
@Transactional(readOnly=false) public ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject updateMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId, java.lang.String name, java.lang.String descriptionOrNull)
Description copied from interface:IGeneralInformationChangingService
Updates an existing metaproject.- Specified by:
updateMetaproject
in interfaceIGeneralInformationChangingService
metaprojectId
- Id of the metaproject to updatename
- New name of the metaprojectdescriptionOrNull
- New description of the metaproject- Returns:
- Updated metaproject
-
deleteMetaproject
@Transactional(readOnly=false) public void deleteMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId)
Description copied from interface:IGeneralInformationChangingService
Deletes an existing metaproject.- Specified by:
deleteMetaproject
in interfaceIGeneralInformationChangingService
metaprojectId
- Id of the metaproject to delete
-
addToMetaproject
@Transactional(readOnly=false) public void addToMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId, MetaprojectAssignmentsIds assignmentsToAdd)
Description copied from interface:IGeneralInformationChangingService
Adds given entities to an existing metaproject.- Specified by:
addToMetaproject
in interfaceIGeneralInformationChangingService
metaprojectId
- Id of the metaprojectassignmentsToAdd
- Assignments that should be added to the metaproject
-
removeFromMetaproject
@Transactional(readOnly=false) public void removeFromMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId, MetaprojectAssignmentsIds assignmentsToRemove)
Description copied from interface:IGeneralInformationChangingService
Removes given entities from an existing metaproject.- Specified by:
removeFromMetaproject
in interfaceIGeneralInformationChangingService
metaprojectId
- Id of the metaprojectassignmentsToRemove
- Assignments that should be removed from the metaproject
-
getMajorVersion
public int getMajorVersion()
Description copied from interface:IRpcService
Returns the major version of the server side interface. Different major versions are incompatible with one another.- Specified by:
getMajorVersion
in interfaceIRpcService
-
getMinorVersion
public int getMinorVersion()
Description copied from interface:IRpcService
Returns the minor version of this server side interface. Different minor versions, within the same major version, are compatible with one another.- Specified by:
getMinorVersion
in interfaceIRpcService
-
registerSamplesWithSilentOverrides
public final java.lang.String registerSamplesWithSilentOverrides(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String spaceIdentifierSilentOverrideOrNull, java.lang.String experimentIdentifierSilentOverrideOrNull, java.lang.String sessionKey, java.lang.String defaultGroupIdentifier)
Description copied from interface:IGeneralInformationChangingService
Registers samples parsing a file stored on the HTTP Session.- Specified by:
registerSamplesWithSilentOverrides
in interfaceIGeneralInformationChangingService
sampleTypeCode
- Sample type to parsespaceIdentifierSilentOverrideOrNull
- Silently overrides Space identifier if givenexperimentIdentifierSilentOverrideOrNull
- Silently overrides Experiment identifier if givensessionKey
- key of the file stored on the HTTP Session
-
registerSamples
public final java.lang.String registerSamples(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String sessionKey, java.lang.String defaultGroupIdentifier)
Description copied from interface:IGeneralInformationChangingService
Registers samples parsing a file stored on the HTTP Session.- Specified by:
registerSamples
in interfaceIGeneralInformationChangingService
sampleTypeCode
- Sample type to parsesessionKey
- key of the file stored on the HTTP Session
-
updateSamplesWithSilentOverrides
public final java.lang.String updateSamplesWithSilentOverrides(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String spaceIdentifierSilentOverrideOrNull, java.lang.String experimentIdentifierSilentOverrideOrNull, java.lang.String sessionKey, java.lang.String defaultGroupIdentifier)
Description copied from interface:IGeneralInformationChangingService
Updates samples parsing a file stored on the HTTP Session.- Specified by:
updateSamplesWithSilentOverrides
in interfaceIGeneralInformationChangingService
sampleTypeCode
- Sample type to parsesessionKey
- key of the file stored on the HTTP Session
-
updateSamples
public final java.lang.String updateSamples(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String sessionKey, java.lang.String defaultGroupIdentifier)
Description copied from interface:IGeneralInformationChangingService
Updates samples parsing a file stored on the HTTP Session.- Specified by:
updateSamples
in interfaceIGeneralInformationChangingService
sampleTypeCode
- Sample type to parsesessionKey
- key of the file stored on the HTTP Session
-
uploadedSamplesInfo
public final java.util.Map<java.lang.String,java.lang.Object> uploadedSamplesInfo(java.lang.String sessionToken, java.lang.String sampleTypeCode, java.lang.String sessionKey)
Description copied from interface:IGeneralInformationChangingService
Returns information regarding the uploaded file without discarding it.- Specified by:
uploadedSamplesInfo
in interfaceIGeneralInformationChangingService
sampleTypeCode
- Sample type to parsesessionKey
- key of the file stored on the HTTP Session
-
deleteProjects
public void deleteProjects(java.lang.String sessionToken, java.util.List<java.lang.Long> projectIds, java.lang.String reason)
Description copied from interface:IGeneralInformationChangingService
Deletes the specified projects.- Specified by:
deleteProjects
in interfaceIGeneralInformationChangingService
projectIds
- Ids of projects to deletereason
- Reason of the deletion
-
deleteExperiments
public void deleteExperiments(java.lang.String sessionToken, java.util.List<java.lang.Long> experimentIds, java.lang.String reason, DeletionType deletionType)
Description copied from interface:IGeneralInformationChangingService
Deletes or trashes the specified experiments depending on the chosen deletion type.- Specified by:
deleteExperiments
in interfaceIGeneralInformationChangingService
experimentIds
- Ids of experiments to deletereason
- Reason of the deletiondeletionType
- Type of the deletion
-
deleteSamples
public void deleteSamples(java.lang.String sessionToken, java.util.List<java.lang.Long> sampleIds, java.lang.String reason, DeletionType deletionType)
Description copied from interface:IGeneralInformationChangingService
Deletes or trashes the specified samples depending on the chosen deletion type.- Specified by:
deleteSamples
in interfaceIGeneralInformationChangingService
sampleIds
- Ids of samples to deletereason
- Reason of the deletiondeletionType
- Type of the deletion
-
deleteDataSets
public void deleteDataSets(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes, java.lang.String reason, DeletionType deletionType)
Description copied from interface:IGeneralInformationChangingService
Deletes or trashes the specified data sets depending on the chosen deletion type. This method CANNOT delete data sets with deletion_disallow flag set to true in their type (compare withIGeneralInformationChangingService.deleteDataSetsForced(String, List, String, DeletionType)
.- Specified by:
deleteDataSets
in interfaceIGeneralInformationChangingService
dataSetCodes
- Codes of data sets to deletereason
- Reason of the deletiondeletionType
- Type of the deletion
-
deleteDataSetsForced
public void deleteDataSetsForced(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes, java.lang.String reason, DeletionType deletionType)
Description copied from interface:IGeneralInformationChangingService
Deletes or trashes the specified data sets depending on the chosen deletion type. This method CAN delete data sets with deletion_disallow flag set to true in their type but requires special user privileges (compare withIGeneralInformationChangingService.deleteDataSets(String, List, String, DeletionType)
.- Specified by:
deleteDataSetsForced
in interfaceIGeneralInformationChangingService
dataSetCodes
- Codes of data sets to deletereason
- Reason of the deletiondeletionType
- Type of the deletion
-
revertDeletions
public void revertDeletions(java.lang.String sessionToken, java.util.List<java.lang.Long> deletionIds)
Description copied from interface:IGeneralInformationChangingService
Reverts specified deletions (puts back all entities moved to trash in the deletions).- Specified by:
revertDeletions
in interfaceIGeneralInformationChangingService
deletionIds
- Ids of deletions to be reverted
-
deletePermanently
public void deletePermanently(java.lang.String sessionToken, java.util.List<java.lang.Long> deletionIds)
Description copied from interface:IGeneralInformationChangingService
Permanently deletes entities moved to trash in specified deletions. This method CANNOT delete data sets with deletion_disallow flag set to true in their type (compare withIGeneralInformationChangingService.deletePermanentlyForced(String, List)
)- Specified by:
deletePermanently
in interfaceIGeneralInformationChangingService
deletionIds
- Ids of deletions to be deleted permanently
-
deletePermanentlyForced
public void deletePermanentlyForced(java.lang.String sessionToken, java.util.List<java.lang.Long> deletionIds)
Description copied from interface:IGeneralInformationChangingService
Permanently deletes entities moved to trash in specified deletions. It CAN delete data sets with deletion_disallow flag set to true in their type (compare withIGeneralInformationChangingService.deletePermanently(String, List)
).- Specified by:
deletePermanentlyForced
in interfaceIGeneralInformationChangingService
deletionIds
- Ids of deletions to be deleted permanently
-
registerPerson
public void registerPerson(java.lang.String sessionToken, java.lang.String userID)
Description copied from interface:IGeneralInformationChangingService
Registers Person, this person should be available in one of the configured login systems to be usable.- Specified by:
registerPerson
in interfaceIGeneralInformationChangingService
userID
- user to be added to the system
-
registerSpace
public void registerSpace(java.lang.String sessionToken, java.lang.String spaceCode, java.lang.String spaceDescription)
Description copied from interface:IGeneralInformationChangingService
Registers a space.- Specified by:
registerSpace
in interfaceIGeneralInformationChangingService
spaceCode
- space codespaceDescription
- space description
-
registerPersonSpaceRole
public void registerPersonSpaceRole(java.lang.String sessionToken, java.lang.String spaceCode, java.lang.String userID, java.lang.String roleCode)
Description copied from interface:IGeneralInformationChangingService
Registers a space role for a given person.- Specified by:
registerPersonSpaceRole
in interfaceIGeneralInformationChangingService
spaceCode
- space codeuserID
- user idroleCode
- openBIS role
-
-