org.eclipse.osgi.internal.provisional.service.security
Class AuthorizationEngine

java.lang.Object
  extended by org.eclipse.osgi.internal.provisional.service.security.AuthorizationEngine
Direct Known Subclasses:
DefaultAuthorizationEngine

public abstract class AuthorizationEngine
extends java.lang.Object

An authorization engine is used to grant authorization to SignedContent. For example, an engine could determine if SignedContent is authorized to enable code from a signed bundle.

Since:
3.4

Constructor Summary
AuthorizationEngine(BundleContext context)
           
 
Method Summary
 void authorize(SignedContent content, java.lang.Object context)
          Authorizes a SignedContent object.
protected abstract  AuthorizationEvent doAuthorize(SignedContent content, java.lang.Object context)
          Authorizes a SignedContent object.
abstract  int getStatus()
          Return the current status of the Authorization system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationEngine

public AuthorizationEngine(BundleContext context)
Method Detail

authorize

public final void authorize(SignedContent content,
                            java.lang.Object context)
Authorizes a SignedContent object. The engine determines if the signed content authorization should be granted. The context is the entity associated with the signed content. For example, signed content for a bundle will have a Bundle object as the context.

Parameters:
content - the signed content. The value may be null.
context - the context associated with the signed content. The value may be null.

doAuthorize

protected abstract AuthorizationEvent doAuthorize(SignedContent content,
                                                  java.lang.Object context)
Authorizes a SignedContent object. The engine determines if the signed content authorization should be granted.

Parameters:
content -
context - the context associated with the signed content
Returns:
an authorization event which will be fired. A value of null may be returned; in this case no authorization event will be fired.

getStatus

public abstract int getStatus()
Return the current status of the Authorization system.

Returns:
A value of AuthorizationStatus.OK or AuthorizationStatus.ERROR
See Also:
AuthorizationStatus.OK, AuthorizationStatus.ERROR


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.