org.opentox.toxotis.util.aa.policy
Interface IPolicyWrapper

All Known Subinterfaces:
IPolicy
All Known Implementing Classes:
Policy, PolicyWrapper

public interface IPolicyWrapper

A Policy Wrapper is a bundle of policies that can be sent/posted as one object to the openSSO server.

Author:
Pantelis Sopasakis, Charalampos Chomenides

Method Summary
 Document getDocument()
           
 String getText()
           
 int publish(VRI policyServer, AuthenticationToken token)
          Publish this policy to a remote server and acquire a URI for it.
 

Method Detail

getDocument

Document getDocument()

getText

String getText()

publish

int publish(VRI policyServer,
            AuthenticationToken token)
            throws ServiceInvocationException
Publish this policy to a remote server and acquire a URI for it.

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:
ToxOtisException - In case a HTTP related error occurs (I/O communication error, or the remote server is down), the service respondes in an unexpected manner like a status code 500 or 503 or authentication/authorization fails and a status code 403 or 401 are returned respectively.
InactiveTokenException - If the token the user uses is not active (because it has been invalidated, expired, or not initialized yet).
ServiceInvocationException


Copyright © 2011-2012 OpenTox. All Rights Reserved.