From 26cc01a94e57f5aa6acf4ac9019050f8ade6366c Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Tue, 24 Mar 2009 12:56:22 +0000
Subject: [PATCH] TAB characters replaced by spaces

SVN: 10337
---
 .../openbis/generic/shared/ICommonServer.java | 637 +++++++++---------
 .../shared/ICommonServer.java.expected        | 637 +++++++++---------
 2 files changed, 618 insertions(+), 656 deletions(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java
index b083f232e16..7d069ee3a15 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java
@@ -76,295 +76,279 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.properties.EntityKind;
  * 
  * @author Franz-Josef Elmer
  */
-public interface ICommonServer extends IServer {
-	/**
-	 * Returns all groups which belong to the specified database instance. *
-	 * 
-	 * @return a sorted list of {@link GroupPE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	@ReturnValueFilter(validatorClass = GroupValidator.class)
-	public List<GroupPE> listGroups(String sessionToken,
-			DatabaseInstanceIdentifier identifier);
-
-	/**
-	 * Registers a new group with specified code and optional description and
-	 * group leader ID.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void registerGroup(String sessionToken, String groupCode,
-			String descriptionOrNull, String groupLeaderOrNull);
-
-	/**
-	 * Returns all persons from current instance.
-	 * 
-	 * @return a sorted list of {@link PersonPE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<PersonPE> listPersons(String sessionToken);
-
-	/**
-	 * Returns all projects.
-	 * 
-	 * @return a sorted list of {@link ProjectPE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	@ReturnValueFilter(validatorClass = ProjectValidator.class)
-	public List<ProjectPE> listProjects(String sessionToken);
-
-	/**
-	 * Registers a new person.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void registerPerson(String sessionToken, String userID);
-
-	/**
-	 * Returns a list of all roles.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.GROUP_ADMIN)
-	public List<RoleAssignmentPE> listRoles(String sessionToken);
-
-	/**
-	 * Registers a new group role.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.GROUP_ADMIN)
-	public void registerGroupRole(
-			String sessionToken,
-			RoleCode roleCode,
-			@AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier identifier,
-			String person);
-
-	/**
-	 * Registers a new instance role.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void registerInstanceRole(String sessionToken, RoleCode roleCode,
-			String person);
-
-	/**
-	 * Deletes role described by given role code, group identifier and user id.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.GROUP_ADMIN)
-	public void deleteGroupRole(
-			String sessionToken,
-			RoleCode roleCode,
-			@AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier groupIdentifier,
-			String person);
-
-	/**
-	 * Deletes role described by given role code and user id.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void deleteInstanceRole(String sessionToken, RoleCode roleCode,
-			String person);
-
-	/**
-	 * Lists sample types which are appropriate for listing.
-	 * 
-	 * @return a sorted list of {@link SampleTypePE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<SampleTypePE> listSampleTypes(String sessionToken);
-
-	/**
-	 * Lists samples using given configuration.
-	 * 
-	 * @return a sorted list of {@link SamplePE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<SamplePE> listSamples(final String sessionToken,
-			final ListSampleCriteriaDTO criteria);
-
-	/**
-	 * Lists experiments.
-	 * 
-	 * @return a sorted list of {@link ExperimentPE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<ExperimentPE> listExperiments(
-			final String sessionToken,
-			ExperimentTypePE experimentType,
-			@AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier project);
-
-	/**
-	 * For given {@link SampleIdentifier} returns the corresponding list of
-	 * {@link ExternalDataPE}.
-	 * 
-	 * @return a sorted list of {@link ExternalDataPE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<ExternalDataPE> listExternalData(
-			final String sessionToken,
-			@AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class) final SampleIdentifier identifier);
-
-	/**
-	 * For given {@link ExperimentIdentifier} returns the corresponding list of
-	 * {@link ExternalDataPE}.
-	 * 
-	 * @return a sorted list of {@link ExternalDataPE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<ExternalDataPE> listExternalData(
-			final String sessionToken,
-			@AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) final ExperimentIdentifier identifier);
-
-	/**
-	 * Performs an <i>Hibernate Search</i> based on given parameters.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	@ReturnValueFilter(validatorClass = MatchingEntityValidator.class)
-	public List<SearchHit> listMatchingEntities(final String sessionToken,
-			final SearchableEntity[] searchableEntities, final String queryText);
-
-	/**
-	 * List experiment types.
-	 * 
-	 * @return a sorted list of {@link ExperimentTypePE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<ExperimentTypePE> listExperimentTypes(String sessionToken);
-
-	/**
-	 * List property types.
-	 * 
-	 * @return a sorted list of {@link PropertyTypePE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<PropertyTypePE> listPropertyTypes(final String sessionToken);
-
-	/**
-	 * Lists data types.
-	 * 
-	 * @return a sorted list of {@link DataTypePE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<DataTypePE> listDataTypes(final String sessionToken);
-
-	/**
-	 * Lists vocabularies.
-	 * 
-	 * @return a sorted list of {@link VocabularyPE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<VocabularyPE> listVocabularies(final String sessionToken,
-			final boolean withTerms, boolean excludeInternal);
-
-	/**
-	 * Registers given {@link PropertyType}.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void registerPropertyType(final String sessionToken,
-			final PropertyType propertyType);
-
-	/**
-	 * Assigns property type to entity type.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public String assignPropertyType(final String sessionToken,
-			final EntityKind entityKind, final String propertyTypeCode,
-			final String entityTypeCode, final boolean isMandatory,
-			final String defaultValue);
-
-	/**
-	 * Registers given {@link Vocabulary}.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void registerVocabulary(final String sessionToken,
-			final Vocabulary vocabulary);
-
-	/**
-	 * Registers new project.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.GROUP_ADMIN)
-	public void registerProject(
-			String sessionToken,
-			@AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier projectIdentifier,
-			String description, String leaderId);
-
-	/**
-	 * Performs an <i>Hibernate Search</i> based on given parameters.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	@ReturnValueFilter(validatorClass = ExternalDataValidator.class)
-	public List<ExternalDataPE> searchForDataSets(String sessionToken,
-			DataSetSearchCriteria criteria);
-
-	/**
-	 * List material types.
-	 * 
-	 * @return a sorted list of {@link MaterialTypePE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<MaterialTypePE> listMaterialTypes(String sessionToken);
-
-	/**
-	 * Lists materials.
-	 * 
-	 * @return a sorted list of {@link MaterialPE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<MaterialPE> listMaterials(String sessionToken,
-			MaterialTypePE materialType);
-
-	/**
-	 * Creates a new material type.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void registerMaterialType(String sessionToken,
-			MaterialType entityType);
-
-	/**
-	 * Creates a new sample type.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void registerSampleType(String sessionToken, SampleType entityType);
-
-	/**
-	 * Creates a new experiment type.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void registerExperimentType(String sessionToken,
-			ExperimentType entityType);
-
-	/**
-	 * Deletes specified data sets.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.GROUP_ADMIN)
-	public void deleteDataSets(
-			String sessionToken,
-			@AuthorizationGuard(guardClass = DataSetCodePredicate.class) List<String> dataSetCodes,
-			String reason);
+public interface ICommonServer extends IServer
+{
+    /**
+     * Returns all groups which belong to the specified database instance. *
+     * 
+     * @return a sorted list of {@link GroupPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    @ReturnValueFilter(validatorClass = GroupValidator.class)
+    public List<GroupPE> listGroups(String sessionToken, DatabaseInstanceIdentifier identifier);
+
+    /**
+     * Registers a new group with specified code and optional description and group leader ID.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerGroup(String sessionToken, String groupCode, String descriptionOrNull,
+            String groupLeaderOrNull);
+
+    /**
+     * Returns all persons from current instance.
+     * 
+     * @return a sorted list of {@link PersonPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<PersonPE> listPersons(String sessionToken);
+
+    /**
+     * Returns all projects.
+     * 
+     * @return a sorted list of {@link ProjectPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    @ReturnValueFilter(validatorClass = ProjectValidator.class)
+    public List<ProjectPE> listProjects(String sessionToken);
+
+    /**
+     * Registers a new person.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerPerson(String sessionToken, String userID);
+
+    /**
+     * Returns a list of all roles.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public List<RoleAssignmentPE> listRoles(String sessionToken);
+
+    /**
+     * Registers a new group role.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public void registerGroupRole(String sessionToken, RoleCode roleCode,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            GroupIdentifier identifier, String person);
+
+    /**
+     * Registers a new instance role.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerInstanceRole(String sessionToken, RoleCode roleCode, String person);
+
+    /**
+     * Deletes role described by given role code, group identifier and user id.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public void deleteGroupRole(String sessionToken, RoleCode roleCode,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            GroupIdentifier groupIdentifier, String person);
+
+    /**
+     * Deletes role described by given role code and user id.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void deleteInstanceRole(String sessionToken, RoleCode roleCode, String person);
+
+    /**
+     * Lists sample types which are appropriate for listing.
+     * 
+     * @return a sorted list of {@link SampleTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<SampleTypePE> listSampleTypes(String sessionToken);
+
+    /**
+     * Lists samples using given configuration.
+     * 
+     * @return a sorted list of {@link SamplePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<SamplePE> listSamples(final String sessionToken,
+            final ListSampleCriteriaDTO criteria);
+
+    /**
+     * Lists experiments.
+     * 
+     * @return a sorted list of {@link ExperimentPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<ExperimentPE> listExperiments(final String sessionToken,
+            ExperimentTypePE experimentType,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            ProjectIdentifier project);
+
+    /**
+     * For given {@link SampleIdentifier} returns the corresponding list of {@link ExternalDataPE}.
+     * 
+     * @return a sorted list of {@link ExternalDataPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<ExternalDataPE> listExternalData(final String sessionToken,
+            @AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class)
+            final SampleIdentifier identifier);
+
+    /**
+     * For given {@link ExperimentIdentifier} returns the corresponding list of
+     * {@link ExternalDataPE}.
+     * 
+     * @return a sorted list of {@link ExternalDataPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<ExternalDataPE> listExternalData(final String sessionToken,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            final ExperimentIdentifier identifier);
+
+    /**
+     * Performs an <i>Hibernate Search</i> based on given parameters.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    @ReturnValueFilter(validatorClass = MatchingEntityValidator.class)
+    public List<SearchHit> listMatchingEntities(final String sessionToken,
+            final SearchableEntity[] searchableEntities, final String queryText);
+
+    /**
+     * List experiment types.
+     * 
+     * @return a sorted list of {@link ExperimentTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<ExperimentTypePE> listExperimentTypes(String sessionToken);
+
+    /**
+     * List property types.
+     * 
+     * @return a sorted list of {@link PropertyTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<PropertyTypePE> listPropertyTypes(final String sessionToken);
+
+    /**
+     * Lists data types.
+     * 
+     * @return a sorted list of {@link DataTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<DataTypePE> listDataTypes(final String sessionToken);
+
+    /**
+     * Lists vocabularies.
+     * 
+     * @return a sorted list of {@link VocabularyPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<VocabularyPE> listVocabularies(final String sessionToken, final boolean withTerms,
+            boolean excludeInternal);
+
+    /**
+     * Registers given {@link PropertyType}.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerPropertyType(final String sessionToken, final PropertyType propertyType);
+
+    /**
+     * Assigns property type to entity type.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public String assignPropertyType(final String sessionToken, final EntityKind entityKind,
+            final String propertyTypeCode, final String entityTypeCode, final boolean isMandatory,
+            final String defaultValue);
+
+    /**
+     * Registers given {@link Vocabulary}.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerVocabulary(final String sessionToken, final Vocabulary vocabulary);
+
+    /**
+     * Registers new project.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public void registerProject(String sessionToken,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            ProjectIdentifier projectIdentifier, String description, String leaderId);
+
+    /**
+     * Performs an <i>Hibernate Search</i> based on given parameters.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    @ReturnValueFilter(validatorClass = ExternalDataValidator.class)
+    public List<ExternalDataPE> searchForDataSets(String sessionToken,
+            DataSetSearchCriteria criteria);
+
+    /**
+     * List material types.
+     * 
+     * @return a sorted list of {@link MaterialTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<MaterialTypePE> listMaterialTypes(String sessionToken);
+
+    /**
+     * Lists materials.
+     * 
+     * @return a sorted list of {@link MaterialPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<MaterialPE> listMaterials(String sessionToken, MaterialTypePE materialType);
+
+    /**
+     * Creates a new material type.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerMaterialType(String sessionToken, MaterialType entityType);
+
+    /**
+     * Creates a new sample type.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerSampleType(String sessionToken, SampleType entityType);
+
+    /**
+     * Creates a new experiment type.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerExperimentType(String sessionToken, ExperimentType entityType);
+
+    /**
+     * Deletes specified data sets.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public void deleteDataSets(String sessionToken,
+            @AuthorizationGuard(guardClass = DataSetCodePredicate.class)
+            List<String> dataSetCodes, String reason);
 
     /**
      * Uploads specified data sets to CIFEX server of specified URL with specified password.
@@ -373,7 +357,7 @@ public interface ICommonServer extends IServer {
     @RolesAllowed(RoleSet.OBSERVER)
     public void uploadDataSets(String sessionToken, List<String> dataSetCodes, String cifexURL,
             String password);
-    
+
     /**
      * Saves changed experiment.
      */
@@ -386,43 +370,40 @@ public interface ICommonServer extends IServer {
             @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
             ProjectIdentifier newProjectIdentifier, Date version);
 
-	/**
-	 * Saves changed material.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.INSTANCE_ADMIN)
-	public void editMaterial(String sessionToken,
-			MaterialIdentifier identifier, List<MaterialProperty> properties,
-			Date version);
-
-	/**
-	 * Saves changed sample.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.USER)
-	public void editSample(
-			String sessionToken,
-			@AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class) SampleIdentifier identifier,
-			List<SampleProperty> properties,
-			@AuthorizationGuard(guardClass = NullableGroupIdentifierPredicate.class) ExperimentIdentifier experimentIdentifierOrNull,
-			Date version);
-
-	/**
-	 * Lists vocabulary terms of a given vocabulary. Includes terms usage
-	 * statistics.
-	 */
-	@Transactional
-	@RolesAllowed(RoleSet.USER)
-	public List<VocabularyTermWithStats> listVocabularyTerms(
-			String sessionToken, Vocabulary vocabulary);
-
-	/**
-	 * List data set types.
-	 * 
-	 * @return a sorted list of {@link DataSetTypePE}.
-	 */
-	@Transactional(readOnly = true)
-	@RolesAllowed(RoleSet.OBSERVER)
-	public List<DataSetTypePE> listDataSetTypes(String sessionToken);
+    /**
+     * Saves changed material.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void editMaterial(String sessionToken, MaterialIdentifier identifier,
+            List<MaterialProperty> properties, Date version);
+
+    /**
+     * Saves changed sample.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.USER)
+    public void editSample(String sessionToken,
+            @AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class)
+            SampleIdentifier identifier, List<SampleProperty> properties,
+            @AuthorizationGuard(guardClass = NullableGroupIdentifierPredicate.class)
+            ExperimentIdentifier experimentIdentifierOrNull, Date version);
+
+    /**
+     * Lists vocabulary terms of a given vocabulary. Includes terms usage statistics.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.USER)
+    public List<VocabularyTermWithStats> listVocabularyTerms(String sessionToken,
+            Vocabulary vocabulary);
+
+    /**
+     * List data set types.
+     * 
+     * @return a sorted list of {@link DataSetTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<DataSetTypePE> listDataSetTypes(String sessionToken);
 
 }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected
index a02048f244e..7fea046e270 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/ICommonServer.java.expected
@@ -76,295 +76,279 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.properties.EntityKind;
  * 
  * @author Franz-Josef Elmer
  */
-public interface ICommonServer extends IServer {
-        /**
-         * Returns all groups which belong to the specified database instance. *
-         * 
-         * @return a sorted list of {@link GroupPE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        @ReturnValueFilter(validatorClass = GroupValidator.class)
-        public List<GroupPE> listGroups(String sessionToken,
-                        DatabaseInstanceIdentifier identifier);
-
-        /**
-         * Registers a new group with specified code and optional description and
-         * group leader ID.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void registerGroup(String sessionToken, String groupCode,
-                        String descriptionOrNull, String groupLeaderOrNull);
-
-        /**
-         * Returns all persons from current instance.
-         * 
-         * @return a sorted list of {@link PersonPE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<PersonPE> listPersons(String sessionToken);
-
-        /**
-         * Returns all projects.
-         * 
-         * @return a sorted list of {@link ProjectPE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        @ReturnValueFilter(validatorClass = ProjectValidator.class)
-        public List<ProjectPE> listProjects(String sessionToken);
-
-        /**
-         * Registers a new person.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void registerPerson(String sessionToken, String userID);
-
-        /**
-         * Returns a list of all roles.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.GROUP_ADMIN)
-        public List<RoleAssignmentPE> listRoles(String sessionToken);
-
-        /**
-         * Registers a new group role.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.GROUP_ADMIN)
-        public void registerGroupRole(
-                        String sessionToken,
-                        RoleCode roleCode,
-                        @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier identifier,
-                        String person);
-
-        /**
-         * Registers a new instance role.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void registerInstanceRole(String sessionToken, RoleCode roleCode,
-                        String person);
-
-        /**
-         * Deletes role described by given role code, group identifier and user id.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.GROUP_ADMIN)
-        public void deleteGroupRole(
-                        String sessionToken,
-                        RoleCode roleCode,
-                        @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) GroupIdentifier groupIdentifier,
-                        String person);
-
-        /**
-         * Deletes role described by given role code and user id.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void deleteInstanceRole(String sessionToken, RoleCode roleCode,
-                        String person);
-
-        /**
-         * Lists sample types which are appropriate for listing.
-         * 
-         * @return a sorted list of {@link SampleTypePE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<SampleTypePE> listSampleTypes(String sessionToken);
-
-        /**
-         * Lists samples using given configuration.
-         * 
-         * @return a sorted list of {@link SamplePE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<SamplePE> listSamples(final String sessionToken,
-                        final ListSampleCriteriaDTO criteria);
-
-        /**
-         * Lists experiments.
-         * 
-         * @return a sorted list of {@link ExperimentPE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<ExperimentPE> listExperiments(
-                        final String sessionToken,
-                        ExperimentTypePE experimentType,
-                        @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier project);
-
-        /**
-         * For given {@link SampleIdentifier} returns the corresponding list of
-         * {@link ExternalDataPE}.
-         * 
-         * @return a sorted list of {@link ExternalDataPE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<ExternalDataPE> listExternalData(
-                        final String sessionToken,
-                        @AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class) final SampleIdentifier identifier);
-
-        /**
-         * For given {@link ExperimentIdentifier} returns the corresponding list of
-         * {@link ExternalDataPE}.
-         * 
-         * @return a sorted list of {@link ExternalDataPE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<ExternalDataPE> listExternalData(
-                        final String sessionToken,
-                        @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) final ExperimentIdentifier identifier);
-
-        /**
-         * Performs an <i>Hibernate Search</i> based on given parameters.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        @ReturnValueFilter(validatorClass = MatchingEntityValidator.class)
-        public List<SearchHit> listMatchingEntities(final String sessionToken,
-                        final SearchableEntity[] searchableEntities, final String queryText);
-
-        /**
-         * List experiment types.
-         * 
-         * @return a sorted list of {@link ExperimentTypePE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<ExperimentTypePE> listExperimentTypes(String sessionToken);
-
-        /**
-         * List property types.
-         * 
-         * @return a sorted list of {@link PropertyTypePE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<PropertyTypePE> listPropertyTypes(final String sessionToken);
-
-        /**
-         * Lists data types.
-         * 
-         * @return a sorted list of {@link DataTypePE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<DataTypePE> listDataTypes(final String sessionToken);
-
-        /**
-         * Lists vocabularies.
-         * 
-         * @return a sorted list of {@link VocabularyPE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<VocabularyPE> listVocabularies(final String sessionToken,
-                        final boolean withTerms, boolean excludeInternal);
-
-        /**
-         * Registers given {@link PropertyType}.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void registerPropertyType(final String sessionToken,
-                        final PropertyType propertyType);
-
-        /**
-         * Assigns property type to entity type.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public String assignPropertyType(final String sessionToken,
-                        final EntityKind entityKind, final String propertyTypeCode,
-                        final String entityTypeCode, final boolean isMandatory,
-                        final String defaultValue);
-
-        /**
-         * Registers given {@link Vocabulary}.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void registerVocabulary(final String sessionToken,
-                        final Vocabulary vocabulary);
-
-        /**
-         * Registers new project.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.GROUP_ADMIN)
-        public void registerProject(
-                        String sessionToken,
-                        @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class) ProjectIdentifier projectIdentifier,
-                        String description, String leaderId);
-
-        /**
-         * Performs an <i>Hibernate Search</i> based on given parameters.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        @ReturnValueFilter(validatorClass = ExternalDataValidator.class)
-        public List<ExternalDataPE> searchForDataSets(String sessionToken,
-                        DataSetSearchCriteria criteria);
-
-        /**
-         * List material types.
-         * 
-         * @return a sorted list of {@link MaterialTypePE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<MaterialTypePE> listMaterialTypes(String sessionToken);
-
-        /**
-         * Lists materials.
-         * 
-         * @return a sorted list of {@link MaterialPE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<MaterialPE> listMaterials(String sessionToken,
-                        MaterialTypePE materialType);
-
-        /**
-         * Creates a new material type.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void registerMaterialType(String sessionToken,
-                        MaterialType entityType);
-
-        /**
-         * Creates a new sample type.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void registerSampleType(String sessionToken, SampleType entityType);
-
-        /**
-         * Creates a new experiment type.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void registerExperimentType(String sessionToken,
-                        ExperimentType entityType);
-
-        /**
-         * Deletes specified data sets.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.GROUP_ADMIN)
-        public void deleteDataSets(
-                        String sessionToken,
-                        @AuthorizationGuard(guardClass = DataSetCodePredicate.class) List<String> dataSetCodes,
-                        String reason);
+public interface ICommonServer extends IServer
+{
+    /**
+     * Returns all groups which belong to the specified database instance. *
+     * 
+     * @return a sorted list of {@link GroupPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    @ReturnValueFilter(validatorClass = GroupValidator.class)
+    public List<GroupPE> listGroups(String sessionToken, DatabaseInstanceIdentifier identifier);
+
+    /**
+     * Registers a new group with specified code and optional description and group leader ID.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerGroup(String sessionToken, String groupCode, String descriptionOrNull,
+            String groupLeaderOrNull);
+
+    /**
+     * Returns all persons from current instance.
+     * 
+     * @return a sorted list of {@link PersonPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<PersonPE> listPersons(String sessionToken);
+
+    /**
+     * Returns all projects.
+     * 
+     * @return a sorted list of {@link ProjectPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    @ReturnValueFilter(validatorClass = ProjectValidator.class)
+    public List<ProjectPE> listProjects(String sessionToken);
+
+    /**
+     * Registers a new person.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerPerson(String sessionToken, String userID);
+
+    /**
+     * Returns a list of all roles.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public List<RoleAssignmentPE> listRoles(String sessionToken);
+
+    /**
+     * Registers a new group role.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public void registerGroupRole(String sessionToken, RoleCode roleCode,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            GroupIdentifier identifier, String person);
+
+    /**
+     * Registers a new instance role.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerInstanceRole(String sessionToken, RoleCode roleCode, String person);
+
+    /**
+     * Deletes role described by given role code, group identifier and user id.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public void deleteGroupRole(String sessionToken, RoleCode roleCode,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            GroupIdentifier groupIdentifier, String person);
+
+    /**
+     * Deletes role described by given role code and user id.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void deleteInstanceRole(String sessionToken, RoleCode roleCode, String person);
+
+    /**
+     * Lists sample types which are appropriate for listing.
+     * 
+     * @return a sorted list of {@link SampleTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<SampleTypePE> listSampleTypes(String sessionToken);
+
+    /**
+     * Lists samples using given configuration.
+     * 
+     * @return a sorted list of {@link SamplePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<SamplePE> listSamples(final String sessionToken,
+            final ListSampleCriteriaDTO criteria);
+
+    /**
+     * Lists experiments.
+     * 
+     * @return a sorted list of {@link ExperimentPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<ExperimentPE> listExperiments(final String sessionToken,
+            ExperimentTypePE experimentType,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            ProjectIdentifier project);
+
+    /**
+     * For given {@link SampleIdentifier} returns the corresponding list of {@link ExternalDataPE}.
+     * 
+     * @return a sorted list of {@link ExternalDataPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<ExternalDataPE> listExternalData(final String sessionToken,
+            @AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class)
+            final SampleIdentifier identifier);
+
+    /**
+     * For given {@link ExperimentIdentifier} returns the corresponding list of
+     * {@link ExternalDataPE}.
+     * 
+     * @return a sorted list of {@link ExternalDataPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<ExternalDataPE> listExternalData(final String sessionToken,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            final ExperimentIdentifier identifier);
+
+    /**
+     * Performs an <i>Hibernate Search</i> based on given parameters.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    @ReturnValueFilter(validatorClass = MatchingEntityValidator.class)
+    public List<SearchHit> listMatchingEntities(final String sessionToken,
+            final SearchableEntity[] searchableEntities, final String queryText);
+
+    /**
+     * List experiment types.
+     * 
+     * @return a sorted list of {@link ExperimentTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<ExperimentTypePE> listExperimentTypes(String sessionToken);
+
+    /**
+     * List property types.
+     * 
+     * @return a sorted list of {@link PropertyTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<PropertyTypePE> listPropertyTypes(final String sessionToken);
+
+    /**
+     * Lists data types.
+     * 
+     * @return a sorted list of {@link DataTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<DataTypePE> listDataTypes(final String sessionToken);
+
+    /**
+     * Lists vocabularies.
+     * 
+     * @return a sorted list of {@link VocabularyPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<VocabularyPE> listVocabularies(final String sessionToken, final boolean withTerms,
+            boolean excludeInternal);
+
+    /**
+     * Registers given {@link PropertyType}.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerPropertyType(final String sessionToken, final PropertyType propertyType);
+
+    /**
+     * Assigns property type to entity type.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public String assignPropertyType(final String sessionToken, final EntityKind entityKind,
+            final String propertyTypeCode, final String entityTypeCode, final boolean isMandatory,
+            final String defaultValue);
+
+    /**
+     * Registers given {@link Vocabulary}.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerVocabulary(final String sessionToken, final Vocabulary vocabulary);
+
+    /**
+     * Registers new project.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public void registerProject(String sessionToken,
+            @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
+            ProjectIdentifier projectIdentifier, String description, String leaderId);
+
+    /**
+     * Performs an <i>Hibernate Search</i> based on given parameters.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    @ReturnValueFilter(validatorClass = ExternalDataValidator.class)
+    public List<ExternalDataPE> searchForDataSets(String sessionToken,
+            DataSetSearchCriteria criteria);
+
+    /**
+     * List material types.
+     * 
+     * @return a sorted list of {@link MaterialTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<MaterialTypePE> listMaterialTypes(String sessionToken);
+
+    /**
+     * Lists materials.
+     * 
+     * @return a sorted list of {@link MaterialPE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<MaterialPE> listMaterials(String sessionToken, MaterialTypePE materialType);
+
+    /**
+     * Creates a new material type.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerMaterialType(String sessionToken, MaterialType entityType);
+
+    /**
+     * Creates a new sample type.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerSampleType(String sessionToken, SampleType entityType);
+
+    /**
+     * Creates a new experiment type.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void registerExperimentType(String sessionToken, ExperimentType entityType);
+
+    /**
+     * Deletes specified data sets.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.GROUP_ADMIN)
+    public void deleteDataSets(String sessionToken,
+            @AuthorizationGuard(guardClass = DataSetCodePredicate.class)
+            List<String> dataSetCodes, String reason);
 
     /**
      * Uploads specified data sets to CIFEX server of specified URL with specified password.
@@ -373,7 +357,7 @@ public interface ICommonServer extends IServer {
     @RolesAllowed(RoleSet.OBSERVER)
     public void uploadDataSets(String sessionToken, List<String> dataSetCodes, String cifexURL,
             String password);
-    
+
     /**
      * Saves changed experiment.
      */
@@ -386,43 +370,40 @@ public interface ICommonServer extends IServer {
             @AuthorizationGuard(guardClass = GroupIdentifierPredicate.class)
             ProjectIdentifier newProjectIdentifier, Date version);
 
-        /**
-         * Saves changed material.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.INSTANCE_ADMIN)
-        public void editMaterial(String sessionToken,
-                        MaterialIdentifier identifier, List<MaterialProperty> properties,
-                        Date version);
-
-        /**
-         * Saves changed sample.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.USER)
-        public void editSample(
-                        String sessionToken,
-                        @AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class) SampleIdentifier identifier,
-                        List<SampleProperty> properties,
-                        @AuthorizationGuard(guardClass = NullableGroupIdentifierPredicate.class) ExperimentIdentifier experimentIdentifierOrNull,
-                        Date version);
-
-        /**
-         * Lists vocabulary terms of a given vocabulary. Includes terms usage
-         * statistics.
-         */
-        @Transactional
-        @RolesAllowed(RoleSet.USER)
-        public List<VocabularyTermWithStats> listVocabularyTerms(
-                        String sessionToken, Vocabulary vocabulary);
-
-        /**
-         * List data set types.
-         * 
-         * @return a sorted list of {@link DataSetTypePE}.
-         */
-        @Transactional(readOnly = true)
-        @RolesAllowed(RoleSet.OBSERVER)
-        public List<DataSetTypePE> listDataSetTypes(String sessionToken);
+    /**
+     * Saves changed material.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.INSTANCE_ADMIN)
+    public void editMaterial(String sessionToken, MaterialIdentifier identifier,
+            List<MaterialProperty> properties, Date version);
+
+    /**
+     * Saves changed sample.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.USER)
+    public void editSample(String sessionToken,
+            @AuthorizationGuard(guardClass = SampleOwnerIdentifierPredicate.class)
+            SampleIdentifier identifier, List<SampleProperty> properties,
+            @AuthorizationGuard(guardClass = NullableGroupIdentifierPredicate.class)
+            ExperimentIdentifier experimentIdentifierOrNull, Date version);
+
+    /**
+     * Lists vocabulary terms of a given vocabulary. Includes terms usage statistics.
+     */
+    @Transactional
+    @RolesAllowed(RoleSet.USER)
+    public List<VocabularyTermWithStats> listVocabularyTerms(String sessionToken,
+            Vocabulary vocabulary);
+
+    /**
+     * List data set types.
+     * 
+     * @return a sorted list of {@link DataSetTypePE}.
+     */
+    @Transactional(readOnly = true)
+    @RolesAllowed(RoleSet.OBSERVER)
+    public List<DataSetTypePE> listDataSetTypes(String sessionToken);
 
 }
-- 
GitLab