org.opentox.toxotis.util.aa.policy
Class PolicyWrapper

java.lang.Object
  extended by org.opentox.toxotis.util.aa.policy.PolicyWrapper
All Implemented Interfaces:
IPolicyWrapper

public class PolicyWrapper
extends Object
implements IPolicyWrapper

Author:
Pantelis Sopasakis, Charalampos Chomenides

Constructor Summary
PolicyWrapper()
           
PolicyWrapper(Policy... pols)
           
 
Method Summary
 IPolicyWrapper addPolicies(Policy... pols)
           
 Document getDocument()
           
 Set<Policy> getPolicies()
           
 String getText()
           
 int publish(VRI policyServer, AuthenticationToken token)
          Publish this policy to a remote server and acquire a URI for it.
 IPolicyWrapper setPolicies(Set<Policy> pols)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyWrapper

public PolicyWrapper()

PolicyWrapper

public PolicyWrapper(Policy... pols)
Method Detail

getPolicies

public Set<Policy> getPolicies()

setPolicies

public IPolicyWrapper setPolicies(Set<Policy> pols)

addPolicies

public IPolicyWrapper addPolicies(Policy... pols)

getText

public String getText()
Specified by:
getText in interface IPolicyWrapper

getDocument

public Document getDocument()
Specified by:
getDocument in interface IPolicyWrapper

publish

public int publish(VRI policyServer,
                   AuthenticationToken token)
            throws ServiceInvocationException
Description copied from interface: IPolicyWrapper
Publish this policy to a remote server and acquire a URI for it.

Specified by:
publish in interface IPolicyWrapper
Parameters:
policyServer - URI of the policy server. If set to null then the standard policy service of OpenTox at https://opensso.in-silico.ch/pol will be used instead.
token - Token used to authenticate the user that attempts to publish a new policy against the policy service. If you think that no authentication is needed to perform the HTTP request you may set it to null.
Returns:
Server's response message
Throws:
ServiceInvocationException


Copyright © 2011-2012 OpenTox. All Rights Reserved.