Class Protected<A>

java.lang.Object
org.opencastproject.assetmanager.impl.Protected<A>

public final class Protected<A> extends Object
A protected resource.
  • Constructor Details

    • Protected

      public Protected(org.opencastproject.util.data.Either<org.opencastproject.security.api.UnauthorizedException,A> wrapped)
  • Method Details

    • granted

      public static <A> Protected<A> granted(A a)
    • rejected

      public static <A> Protected<A> rejected(org.opencastproject.security.api.UnauthorizedException e)
    • get

      public org.opencastproject.util.data.Either<org.opencastproject.security.api.UnauthorizedException,A> get()
    • isGranted

      public boolean isGranted()
    • getGranted

      public A getGranted()
      Throws an exception if _not_ granted.
    • isRejected

      public boolean isRejected()
    • getRejected

      public org.opencastproject.security.api.UnauthorizedException getRejected()
    • getGrantedOpt

      public Optional<A> getGrantedOpt()
    • getGrantedOptFn

      public static <A> com.entwinemedia.fn.Fn<Protected<A>,Optional<A>> getGrantedOptFn()
    • getFn

      public static <A> com.entwinemedia.fn.Fn<Protected<A>,org.opencastproject.util.data.Either<org.opencastproject.security.api.UnauthorizedException,A>> getFn()