Skip to content
Snippets Groups Projects
Commit 636df1f3 authored by jakubs's avatar jakubs
Browse files

SSDM-3224: add ability to fetch entities by perm id from dropboxes - v1

SVN: 36098
parent 9fc08342
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IMaterialImmu ...@@ -35,6 +35,7 @@ import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IMaterialImmu
import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IMetaprojectAssignments; import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IMetaprojectAssignments;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IMetaprojectContent; import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IMetaprojectContent;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IMetaprojectImmutable; import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IMetaprojectImmutable;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IProjectImmutable;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IPropertyAssignmentImmutable; import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.IPropertyAssignmentImmutable;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.ISampleImmutable; import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.ISampleImmutable;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.ISearchService; import ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.v1.ISearchService;
...@@ -306,4 +307,29 @@ public class SearchService implements ISearchService ...@@ -306,4 +307,29 @@ public class SearchService implements ISearchService
openBisService.listMetaprojectsForEntity(Translator.translate(entity.getEntityId())); openBisService.listMetaprojectsForEntity(Translator.translate(entity.getEntityId()));
return ConversionUtils.convertToMetaprojectsImmutable(metaprojects); return ConversionUtils.convertToMetaprojectsImmutable(metaprojects);
} }
@Override
public IExperimentImmutable getExperimentByPermId(String permId)
{
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment experimentOrNull =
openBisService.tryGetExperimentByPermId(permId);
return (null == experimentOrNull) ? null : new ExperimentImmutable(experimentOrNull);
}
@Override
public ISampleImmutable getSampleByPermId(String permId)
{
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample sampleOrNull =
openBisService.tryGetSampleByPermId(permId);
return (null == sampleOrNull) ? null : new SampleImmutable(sampleOrNull);
}
@Override
public IProjectImmutable getProjectByPermId(String permId)
{
ch.systemsx.cisd.openbis.generic.shared.basic.dto.Project projectOrNull =
openBisService.tryGetProjectByPermId(permId);
return (null == projectOrNull) ? null : new ProjectImmutable(projectOrNull);
}
} }
...@@ -34,8 +34,7 @@ public interface ISearchService ...@@ -34,8 +34,7 @@ public interface ISearchService
public List<IExperimentImmutable> listExperiments(String projectIdentifier); public List<IExperimentImmutable> listExperiments(String projectIdentifier);
/** /**
* List all data sets with a given value for a particular property, optionally restricted to a * List all data sets with a given value for a particular property, optionally restricted to a specific type.
* specific type.
* *
* @param property The property of interest. * @param property The property of interest.
* @param value The value the property should have. This may contain wildcards. * @param value The value the property should have. This may contain wildcards.
...@@ -45,12 +44,10 @@ public interface ISearchService ...@@ -45,12 +44,10 @@ public interface ISearchService
String typeOrNull); String typeOrNull);
/** /**
* List all data sets with a given value for a particular property, optionally restricted to a * List all data sets with a given value for a particular property, optionally restricted to a specific type.
* specific type.
* *
* @param property The property of interest. * @param property The property of interest.
* @param value The value the property should have. This may contain wildcards if * @param value The value the property should have. This may contain wildcards if <var>escape</var> is set to <code>false</code>.
* <var>escape</var> is set to <code>false</code>.
* @param escape If <code>true</code>, escape the <var>value</var> to search for it verbatimly. * @param escape If <code>true</code>, escape the <var>value</var> to search for it verbatimly.
* @return A list of matching data sets. * @return A list of matching data sets.
*/ */
...@@ -58,8 +55,7 @@ public interface ISearchService ...@@ -58,8 +55,7 @@ public interface ISearchService
String typeOrNull, boolean escape); String typeOrNull, boolean escape);
/** /**
* List all samples with a given value for a particular property, optionally restricted to a * List all samples with a given value for a particular property, optionally restricted to a specific type.
* specific type.
* *
* @param property The property of interest. * @param property The property of interest.
* @param value The value the property should have. This may contain wildcards. * @param value The value the property should have. This may contain wildcards.
...@@ -68,12 +64,10 @@ public interface ISearchService ...@@ -68,12 +64,10 @@ public interface ISearchService
public List<ISampleImmutable> searchForSamples(String property, String value, String typeOrNull); public List<ISampleImmutable> searchForSamples(String property, String value, String typeOrNull);
/** /**
* List all samples with a given value for a particular property, optionally restricted to a * List all samples with a given value for a particular property, optionally restricted to a specific type.
* specific type.
* *
* @param property The property of interest. * @param property The property of interest.
* @param value The value the property should have. This may contain wildcards if * @param value The value the property should have. This may contain wildcards if <var>escape</var> is set to <code>false</code>.
* <var>escape</var> is set to <code>false</code>.
* @param escape If <code>true</code>, escape the <var>value</var> to search for it verbatimly. * @param escape If <code>true</code>, escape the <var>value</var> to search for it verbatimly.
* @return A list of matching samples. * @return A list of matching samples.
*/ */
...@@ -97,23 +91,21 @@ public interface ISearchService ...@@ -97,23 +91,21 @@ public interface ISearchService
public List<ISampleImmutable> searchForSamples(SearchCriteria searchCriteria); public List<ISampleImmutable> searchForSamples(SearchCriteria searchCriteria);
/** /**
* @param identifierCollection a collection containing the identifiers of the matching * @param identifierCollection a collection containing the identifiers of the matching materials. Identifiers that do not exist in the openBIS
* materials. Identifiers that do not exist in the openBIS database are ignored. * database are ignored.
* @return a list of materials matching the specified collection. * @return a list of materials matching the specified collection.
*/ */
public List<IMaterialImmutable> listMaterials(MaterialIdentifierCollection identifierCollection); public List<IMaterialImmutable> listMaterials(MaterialIdentifierCollection identifierCollection);
/** /**
* @return a controlled vocabulary with the given code. Returns null if the vocabulary with * @return a controlled vocabulary with the given code. Returns null if the vocabulary with given code is not found.
* given code is not found.
* @deprecated use {@link #getVocabulary(String)} instead * @deprecated use {@link #getVocabulary(String)} instead
*/ */
@Deprecated @Deprecated
public IVocabularyImmutable searchForVocabulary(String code); public IVocabularyImmutable searchForVocabulary(String code);
/** /**
* @return a controlled vocabulary with the given code. Returns null if the vocabulary with * @return a controlled vocabulary with the given code. Returns null if the vocabulary with given code is not found.
* given code is not found.
*/ */
public IVocabularyImmutable getVocabulary(String code); public IVocabularyImmutable getVocabulary(String code);
...@@ -151,4 +143,21 @@ public interface ISearchService ...@@ -151,4 +143,21 @@ public interface ISearchService
* @return metaprojects for current user, which are assigned to the given entity * @return metaprojects for current user, which are assigned to the given entity
*/ */
public List<IMetaprojectImmutable> listMetaprojectsForEntity(IMetaprojectContent entity); public List<IMetaprojectImmutable> listMetaprojectsForEntity(IMetaprojectContent entity);
/**
* Get a sample from the openBIS AS by its perm id. Returns null if the sample does not exist.
*
* @return A sample or null
*/
ISampleImmutable getSampleByPermId(String permId);
/**
* Get a project from the openBIS AS by its perm id.
*/
IProjectImmutable getProjectByPermId(String permId);
/**
* Get an experiment from the openBIS AS by its perm id.
*/
IExperimentImmutable getExperimentByPermId(String permId);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment