org.openpermis.builder
Class AuthorizationServiceBuilder

java.lang.Object
  extended by org.openpermis.builder.AuthorizationServiceBuilder

public class AuthorizationServiceBuilder
extends Object

Builds an authorization service.

The builder chooses sensible defaults for parts that an application does not explicitly configure.

Since:
0.1.0

Constructor Summary
AuthorizationServiceBuilder()
          Creates a new authorization service builder.
 
Method Summary
 AuthorizationService build()
          Returns an authorization service that matches the builder's configuration.
 AuthorizationServiceBuilder forPolicyDecisionPoint(PolicyDecisionPoint accessPolicyDecisionPoint)
          Configures the policy that the created PDP will use for access decisions.
 AuthorizationServiceBuilder withClock(Clock clockService)
          Configures the clock service that the created PDP will use to get time values.
 AuthorizationServiceBuilder withListener(VetoableAccessDecisionListener listener)
          Adds a vetoable access decision listener that will be used by the created PDP.
 AuthorizationServiceBuilder withSubjectsFrom(SubjectFinder finder)
          Configures the subject finder from which the created PDP will retrieve subjects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationServiceBuilder

public AuthorizationServiceBuilder()
Creates a new authorization service builder.

Since:
0.3.0
Method Detail

withListener

public AuthorizationServiceBuilder withListener(VetoableAccessDecisionListener listener)
Adds a vetoable access decision listener that will be used by the created PDP.

Parameters:
listener - the listener to add.
Returns:
this builder.
Since:
0.3.0

withSubjectsFrom

public AuthorizationServiceBuilder withSubjectsFrom(SubjectFinder finder)
Configures the subject finder from which the created PDP will retrieve subjects.

Parameters:
finder - a SubjectFinder.
Returns:
this builder.
Since:
0.1.0

withClock

public AuthorizationServiceBuilder withClock(Clock clockService)
Configures the clock service that the created PDP will use to get time values.

Parameters:
clockService - a Clock service.
Since:
0.1.0

forPolicyDecisionPoint

public AuthorizationServiceBuilder forPolicyDecisionPoint(PolicyDecisionPoint accessPolicyDecisionPoint)
Configures the policy that the created PDP will use for access decisions.

Parameters:
accessPolicyDecisionPoint - the PolicyDecisionPoint to use for access decisions.
Returns:
this builder.
Since:
0.3.0

build

public AuthorizationService build()
Returns an authorization service that matches the builder's configuration.

Returns:
a new AuthorizationService.
Since:
0.1.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG