Skip to content
Snippets Groups Projects
Commit a08e6217 authored by tpylak's avatar tpylak
Browse files

bugfix: each method in server interface for GWT should have 'throws...

bugfix: each method in server interface for GWT should have 'throws UserFailureException' in the signature. The authorization framework can throw this exception when the user has insufficient privileges. If it is not marked, the GWT client will report an unexpected exception.

SVN: 10644
parent 7b739883
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,11 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.VocabularyTermReplaceme ...@@ -61,6 +61,11 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.VocabularyTermReplaceme
/** /**
* Service interface for the generic GWT client. * Service interface for the generic GWT client.
* <p>
* Each method should throw {@link UserFailureException}. The authorization framework can throw it
* when the user has insufficient privileges. If it is not marked, the GWT client will report
* unexpected exception.
* </p>
* *
* @author Franz-Josef Elmer * @author Franz-Josef Elmer
*/ */
...@@ -189,7 +194,8 @@ public interface ICommonClientService extends IClientService ...@@ -189,7 +194,8 @@ public interface ICommonClientService extends IClientService
* Returns a chunk of the property types assignment list. * Returns a chunk of the property types assignment list.
*/ */
public ResultSet<EntityTypePropertyType<?>> listPropertyTypeAssignments( public ResultSet<EntityTypePropertyType<?>> listPropertyTypeAssignments(
DefaultResultSetConfig<String, EntityTypePropertyType<?>> criteria); DefaultResultSetConfig<String, EntityTypePropertyType<?>> criteria)
throws UserFailureException;
/** /**
* Like {@link #prepareExportSamples(TableExportCriteria)}, but for property types assignments. * Like {@link #prepareExportSamples(TableExportCriteria)}, but for property types assignments.
...@@ -229,12 +235,14 @@ public interface ICommonClientService extends IClientService ...@@ -229,12 +235,14 @@ public interface ICommonClientService extends IClientService
* Returns a list of all vocabulary terms for a specified vocabulary. * Returns a list of all vocabulary terms for a specified vocabulary.
*/ */
public ResultSet<VocabularyTermWithStats> listVocabularyTerms(Vocabulary vocabulary, public ResultSet<VocabularyTermWithStats> listVocabularyTerms(Vocabulary vocabulary,
DefaultResultSetConfig<String, VocabularyTermWithStats> resultSetConfig); DefaultResultSetConfig<String, VocabularyTermWithStats> resultSetConfig)
throws UserFailureException;
/** /**
* Like {@link #prepareExportSamples(TableExportCriteria)}, but for Vocabulary Terms. * Like {@link #prepareExportSamples(TableExportCriteria)}, but for Vocabulary Terms.
*/ */
public String prepareExportVocabularyTerms(TableExportCriteria<VocabularyTermWithStats> criteria); public String prepareExportVocabularyTerms(TableExportCriteria<VocabularyTermWithStats> criteria)
throws UserFailureException;
public ResultSet<? extends EntityType> listMaterialTypes( public ResultSet<? extends EntityType> listMaterialTypes(
DefaultResultSetConfig<String, MaterialType> criteria) DefaultResultSetConfig<String, MaterialType> criteria)
...@@ -331,7 +339,8 @@ public interface ICommonClientService extends IClientService ...@@ -331,7 +339,8 @@ public interface ICommonClientService extends IClientService
List<VocabularyTermReplacement> termsToBeReplaced) throws UserFailureException; List<VocabularyTermReplacement> termsToBeReplaced) throws UserFailureException;
/** Lists terms of a specified vocabulary */ /** Lists terms of a specified vocabulary */
public List<VocabularyTerm> listVocabularyTerms(Vocabulary vocabulary); public List<VocabularyTerm> listVocabularyTerms(Vocabulary vocabulary)
throws UserFailureException;
/** /**
* Registers given {@link Project}. * Registers given {@link Project}.
...@@ -394,7 +403,9 @@ public interface ICommonClientService extends IClientService ...@@ -394,7 +403,9 @@ public interface ICommonClientService extends IClientService
*/ */
public List<DataSetType> listDataSetTypes() throws UserFailureException; public List<DataSetType> listDataSetTypes() throws UserFailureException;
/** Uploads the specified data sets to the specified CIFEX server using the specified parameters. */ /**
* Uploads the specified data sets to the specified CIFEX server using the specified parameters.
*/
public void uploadDataSets(List<String> dataSetCodes, DataSetUploadParameters uploadParameters) public void uploadDataSets(List<String> dataSetCodes, DataSetUploadParameters uploadParameters)
throws UserFailureException; throws UserFailureException;
...@@ -402,6 +413,6 @@ public interface ICommonClientService extends IClientService ...@@ -402,6 +413,6 @@ public interface ICommonClientService extends IClientService
* Information about the time and kind of the last modification, separately for each kind of * Information about the time and kind of the last modification, separately for each kind of
* database object. * database object.
*/ */
public LastModificationState getLastModificationState(); public LastModificationState getLastModificationState() throws UserFailureException;
} }
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