java.lang.Object
ch.systemsx.cisd.openbis.dss.generic.shared.api.internal.authorization.NewDataSetPredicate
All Implemented Interfaces:
IAuthorizationGuardPredicate<ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric,ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO>, IDataSetPredicate<ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO>

public class NewDataSetPredicate extends Object implements IAuthorizationGuardPredicate<ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric,ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO>
Predicate for checking that the new data set can be registered (i.e., user has access to the space for the new data set).

This is an internal class. Do not use it as a user of the API.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ch.systemsx.cisd.common.exceptions.Status
    evaluate(ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric receiver, String sessionToken, ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO newDataSet)
    Evaluate the predicate for the receiver object, sessionToken, and predicate argument.
    getDataSetCodes(ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO argument)
    Extracts from the specified argument data set codes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NewDataSetPredicate

      public NewDataSetPredicate()
  • Method Details

    • getDataSetCodes

      public List<String> getDataSetCodes(ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO argument)
      Description copied from interface: IDataSetPredicate
      Extracts from the specified argument data set codes. Returns an empty list if there is no data set code to extract.
      Specified by:
      getDataSetCodes in interface IDataSetPredicate<ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO>
    • evaluate

      public ch.systemsx.cisd.common.exceptions.Status evaluate(ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric receiver, String sessionToken, ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO newDataSet) throws ch.systemsx.cisd.common.exceptions.UserFailureException
      Description copied from interface: IAuthorizationGuardPredicate
      Evaluate the predicate for the receiver object, sessionToken, and predicate argument.
      Specified by:
      evaluate in interface IAuthorizationGuardPredicate<ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric,ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO>
      Parameters:
      receiver - The object on which the guarded method was called
      sessionToken - A token identifying the user
      newDataSet - The argument to the predicate
      Returns:
      Status.OK if the action is allowed, Status.createError() otherwise.
      Throws:
      ch.systemsx.cisd.common.exceptions.UserFailureException