Class GeneralInformationService
- java.lang.Object
-
- ch.systemsx.cisd.openbis.common.spring.AbstractServiceWithLogger<T>
-
- ch.systemsx.cisd.openbis.generic.server.AbstractServer<IGeneralInformationService>
-
- ch.systemsx.cisd.openbis.generic.server.api.v1.GeneralInformationService
-
- All Implemented Interfaces:
IRpcService
,ch.systemsx.cisd.openbis.common.spring.IInvocationLoggerFactory<IGeneralInformationService>
,IGeneralInformationService
,ch.systemsx.cisd.openbis.generic.shared.IServer
,ch.systemsx.cisd.openbis.generic.shared.ISessionProvider
@Component("general-information-api-server-v1") public class GeneralInformationService extends ch.systemsx.cisd.openbis.generic.server.AbstractServer<IGeneralInformationService> implements IGeneralInformationService
-
-
Field Summary
Fields Modifier and Type Field Description static int
MINOR_VERSION
-
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.IGeneralInformationService
JSON_SERVICE_URL, SERVICE_NAME, SERVICE_URL
-
-
Constructor Summary
Constructors Constructor Description GeneralInformationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Long
countNumberOfSamplesForType(java.lang.String sessionToken, java.lang.String sampleTypeCode)
Returns number of samples for a sample type code.IGeneralInformationService
createLogger(ch.systemsx.cisd.openbis.common.spring.IInvocationLoggerContext context)
protected ch.systemsx.cisd.openbis.generic.server.business.bo.fetchoptions.samplelister.ISampleLister
createSampleLister(ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE person)
java.util.List<DataSet>
filterDataSetsVisibleToUser(java.lang.String sessionToken, java.util.List<DataSet> allDataSets, java.lang.String userId)
Returns a filtered list of allDataSets containing those data sets which are visible to userId.java.util.List<Experiment>
filterExperimentsVisibleToUser(java.lang.String sessionToken, java.util.List<Experiment> allExperiments, java.lang.String userId)
Returns a filtered list of allExperiments containing those experiments which are visible to userId.java.util.List<Sample>
filterSamplesVisibleToUser(java.lang.String sessionToken, java.util.List<Sample> allSamples, java.lang.String userId)
Returns a filtered list of allSamples containing those samples which are visible to userId.java.lang.String
generateCode(java.lang.String sessionToken, java.lang.String prefix, java.lang.String entityKind)
Generate Code.java.util.List<DataSet>
getDataSetMetaData(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes)
Returns meta data for all specified data sets.java.util.List<DataSet>
getDataSetMetaData(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes, java.util.EnumSet<DataSetFetchOption> fetchOptions)
Returns meta data for all specified data sets.java.util.List<DataStoreURLForDataSets>
getDataStoreBaseURLs(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes)
Returns the download URL for the data store of specified data sets.java.lang.String
getDefaultPutDataStoreBaseURL(java.lang.String sessionToken)
Returns the URL for the default data store server for this openBIS AS.int
getMajorVersion()
Returns the major version of the server side interface.java.util.List<Material>
getMaterialByCodes(java.lang.String sessionToken, java.util.List<MaterialIdentifier> materialIdentifier)
Returns the materials with specified identifiers (i.e.MetaprojectAssignments
getMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId)
Returns all entities tagged with given metaproject.MetaprojectAssignments
getMetaprojectOnBehalfOfUser(java.lang.String sessionToken, IMetaprojectId metaprojectId, java.lang.String userId)
Returns all entities tagged with given metaproject for specified user.int
getMinorVersion()
Returns the minor version of this server side interface.java.util.Map<java.lang.String,java.lang.String>
getUserDisplaySettings(java.lang.String sessionToken)
java.util.HashMap<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary,java.util.List<ControlledVocabularyPropertyType.VocabularyTerm>>
getVocabularyTermsMap(java.lang.String sessionToken)
Returns map of avaialable vocabulary terms.boolean
isSessionActive(java.lang.String sessionToken)
Returns true if session with the specified token is still active, false otherwise.java.util.List<Attachment>
listAttachmentsForExperiment(java.lang.String sessionToken, IExperimentId experimentId, boolean allVersions)
Lists attachments of specified experiment.java.util.List<Attachment>
listAttachmentsForProject(java.lang.String sessionToken, IProjectId projectId, boolean allVersions)
Lists attachments of specified project.java.util.List<Attachment>
listAttachmentsForSample(java.lang.String sessionToken, ISampleId sampleId, boolean allVersions)
Lists attachments of specified sample.java.util.List<SearchDomain>
listAvailableSearchDomains(java.lang.String sessionToken)
Lists available search domains.java.util.List<DataSet>
listDataSets(java.lang.String sessionToken, java.util.List<Sample> samples)
Return all data sets attached to the given samples.java.util.List<DataSet>
listDataSets(java.lang.String sessionToken, java.util.List<Sample> samples, java.util.EnumSet<DataSet.Connections> connections)
Return all data sets attached to the given samples with connections.java.util.List<DataSet>
listDataSetsForExperiments(java.lang.String sessionToken, java.util.List<Experiment> experiments, java.util.EnumSet<DataSet.Connections> connections)
Return all data sets attached to the given experiments with connections.java.util.List<DataSet>
listDataSetsForExperimentsOnBehalfOfUser(java.lang.String sessionToken, java.util.List<Experiment> experiments, java.util.EnumSet<DataSet.Connections> connections, java.lang.String userId)
Return all data sets attached to the given experiments with connections that the user userId is allowed to see.java.util.List<DataSet>
listDataSetsForSample(java.lang.String sessionToken, Sample sample, boolean areOnlyDirectlyConnectedIncluded)
Return the data sets attached to the specified sample, optionally including child samples.java.util.List<DataSet>
listDataSetsOnBehalfOfUser(java.lang.String sessionToken, java.util.List<Sample> samples, java.util.EnumSet<DataSet.Connections> connections, java.lang.String userId)
Return all data sets attached to the given samples with connections that the user userId is allowed to see.java.util.List<DataSetType>
listDataSetTypes(java.lang.String sessionToken)
Returns all data set types.java.util.List<DataStore>
listDataStores(java.lang.String sessionToken)
Lists all DSS server registered this openBIS server instance.java.util.List<Deletion>
listDeletions(java.lang.String sessionToken, java.util.EnumSet<DeletionFetchOption> fetchOptions)
Returns all deletions.java.util.List<Experiment>
listExperiments(java.lang.String sessionToken, java.util.List<Project> projects, java.lang.String experimentTypeString)
Return all experiments of the given type that belong to the supplied projects.java.util.List<Experiment>
listExperiments(java.lang.String sessionToken, java.util.List<java.lang.String> experimentIdentifiers)
Return all experiments matching a specified set of identifiers.java.util.List<Experiment>
listExperimentsHavingDataSets(java.lang.String sessionToken, java.util.List<Project> projects, java.lang.String experimentTypeString)
Return all experiments of the given type that belong to the supplied projects and have registered data sets.java.util.List<Experiment>
listExperimentsHavingSamples(java.lang.String sessionToken, java.util.List<Project> projects, java.lang.String experimentTypeString)
Return all experiments of the given type that belong to the supplied projects and have registered samles.java.util.List<ExperimentType>
listExperimentTypes(java.lang.String sessionToken)
Returns all experiment types.java.util.List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject>
listMetaprojects(java.lang.String sessionToken)
Lists all metaprojects belonging to current user.java.util.List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject>
listMetaprojectsOnBehalfOfUser(java.lang.String sessionToken, java.lang.String userId)
Lists all metaprojects belonging to specified user.java.util.Map<java.lang.String,java.util.Set<Role>>
listNamedRoleSets(java.lang.String sessionToken)
Returns all named role sets.java.util.List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Person>
listPersons(java.lang.String sessionToken)
Returns all persons.java.util.List<Project>
listProjects(java.lang.String sessionToken)
Returns all available projects.java.util.List<Project>
listProjectsOnBehalfOfUser(java.lang.String sessionToken, java.lang.String userId)
Returns all available projects that a particular user is allowed to see.java.util.List<PropertyType>
listPropertyTypes(java.lang.String sessionToken, boolean withRelations)
Lists property types.java.util.List<Sample>
listSamplesForExperiment(java.lang.String sessionToken, java.lang.String experimentIdentifierString)
Return all samples that belong to the supplied experiment.java.util.List<Sample>
listSamplesForExperimentOnBehalfOfUser(java.lang.String sessionToken, java.lang.String experimentIdentifierString, java.lang.String userId)
Return all samples that belong to the supplied experiment that are visible to user userId.java.util.List<SampleType>
listSampleTypes(java.lang.String sessionToken)
Returns all sample types.java.util.List<SpaceWithProjectsAndRoleAssignments>
listSpacesWithProjectsAndRoleAssignments(java.lang.String sessionToken, java.lang.String databaseInstanceCodeOrNull)
Returns all spaces of specified database instance enriched with their projects and role assignments.java.util.List<Vocabulary>
listVocabularies(java.lang.String sessionToken)
Returns all available vocabularies together with the contained terms.java.util.List<DataSet>
searchForDataSets(java.lang.String sessionToken, SearchCriteria searchCriteria)
Return all data sets matching specified search criteria.java.util.List<DataSet>
searchForDataSetsOnBehalfOfUser(java.lang.String sessionToken, SearchCriteria searchCriteria, java.lang.String userId)
Return all data sets matching specified search criteria and visible to user userId.java.util.List<Experiment>
searchForExperiments(java.lang.String sessionToken, SearchCriteria searchCriteria)
Returns all experiments matching specified search criteria.java.util.List<Material>
searchForMaterials(java.lang.String sessionToken, SearchCriteria searchCriteria)
Returns all material fulfilling specified search criteria.java.util.List<Sample>
searchForSamples(java.lang.String sessionToken, SearchCriteria searchCriteria)
Return all samples that match the search criteria.java.util.List<Sample>
searchForSamples(java.lang.String sessionToken, SearchCriteria searchCriteria, java.util.EnumSet<SampleFetchOption> fetchOptions)
Return all samples that match the search criteria.java.util.List<Sample>
searchForSamplesOnBehalfOfUser(java.lang.String sessionToken, SearchCriteria searchCriteria, java.util.EnumSet<SampleFetchOption> fetchOptions, java.lang.String userId)
Return all samples that match the search criteria and that a particular user is allowed to see.java.util.List<SearchDomainSearchResult>
searchOnSearchDomain(java.lang.String sessionToken, java.lang.String preferredSearchDomainOrNull, java.lang.String searchString, java.util.Map<java.lang.String,java.lang.String> optionalParametersOrNull)
Searches on a search domain.java.lang.String
tryGetDataStoreBaseURL(java.lang.String sessionToken, java.lang.String dataSetCode)
Returns the download URL for the data store of specified data set or null if such data set does not exist.java.lang.String
tryToAuthenticateForAllServices(java.lang.String userID, java.lang.String userPassword)
Tries to authenticate specified user with specified password.-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.systemsx.cisd.openbis.generic.shared.api.v1.IGeneralInformationService
logout
-
-
-
-
Field Detail
-
MINOR_VERSION
public static final int MINOR_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
createLogger
public IGeneralInformationService createLogger(ch.systemsx.cisd.openbis.common.spring.IInvocationLoggerContext context)
- Specified by:
createLogger
in interfacech.systemsx.cisd.openbis.common.spring.IInvocationLoggerFactory<IGeneralInformationService>
-
tryToAuthenticateForAllServices
@Transactional public java.lang.String tryToAuthenticateForAllServices(java.lang.String userID, java.lang.String userPassword)
Description copied from interface:IGeneralInformationService
Tries to authenticate specified user with specified password. Returns session token if succeeded otherwisenull
is returned. The returned session token can be used for all methods and interfaces of the same openBIS server.- Specified by:
tryToAuthenticateForAllServices
in interfaceIGeneralInformationService
-
isSessionActive
@Transactional(readOnly=true) public boolean isSessionActive(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns true if session with the specified token is still active, false otherwise.- Specified by:
isSessionActive
in interfaceIGeneralInformationService
-
listNamedRoleSets
@Transactional(readOnly=true) public java.util.Map<java.lang.String,java.util.Set<Role>> listNamedRoleSets(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns all named role sets. The name is the key of the returned map.- Specified by:
listNamedRoleSets
in interfaceIGeneralInformationService
-
listSpacesWithProjectsAndRoleAssignments
@Transactional(readOnly=true) public java.util.List<SpaceWithProjectsAndRoleAssignments> listSpacesWithProjectsAndRoleAssignments(java.lang.String sessionToken, java.lang.String databaseInstanceCodeOrNull)
Description copied from interface:IGeneralInformationService
Returns all spaces of specified database instance enriched with their projects and role assignments.- Specified by:
listSpacesWithProjectsAndRoleAssignments
in interfaceIGeneralInformationService
databaseInstanceCodeOrNull
- Code of an imported database instance ornull
for the home database instance is meant.
-
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
-
searchForSamples
@Transactional(readOnly=true) public java.util.List<Sample> searchForSamples(java.lang.String sessionToken, SearchCriteria searchCriteria)
Description copied from interface:IGeneralInformationService
Return all samples that match the search criteria. This is a short cut forsearchForSamples(sessionToken, searchCritera, EnumSet.of(SampleFetchOption.PROPERTIES))
- Specified by:
searchForSamples
in interfaceIGeneralInformationService
searchCriteria
- The sample metadata values to be matched against.
-
searchForSamples
@Transactional(readOnly=true) public java.util.List<Sample> searchForSamples(java.lang.String sessionToken, SearchCriteria searchCriteria, java.util.EnumSet<SampleFetchOption> fetchOptions)
Description copied from interface:IGeneralInformationService
Return all samples that match the search criteria.The fetch options set is interpreted by the following rules.
- If it does not contain
SampleFetchOption.PROPERTIES
only the basic attributes are returned for all samples including possible ancestors and descendants. SampleFetchOption.CHILDREN
will be ignored ifSampleFetchOption.DESCENDANTS
is in the set.SampleFetchOption.PARENTS
will be ignored ifSampleFetchOption.ANCESTORS
is in the set.- It is possible to combine
SampleFetchOption.CHILDREN
/SampleFetchOption.DESCENDANTS
withSampleFetchOption.PARENTS
/SampleFetchOption.ANCESTORS
.
- Specified by:
searchForSamples
in interfaceIGeneralInformationService
searchCriteria
- The sample metadata values to be matched against.fetchOptions
- Options that control which parts of the samples are fetched.
- If it does not contain
-
searchForSamplesOnBehalfOfUser
@Transactional(readOnly=true) public java.util.List<Sample> searchForSamplesOnBehalfOfUser(java.lang.String sessionToken, SearchCriteria searchCriteria, java.util.EnumSet<SampleFetchOption> fetchOptions, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Return all samples that match the search criteria and that a particular user is allowed to see.The fetch options set is interpreted by the following rules.
- If it does not contain
SampleFetchOption.PROPERTIES
only the basic attributes are returned for all samples including possible ancestors and descendants. SampleFetchOption.CHILDREN
will be ignored ifSampleFetchOption.DESCENDANTS
is in the set.SampleFetchOption.PARENTS
will be ignored ifSampleFetchOption.ANCESTORS
is in the set.- It is possible to combine
SampleFetchOption.CHILDREN
/SampleFetchOption.DESCENDANTS
withSampleFetchOption.PARENTS
/SampleFetchOption.ANCESTORS
.
May only be called by users who are
INSTANCE_OBSERVER
.- Specified by:
searchForSamplesOnBehalfOfUser
in interfaceIGeneralInformationService
searchCriteria
- The sample metadata values to be matched against.fetchOptions
- Options that control which parts of the samples are fetched.
- If it does not contain
-
filterSamplesVisibleToUser
@Transactional(readOnly=true) public java.util.List<Sample> filterSamplesVisibleToUser(java.lang.String sessionToken, java.util.List<Sample> allSamples, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Returns a filtered list of allSamples containing those samples which are visible to userId.- Specified by:
filterSamplesVisibleToUser
in interfaceIGeneralInformationService
allSamples
- The list of samples that should be filtered.userId
- The user that the samples should be visible to that survive the filtering.- Returns:
- The filtered list of allSamples containing those samples which are visible to userId.
-
createSampleLister
protected ch.systemsx.cisd.openbis.generic.server.business.bo.fetchoptions.samplelister.ISampleLister createSampleLister(ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE person)
-
listSamplesForExperiment
@Transactional(readOnly=true) public java.util.List<Sample> listSamplesForExperiment(java.lang.String sessionToken, java.lang.String experimentIdentifierString)
Description copied from interface:IGeneralInformationService
Return all samples that belong to the supplied experiment.- Specified by:
listSamplesForExperiment
in interfaceIGeneralInformationService
experimentIdentifierString
- The identifier of the experiment samples will be listed for.
-
listSamplesForExperimentOnBehalfOfUser
@Transactional(readOnly=true) public java.util.List<Sample> listSamplesForExperimentOnBehalfOfUser(java.lang.String sessionToken, java.lang.String experimentIdentifierString, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Return all samples that belong to the supplied experiment that are visible to user userId.May only be called by users with capability
LIST_PROJECTS_ON_BEHALF_OF_USER
.- Specified by:
listSamplesForExperimentOnBehalfOfUser
in interfaceIGeneralInformationService
experimentIdentifierString
- The identifier of the experiment samples will be listed for.userId
- The user to run this query on behalf of.
-
listDataSets
@Transactional(readOnly=true) public java.util.List<DataSet> listDataSets(java.lang.String sessionToken, java.util.List<Sample> samples)
Description copied from interface:IGeneralInformationService
Return all data sets attached to the given samples.- Specified by:
listDataSets
in interfaceIGeneralInformationService
samples
- The samples for which we return attached data sets.
-
listExperiments
@Transactional(readOnly=true) public java.util.List<Experiment> listExperiments(java.lang.String sessionToken, java.util.List<Project> projects, java.lang.String experimentTypeString)
Description copied from interface:IGeneralInformationService
Return all experiments of the given type that belong to the supplied projects.- Specified by:
listExperiments
in interfaceIGeneralInformationService
projects
- The projects for which we return attached experiments.experimentTypeString
- The experiment type of the experiments we want to list. Since version 1.9 NULL are accepted. Specifying a NULL experiment type will result in all experiments for the specified projects being returned.
-
listExperimentsHavingDataSets
@Transactional(readOnly=true) public java.util.List<Experiment> listExperimentsHavingDataSets(java.lang.String sessionToken, java.util.List<Project> projects, java.lang.String experimentTypeString)
Description copied from interface:IGeneralInformationService
Return all experiments of the given type that belong to the supplied projects and have registered data sets.- Specified by:
listExperimentsHavingDataSets
in interfaceIGeneralInformationService
projects
- The projects for which we return attached experiments.experimentTypeString
- The experiment type of the experiments we want to list. Specifying a NULL experiment type will result in all experiments for the specified projects being returned.
-
listExperimentsHavingSamples
@Transactional(readOnly=true) public java.util.List<Experiment> listExperimentsHavingSamples(java.lang.String sessionToken, java.util.List<Project> projects, java.lang.String experimentTypeString)
Description copied from interface:IGeneralInformationService
Return all experiments of the given type that belong to the supplied projects and have registered samles.- Specified by:
listExperimentsHavingSamples
in interfaceIGeneralInformationService
projects
- The projects for which we return attached experiments.experimentTypeString
- The experiment type of the experiments we want to list. Specifying a NULL experiment type will result in all experiments for the specified projects being returned.
-
filterExperimentsVisibleToUser
@Transactional(readOnly=true) public java.util.List<Experiment> filterExperimentsVisibleToUser(java.lang.String sessionToken, java.util.List<Experiment> allExperiments, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Returns a filtered list of allExperiments containing those experiments which are visible to userId.- Specified by:
filterExperimentsVisibleToUser
in interfaceIGeneralInformationService
allExperiments
- The list of experiments that should be filtered.userId
- The user that the experiments should be visible to that survive the filtering.- Returns:
- The filtered list of allExperiments containing all experiments which are visible to userId.
-
listDataSetsForSample
@Transactional(readOnly=true) public java.util.List<DataSet> listDataSetsForSample(java.lang.String sessionToken, Sample sample, boolean areOnlyDirectlyConnectedIncluded)
Description copied from interface:IGeneralInformationService
Return the data sets attached to the specified sample, optionally including child samples. Note, that for returned container data sets the contained data sets have only code, type and registration date set.- Specified by:
listDataSetsForSample
in interfaceIGeneralInformationService
sample
- The sample for which we return attached data sets.areOnlyDirectlyConnectedIncluded
- If true, only data sets that are directly connected to the sample are included, otherwise data sets of child samples are included as well.
-
listDataStores
@Transactional(readOnly=true) public java.util.List<DataStore> listDataStores(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Lists all DSS server registered this openBIS server instance. Any of the returned instances could be offline at the time of the listing.- Specified by:
listDataStores
in interfaceIGeneralInformationService
-
getDefaultPutDataStoreBaseURL
@Transactional(readOnly=true) public java.lang.String getDefaultPutDataStoreBaseURL(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns the URL for the default data store server for this openBIS AS.- Specified by:
getDefaultPutDataStoreBaseURL
in interfaceIGeneralInformationService
-
tryGetDataStoreBaseURL
@Transactional(readOnly=true) public java.lang.String tryGetDataStoreBaseURL(java.lang.String sessionToken, java.lang.String dataSetCode)
Description copied from interface:IGeneralInformationService
Returns the download URL for the data store of specified data set or null if such data set does not exist.- Specified by:
tryGetDataStoreBaseURL
in interfaceIGeneralInformationService
-
getDataStoreBaseURLs
@Transactional(readOnly=true) public java.util.List<DataStoreURLForDataSets> getDataStoreBaseURLs(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes)
Description copied from interface:IGeneralInformationService
Returns the download URL for the data store of specified data sets.- Specified by:
getDataStoreBaseURLs
in interfaceIGeneralInformationService
- Returns:
- One entry for each data store that has data sets from dataSetCodes, together with the data set codes that are in this data store.
-
listDataSetTypes
@Transactional(readOnly=true) public java.util.List<DataSetType> listDataSetTypes(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns all data set types.- Specified by:
listDataSetTypes
in interfaceIGeneralInformationService
-
listSampleTypes
@Transactional(readOnly=true) public java.util.List<SampleType> listSampleTypes(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns all sample types.- Specified by:
listSampleTypes
in interfaceIGeneralInformationService
-
listExperimentTypes
@Transactional(readOnly=true) public java.util.List<ExperimentType> listExperimentTypes(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns all experiment types.- Specified by:
listExperimentTypes
in interfaceIGeneralInformationService
-
getVocabularyTermsMap
@Transactional(readOnly=true) public java.util.HashMap<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Vocabulary,java.util.List<ControlledVocabularyPropertyType.VocabularyTerm>> getVocabularyTermsMap(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns map of avaialable vocabulary terms.The method cannot be fully utilized over JSON-RPC, because there is no sensible way to (de)serialize a
Vocabulary
object to/from String. Any working implementation will make the life of non-java clients (e.g. Javascript) unnecessarily complicated.- Specified by:
getVocabularyTermsMap
in interfaceIGeneralInformationService
-
listVocabularies
@Transactional(readOnly=true) public java.util.List<Vocabulary> listVocabularies(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns all available vocabularies together with the contained terms.- Specified by:
listVocabularies
in interfaceIGeneralInformationService
-
listDataSets
@Transactional(readOnly=true) public java.util.List<DataSet> listDataSets(java.lang.String sessionToken, java.util.List<Sample> samples, java.util.EnumSet<DataSet.Connections> connections)
Description copied from interface:IGeneralInformationService
Return all data sets attached to the given samples with connections.- Specified by:
listDataSets
in interfaceIGeneralInformationService
samples
- The samples for which we return attached data sets.
-
listDataSetsOnBehalfOfUser
@Transactional(readOnly=true) public java.util.List<DataSet> listDataSetsOnBehalfOfUser(java.lang.String sessionToken, java.util.List<Sample> samples, java.util.EnumSet<DataSet.Connections> connections, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Return all data sets attached to the given samples with connections that the user userId is allowed to see.May only be called by users with capability
LIST_PROJECTS_ON_BEHALF_OF_USER
.- Specified by:
listDataSetsOnBehalfOfUser
in interfaceIGeneralInformationService
samples
- The samples for which we return attached data sets.userId
- The user to run this query on behalf of.
-
listDataSetsForExperiments
@Transactional(readOnly=true) public java.util.List<DataSet> listDataSetsForExperiments(java.lang.String sessionToken, java.util.List<Experiment> experiments, java.util.EnumSet<DataSet.Connections> connections)
Description copied from interface:IGeneralInformationService
Return all data sets attached to the given experiments with connections.- Specified by:
listDataSetsForExperiments
in interfaceIGeneralInformationService
experiments
- The experiments for which we return attached data sets.
-
listDataSetsForExperimentsOnBehalfOfUser
@Transactional(readOnly=true) public java.util.List<DataSet> listDataSetsForExperimentsOnBehalfOfUser(java.lang.String sessionToken, java.util.List<Experiment> experiments, java.util.EnumSet<DataSet.Connections> connections, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Return all data sets attached to the given experiments with connections that the user userId is allowed to see.May only be called by users with capability
LIST_PROJECTS_ON_BEHALF_OF_USER
.- Specified by:
listDataSetsForExperimentsOnBehalfOfUser
in interfaceIGeneralInformationService
experiments
- The experiments for which we return attached data sets.userId
- The user to run this query on behalf of.
-
getDataSetMetaData
@Transactional(readOnly=true) public java.util.List<DataSet> getDataSetMetaData(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes)
Description copied from interface:IGeneralInformationService
Returns meta data for all specified data sets. This contains data set type, properties, and codes of linked parent and children data sets. For container data sets the contained data sets are not returned. Thus,DataSet.getContainedDataSets()
is always empty.- Specified by:
getDataSetMetaData
in interfaceIGeneralInformationService
dataSetCodes
- Codes of requested data sets.- Returns:
- result in the same order as the list of data set codes.
-
getDataSetMetaData
@Transactional(readOnly=true) public java.util.List<DataSet> getDataSetMetaData(java.lang.String sessionToken, java.util.List<java.lang.String> dataSetCodes, java.util.EnumSet<DataSetFetchOption> fetchOptions)
Description copied from interface:IGeneralInformationService
Returns meta data for all specified data sets. Which parts of the data sets objects are fetched is controlled with thefetchOptions
parameter.- Specified by:
getDataSetMetaData
in interfaceIGeneralInformationService
dataSetCodes
- Codes of requested data sets.fetchOptions
- Options that control which parts of the data sets are fetched.- Returns:
- result in the same order as the list of data set codes.
-
searchOnSearchDomain
@Transactional(readOnly=true) public java.util.List<SearchDomainSearchResult> searchOnSearchDomain(java.lang.String sessionToken, java.lang.String preferredSearchDomainOrNull, java.lang.String searchString, java.util.Map<java.lang.String,java.lang.String> optionalParametersOrNull)
Description copied from interface:IGeneralInformationService
Searches on a search domain. If no preferred search domain is specified the first available one will be used. If the preferred sequence search domain doesn't exist or isn't available also the first available one will be used.- Specified by:
searchOnSearchDomain
in interfaceIGeneralInformationService
preferredSearchDomainOrNull
- The key of the preferred search domain ornull
.searchString
- The search string.optionalParametersOrNull
- Optional parameters. Can benull
. The semantics depends on the type of search domain.
-
listAvailableSearchDomains
@Transactional(readOnly=true) public java.util.List<SearchDomain> listAvailableSearchDomains(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Lists available search domains. Their name attribute can be used when invokingIGeneralInformationService.searchOnSearchDomain(String, String, String, Map)
.- Specified by:
listAvailableSearchDomains
in interfaceIGeneralInformationService
- Returns:
- empty list if no search domain is available.
-
searchForDataSets
@Transactional(readOnly=true) public java.util.List<DataSet> searchForDataSets(java.lang.String sessionToken, SearchCriteria searchCriteria)
Description copied from interface:IGeneralInformationService
Return all data sets matching specified search criteria. Note, that for returned container data sets the contained data sets have only code, type and registration date set.- Specified by:
searchForDataSets
in interfaceIGeneralInformationService
searchCriteria
- the criteria used for searching.
-
searchForDataSetsOnBehalfOfUser
@Transactional(readOnly=true) public java.util.List<DataSet> searchForDataSetsOnBehalfOfUser(java.lang.String sessionToken, SearchCriteria searchCriteria, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Return all data sets matching specified search criteria and visible to user userId. Note, that for returned container data sets the contained data sets have only code, type and registration date set.May only be called by users who are
INSTANCE_OBSERVER
.- Specified by:
searchForDataSetsOnBehalfOfUser
in interfaceIGeneralInformationService
searchCriteria
- the criteria used for searching.
-
filterDataSetsVisibleToUser
@Transactional(readOnly=true) public java.util.List<DataSet> filterDataSetsVisibleToUser(java.lang.String sessionToken, java.util.List<DataSet> allDataSets, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Returns a filtered list of allDataSets containing those data sets which are visible to userId.- Specified by:
filterDataSetsVisibleToUser
in interfaceIGeneralInformationService
allDataSets
- The list of data sets that should be filtered.userId
- The user that the data sets should be visible to that survive the filtering.- Returns:
- The filtered list of allDataSets containing those data sets which are visible to userId.
-
listExperiments
@Transactional(readOnly=true) public java.util.List<Experiment> listExperiments(java.lang.String sessionToken, java.util.List<java.lang.String> experimentIdentifiers)
Description copied from interface:IGeneralInformationService
Return all experiments matching a specified set of identifiers.- Specified by:
listExperiments
in interfaceIGeneralInformationService
experimentIdentifiers
- the identifiers of the experiments to be returned.
-
searchForExperiments
@Transactional(readOnly=true) public java.util.List<Experiment> searchForExperiments(java.lang.String sessionToken, SearchCriteria searchCriteria)
Description copied from interface:IGeneralInformationService
Returns all experiments matching specified search criteria. Note, that sub criterias are not supported.- Specified by:
searchForExperiments
in interfaceIGeneralInformationService
-
listProjects
@Transactional(readOnly=true) public java.util.List<Project> listProjects(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns all available projects.- Specified by:
listProjects
in interfaceIGeneralInformationService
-
listProjectsOnBehalfOfUser
@Transactional(readOnly=true) public java.util.List<Project> listProjectsOnBehalfOfUser(java.lang.String sessionToken, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Returns all available projects that a particular user is allowed to see.May only be called by users with capability
LIST_PROJECTS_ON_BEHALF_OF_USER
.- Specified by:
listProjectsOnBehalfOfUser
in interfaceIGeneralInformationService
userId
- The user identifier of the user to get the projects for.
-
getMaterialByCodes
@Transactional(readOnly=true) public java.util.List<Material> getMaterialByCodes(java.lang.String sessionToken, java.util.List<MaterialIdentifier> materialIdentifier)
Description copied from interface:IGeneralInformationService
Returns the materials with specified identifiers (i.e. code and type).- Specified by:
getMaterialByCodes
in interfaceIGeneralInformationService
-
searchForMaterials
@Transactional(readOnly=true) public java.util.List<Material> searchForMaterials(java.lang.String sessionToken, SearchCriteria searchCriteria)
Description copied from interface:IGeneralInformationService
Returns all material fulfilling specified search criteria.- Specified by:
searchForMaterials
in interfaceIGeneralInformationService
-
listMetaprojects
@Transactional(readOnly=true) public java.util.List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject> listMetaprojects(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Lists all metaprojects belonging to current user.- Specified by:
listMetaprojects
in interfaceIGeneralInformationService
-
listMetaprojectsOnBehalfOfUser
@Transactional(readOnly=true) public java.util.List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject> listMetaprojectsOnBehalfOfUser(java.lang.String sessionToken, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Lists all metaprojects belonging to specified user.- Specified by:
listMetaprojectsOnBehalfOfUser
in interfaceIGeneralInformationService
-
getMetaproject
@Transactional(readOnly=true) public MetaprojectAssignments getMetaproject(java.lang.String sessionToken, IMetaprojectId metaprojectId)
Description copied from interface:IGeneralInformationService
Returns all entities tagged with given metaproject.- Specified by:
getMetaproject
in interfaceIGeneralInformationService
-
getMetaprojectOnBehalfOfUser
@Transactional(readOnly=true) public MetaprojectAssignments getMetaprojectOnBehalfOfUser(java.lang.String sessionToken, IMetaprojectId metaprojectId, java.lang.String userId)
Description copied from interface:IGeneralInformationService
Returns all entities tagged with given metaproject for specified user.- Specified by:
getMetaprojectOnBehalfOfUser
in interfaceIGeneralInformationService
-
listAttachmentsForProject
@Transactional(readOnly=true) public java.util.List<Attachment> listAttachmentsForProject(java.lang.String sessionToken, IProjectId projectId, boolean allVersions)
Description copied from interface:IGeneralInformationService
Lists attachments of specified project.- Specified by:
listAttachmentsForProject
in interfaceIGeneralInformationService
allVersions
- Iftrue
, return all versions of the attachments, otherwise return only the latest version.
-
listAttachmentsForExperiment
@Transactional(readOnly=true) public java.util.List<Attachment> listAttachmentsForExperiment(java.lang.String sessionToken, IExperimentId experimentId, boolean allVersions)
Description copied from interface:IGeneralInformationService
Lists attachments of specified experiment.- Specified by:
listAttachmentsForExperiment
in interfaceIGeneralInformationService
allVersions
- Iftrue
, return all versions of the attachments, otherwise return only the latest version.
-
listAttachmentsForSample
@Transactional(readOnly=true) public java.util.List<Attachment> listAttachmentsForSample(java.lang.String sessionToken, ISampleId sampleId, boolean allVersions)
Description copied from interface:IGeneralInformationService
Lists attachments of specified sample.- Specified by:
listAttachmentsForSample
in interfaceIGeneralInformationService
allVersions
- Iftrue
, return all versions of the attachments, otherwise return only the latest version.
-
getUserDisplaySettings
@Transactional(readOnly=true) public final java.util.Map<java.lang.String,java.lang.String> getUserDisplaySettings(java.lang.String sessionToken)
- Specified by:
getUserDisplaySettings
in interfaceIGeneralInformationService
-
listPropertyTypes
@Transactional(readOnly=true) public java.util.List<PropertyType> listPropertyTypes(java.lang.String sessionToken, boolean withRelations)
Description copied from interface:IGeneralInformationService
Lists property types.- Specified by:
listPropertyTypes
in interfaceIGeneralInformationService
withRelations
- Iftrue
, return relations.
-
generateCode
@Transactional public java.lang.String generateCode(java.lang.String sessionToken, java.lang.String prefix, java.lang.String entityKind)
Description copied from interface:IGeneralInformationService
Generate Code.- Specified by:
generateCode
in interfaceIGeneralInformationService
-
listDeletions
@Transactional(readOnly=true) public java.util.List<Deletion> listDeletions(java.lang.String sessionToken, java.util.EnumSet<DeletionFetchOption> fetchOptions)
Description copied from interface:IGeneralInformationService
Returns all deletions.- Specified by:
listDeletions
in interfaceIGeneralInformationService
fetchOptions
- Options that control which parts of the deletions are fetched.- Returns:
- a sorted list of
Deletion
.
-
listPersons
public java.util.List<ch.systemsx.cisd.openbis.generic.shared.basic.dto.Person> listPersons(java.lang.String sessionToken)
Description copied from interface:IGeneralInformationService
Returns all persons.- Specified by:
listPersons
in interfaceIGeneralInformationService
- Returns:
- a list of maps with the user information.
-
countNumberOfSamplesForType
@Transactional(readOnly=true) public java.lang.Long countNumberOfSamplesForType(java.lang.String sessionToken, java.lang.String sampleTypeCode)
Description copied from interface:IGeneralInformationService
Returns number of samples for a sample type code.- Specified by:
countNumberOfSamplesForType
in interfaceIGeneralInformationService
- Returns:
- the number of samples for certain type.
-
-