Interface IGeneralInformationService

  • All Superinterfaces:
    IRpcService

    public interface IGeneralInformationService
    extends IRpcService
    Service for retrieving general informations.
    • Field Detail

      • SERVICE_NAME

        static final java.lang.String SERVICE_NAME
        Name of this service for which it is registered at the RPC name server.
        See Also:
        Constant Field Values
      • SERVICE_URL

        static final java.lang.String SERVICE_URL
        Application part of the URL to access this service remotely.
        See Also:
        Constant Field Values
    • Method Detail

      • tryToAuthenticateForAllServices

        java.lang.String tryToAuthenticateForAllServices​(java.lang.String userID,
                                                         java.lang.String userPassword)
        Tries to authenticate specified user with specified password. Returns session token if succeeded otherwise null is returned. The returned session token can be used for all methods and interfaces of the same openBIS server.
      • logout

        void logout​(java.lang.String sessionToken)
        Logout the session with the specified session token.
      • isSessionActive

        boolean isSessionActive​(java.lang.String sessionToken)
        Returns true if session with the specified token is still active, false otherwise.
        Since:
        1.4
      • listNamedRoleSets

        java.util.Map<java.lang.String,​java.util.Set<Role>> listNamedRoleSets​(java.lang.String sessionToken)
        Returns all named role sets. The name is the key of the returned map.
      • listSpacesWithProjectsAndRoleAssignments

        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.
        Parameters:
        databaseInstanceCodeOrNull - Code of an imported database instance or null for the home database instance is meant.
      • searchForSamples

        java.util.List<Sample> searchForSamples​(java.lang.String sessionToken,
                                                SearchCriteria searchCriteria)
        Return all samples that match the search criteria. This is a short cut for
         searchForSamples(sessionToken, searchCritera, EnumSet.of(SampleFetchOption.PROPERTIES))
         
        Parameters:
        searchCriteria - The sample metadata values to be matched against.
        Since:
        1.1
      • filterSamplesVisibleToUser

        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.
        Parameters:
        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.
        Since:
        1.18
      • listSamplesForExperiment

        java.util.List<Sample> listSamplesForExperiment​(java.lang.String sessionToken,
                                                        java.lang.String experimentIdentifierString)
        Return all samples that belong to the supplied experiment.
        Parameters:
        experimentIdentifierString - The identifier of the experiment samples will be listed for.
        Since:
        1.1
      • listSamplesForExperimentOnBehalfOfUser

        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.

        May only be called by users with capability LIST_PROJECTS_ON_BEHALF_OF_USER.

        Parameters:
        experimentIdentifierString - The identifier of the experiment samples will be listed for.
        userId - The user to run this query on behalf of.
        Since:
        1.18
      • listDataSets

        java.util.List<DataSet> listDataSets​(java.lang.String sessionToken,
                                             java.util.List<Sample> samples)
        Return all data sets attached to the given samples.
        Parameters:
        samples - The samples for which we return attached data sets.
        Since:
        1.1
      • listExperiments

        java.util.List<Experiment> listExperiments​(java.lang.String sessionToken,
                                                   java.util.List<Project> projects,
                                                   java.lang.String experimentType)
        Return all experiments of the given type that belong to the supplied projects.
        Parameters:
        projects - The projects for which we return attached experiments.
        experimentType - 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.
        Since:
        1.2
      • listExperimentsHavingSamples

        java.util.List<Experiment> listExperimentsHavingSamples​(java.lang.String sessionToken,
                                                                java.util.List<Project> projects,
                                                                java.lang.String experimentType)
        Return all experiments of the given type that belong to the supplied projects and have registered samles.
        Parameters:
        projects - The projects for which we return attached experiments.
        experimentType - 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.
        Since:
        1.15
      • listExperimentsHavingDataSets

        java.util.List<Experiment> listExperimentsHavingDataSets​(java.lang.String sessionToken,
                                                                 java.util.List<Project> projects,
                                                                 java.lang.String experimentType)
        Return all experiments of the given type that belong to the supplied projects and have registered data sets.
        Parameters:
        projects - The projects for which we return attached experiments.
        experimentType - 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.
        Since:
        1.15
      • filterExperimentsVisibleToUser

        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.
        Parameters:
        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.
        Since:
        1.18
      • listDataSetsForSample

        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. Note, that for returned container data sets the contained data sets have only code, type and registration date set.
        Parameters:
        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.
        Since:
        1.3
      • listDataStores

        java.util.List<DataStore> listDataStores​(java.lang.String sessionToken)
        Lists all DSS server registered this openBIS server instance. Any of the returned instances could be offline at the time of the listing.
        Since:
        1.23
      • getDefaultPutDataStoreBaseURL

        java.lang.String getDefaultPutDataStoreBaseURL​(java.lang.String sessionToken)
        Returns the URL for the default data store server for this openBIS AS.
        Since:
        1.4
      • tryGetDataStoreBaseURL

        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.
        Since:
        1.4
      • getDataStoreBaseURLs

        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.
        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.
        Since:
        1.19
      • listDataSetTypes

        java.util.List<DataSetType> listDataSetTypes​(java.lang.String sessionToken)
        Returns all data set types.
        Since:
        1.5
      • listSampleTypes

        java.util.List<SampleType> listSampleTypes​(java.lang.String sessionToken)
        Returns all sample types.
        Since:
        1.25
      • listExperimentTypes

        java.util.List<ExperimentType> listExperimentTypes​(java.lang.String sessionToken)
        Returns all experiment types.
        Since:
        1.25
      • getVocabularyTermsMap

        @Deprecated
        java.util.HashMap<Vocabulary,​java.util.List<ControlledVocabularyPropertyType.VocabularyTerm>> getVocabularyTermsMap​(java.lang.String sessionToken)
        Deprecated.
        Please use listVocabularies(String) instead.
        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.

        Since:
        1.6
      • listVocabularies

        java.util.List<Vocabulary> listVocabularies​(java.lang.String sessionToken)
        Returns all available vocabularies together with the contained terms.
        Since:
        1.13
      • listDataSets

        java.util.List<DataSet> listDataSets​(java.lang.String sessionToken,
                                             java.util.List<Sample> samples,
                                             java.util.EnumSet<DataSet.Connections> connectionsToGet)
        Return all data sets attached to the given samples with connections.
        Parameters:
        samples - The samples for which we return attached data sets.
        Since:
        1.7
      • listDataSetsOnBehalfOfUser

        java.util.List<DataSet> listDataSetsOnBehalfOfUser​(java.lang.String sessionToken,
                                                           java.util.List<Sample> samples,
                                                           java.util.EnumSet<DataSet.Connections> connectionsToGet,
                                                           java.lang.String userId)
        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.

        Parameters:
        samples - The samples for which we return attached data sets.
        userId - The user to run this query on behalf of.
        Since:
        1.18
      • listDataSetsForExperiments

        java.util.List<DataSet> listDataSetsForExperiments​(java.lang.String sessionToken,
                                                           java.util.List<Experiment> experiments,
                                                           java.util.EnumSet<DataSet.Connections> connectionsToGet)
        Return all data sets attached to the given experiments with connections.
        Parameters:
        experiments - The experiments for which we return attached data sets.
        Since:
        1.14
      • listDataSetsForExperimentsOnBehalfOfUser

        java.util.List<DataSet> listDataSetsForExperimentsOnBehalfOfUser​(java.lang.String sessionToken,
                                                                         java.util.List<Experiment> experiments,
                                                                         java.util.EnumSet<DataSet.Connections> connectionsToGet,
                                                                         java.lang.String userId)
        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.

        Parameters:
        experiments - The experiments for which we return attached data sets.
        userId - The user to run this query on behalf of.
        Since:
        1.18
      • getDataSetMetaData

        java.util.List<DataSet> getDataSetMetaData​(java.lang.String sessionToken,
                                                   java.util.List<java.lang.String> dataSetCodes)
        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.
        Parameters:
        dataSetCodes - Codes of requested data sets.
        Returns:
        result in the same order as the list of data set codes.
        Since:
        1.12
      • getDataSetMetaData

        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. Which parts of the data sets objects are fetched is controlled with the fetchOptions parameter.
        Parameters:
        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.
        Since:
        1.16
      • searchOnSearchDomain

        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. 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.
        Parameters:
        preferredSearchDomainOrNull - The key of the preferred search domain or null.
        searchString - The search string.
        optionalParametersOrNull - Optional parameters. Can be null. The semantics depends on the type of search domain.
        Since:
        1.29
      • listAvailableSearchDomains

        java.util.List<SearchDomain> listAvailableSearchDomains​(java.lang.String sessionToken)
        Lists available search domains. Their name attribute can be used when invoking searchOnSearchDomain(String, String, String, Map).
        Returns:
        empty list if no search domain is available.
        Since:
        1.29
      • searchForDataSets

        java.util.List<DataSet> searchForDataSets​(java.lang.String sessionToken,
                                                  SearchCriteria searchCriteria)
        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.
        Parameters:
        searchCriteria - the criteria used for searching.
        Since:
        1.8
      • searchForDataSetsOnBehalfOfUser

        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. 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.

        Parameters:
        searchCriteria - the criteria used for searching.
        Since:
        1.18
      • filterDataSetsVisibleToUser

        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.
        Parameters:
        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.
        Since:
        1.18
      • listExperiments

        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.
        Parameters:
        experimentIdentifiers - the identifiers of the experiments to be returned.
        Since:
        1.9
      • searchForExperiments

        java.util.List<Experiment> searchForExperiments​(java.lang.String sessionToken,
                                                        SearchCriteria searchCriteria)
        Returns all experiments matching specified search criteria. Note, that sub criterias are not supported.
        Since:
        1.21
      • listProjects

        java.util.List<Project> listProjects​(java.lang.String sessionToken)
        Returns all available projects.
      • listProjectsOnBehalfOfUser

        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.

        May only be called by users with capability LIST_PROJECTS_ON_BEHALF_OF_USER.

        Parameters:
        userId - The user identifier of the user to get the projects for.
        Since:
        1.18
      • getMaterialByCodes

        java.util.List<Material> getMaterialByCodes​(java.lang.String sessionToken,
                                                    java.util.List<MaterialIdentifier> materialIdentifier)
        Returns the materials with specified identifiers (i.e. code and type).
      • searchForMaterials

        java.util.List<Material> searchForMaterials​(java.lang.String sessionToken,
                                                    SearchCriteria searchCriteria)
        Returns all material fulfilling specified search criteria.
      • listMetaprojects

        java.util.List<Metaproject> listMetaprojects​(java.lang.String sessionToken)
        Lists all metaprojects belonging to current user.
      • listMetaprojectsOnBehalfOfUser

        java.util.List<Metaproject> listMetaprojectsOnBehalfOfUser​(java.lang.String sessionToken,
                                                                   java.lang.String userId)
        Lists all metaprojects belonging to specified user.
        Since:
        1.24
      • getMetaprojectOnBehalfOfUser

        MetaprojectAssignments getMetaprojectOnBehalfOfUser​(java.lang.String sessionToken,
                                                            IMetaprojectId metaprojectId,
                                                            java.lang.String userId)
        Returns all entities tagged with given metaproject for specified user.
        Throws:
        UserFailureException - when a metaproject with the specified id doesn't exist.
        Since:
        1.24
      • listAttachmentsForProject

        java.util.List<Attachment> listAttachmentsForProject​(java.lang.String sessionToken,
                                                             IProjectId projectId,
                                                             boolean allVersions)
        Lists attachments of specified project.
        Parameters:
        allVersions - If true, return all versions of the attachments, otherwise return only the latest version.
        Since:
        1.23
      • listAttachmentsForExperiment

        java.util.List<Attachment> listAttachmentsForExperiment​(java.lang.String sessionToken,
                                                                IExperimentId experimentId,
                                                                boolean allVersions)
        Lists attachments of specified experiment.
        Parameters:
        allVersions - If true, return all versions of the attachments, otherwise return only the latest version.
        Since:
        1.23
      • listAttachmentsForSample

        java.util.List<Attachment> listAttachmentsForSample​(java.lang.String sessionToken,
                                                            ISampleId sampleId,
                                                            boolean allVersions)
        Lists attachments of specified sample.
        Parameters:
        allVersions - If true, return all versions of the attachments, otherwise return only the latest version.
        Since:
        1.23
      • getUserDisplaySettings

        java.util.Map<java.lang.String,​java.lang.String> getUserDisplaySettings​(java.lang.String sessionToken)
      • listPropertyTypes

        java.util.List<PropertyType> listPropertyTypes​(java.lang.String sessionToken,
                                                       boolean withRelations)
        Lists property types.
        Parameters:
        withRelations - If true, return relations.
        Since:
        1.26
      • generateCode

        java.lang.String generateCode​(java.lang.String sessionToken,
                                      java.lang.String prefix,
                                      java.lang.String entityKind)
        Generate Code.
        Parameters:
        prefix -
        entityKind -
        Since:
        1.28
      • listDeletions

        java.util.List<Deletion> listDeletions​(java.lang.String sessionToken,
                                               java.util.EnumSet<DeletionFetchOption> fetchOptions)
        Returns all deletions.
        Parameters:
        fetchOptions - Options that control which parts of the deletions are fetched.
        Returns:
        a sorted list of Deletion.
        Since:
        1.30
      • listPersons

        java.util.List<Person> listPersons​(java.lang.String sessionToken)
        Returns all persons.
        Returns:
        a list of maps with the user information.
        Since:
        1.31
      • countNumberOfSamplesForType

        java.lang.Long countNumberOfSamplesForType​(java.lang.String sessionToken,
                                                   java.lang.String sampleTypeCode)
        Returns number of samples for a sample type code.
        Returns:
        the number of samples for certain type.
        Since:
        1.32