public abstract class DefaultRulesServicePermission extends Object implements com.orchestranetworks.service.ServicePermission
Create a class that extends DefaultRulesServicePermission
, then define the service name by implementing the abstract method getServiceName()
public final class MyServicePermission extends DefaultRulesServicePermission { public String getServiceName() { return "MyService"; } }
Declare this class as a service permission for the declared service in module.xml
<service name="MyService"> <resourcePath>/services-dispatcher?service=MyService</resourcePath> <instanceActivation all="true"> <scope availableOnChild="true"> ... <permission class="com.foo.MyServicePermission"/> </scope> </instanceActivation> ... </service>
DefaultRulesSchemaServicePermission
Constructor and Description |
---|
DefaultRulesServicePermission() |
Modifier and Type | Method and Description |
---|---|
com.orchestranetworks.service.ActionPermission |
getDefaultPermission()
Returns the default
ActionPermission which will be used in case of an exception or no rule configured for the given service. |
com.orchestranetworks.service.ActionPermission |
getPermission(com.orchestranetworks.schema.SchemaNode node,
com.onwbp.adaptation.Adaptation adaptation,
com.orchestranetworks.service.Session session) |
abstract String |
getServiceName()
Returns the service name.
|
public abstract String getServiceName()
public com.orchestranetworks.service.ActionPermission getDefaultPermission()
ActionPermission
which will be used in case of an exception or no rule configured for the given service.public final com.orchestranetworks.service.ActionPermission getPermission(com.orchestranetworks.schema.SchemaNode node, com.onwbp.adaptation.Adaptation adaptation, com.orchestranetworks.service.Session session)
getPermission
in interface com.orchestranetworks.service.ServicePermission