public abstract class AuthorizationEngine extends Object
SignedContent
.
For example, an engine could determine if SignedContent
is authorized
to enable code from a signed bundle.Constructor and Description |
---|
AuthorizationEngine(BundleContext context) |
Modifier and Type | Method and Description |
---|---|
void |
authorize(SignedContent content,
Object context)
Authorizes a
SignedContent object. |
protected abstract AuthorizationEvent |
doAuthorize(SignedContent content,
Object context)
Authorizes a
SignedContent object. |
abstract int |
getStatus()
Return the current status of the Authorization system.
|
public AuthorizationEngine(BundleContext context)
public final void authorize(SignedContent content, Object context)
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.content
- the signed content. The value may be null
.context
- the context associated with the signed content. The value may be null
.protected abstract AuthorizationEvent doAuthorize(SignedContent content, Object context)
SignedContent
object. The engine determines if the
signed content authorization should be granted.content
- context
- the context associated with the signed contentnull
may be returned; in this case no authorization event will be fired.public abstract int getStatus()
AuthorizationStatus.OK
or AuthorizationStatus.ERROR
AuthorizationStatus.OK
,
AuthorizationStatus.ERROR
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.