/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: PolicyService.java,v 1.5 2008/06/25 05:43:54 qcheng Exp $
*
*/
/*
* Portions Copyrighted [2011] [ForgeRock AS]
*/
/**
* This <code>PolicyService</code> class repolicyResents a PolicyService
* XML document. The PolicyService DTD is defined as the following:
* <p>
* <pre>
* <!-- PolicyService element is the root element for remote policy
* service. This XML will be typically used between the client
* and the server. The client uses the PolicyRequest element to
* request information from the server and the server would respond
* using the PolicyResponse element. The server would use
* PolicyNotification to send policy or subject change notification
* to the client.
* -->
*
* <!ELEMENT PolicyService ( PolicyRequest
* | PolicyResponse
* | PolicyNotification ) >
* <!ATTLIST PolicyService
* version CDATA "1.0"
* >
* </pre>
*/
public class PolicyService {
/**
* Policy Service name.
*/
/**
* Policy Request ID.
*/
/**
* Policy Response ID.
*/
/**
* Policy Notification ID.
*/
/**
* implies server was not able to get the revision number from
* service schema
*/
/**
* Default Constructor for <code>PolicyService</code>.
*/
public PolicyService() {
}
/**
* Returns the service revision number of the Policy Service.
*
* @return the service revision number of the Policy Service.
*/
return revision;
}
/**
* Sets the service revision number for the Policy Service.
*
* @param revision the revision
*/
}
/**
* Returns the version number of the Policy Service.
*
* @return the version of the Policy Service.
*/
return version;
}
/**
* Sets the version for the Policy Service.
*
* @param ver the version.
*/
}
/**
* Returns the method id of the Policy Service.
*
* @return the method id of the Policy Service.
*/
public int getMethodID() {
return methodID;
}
/**
* Sets the method id of the Policy Service.
*
* @param id the method id of this Policy Service
*/
}
/**
* Returns the <code>PolicyRequest</code> object.
*
* @return the <code>PolicyRequest</code> object.
*/
return policyReq;
}
/**
* Sets the <code>PolicyRequest</code> of the Policy Service.
*
* @param req the <code>PolicyRequest</code> of this Policy Service
*/
}
/**
* Returns the <code>PolicyResponse</code> object.
*
* @return the <code>PolicyResponse</code> object.
*/
return policyRes;
}
/**
* Sets the <code>PolicyResponse</code> of the Policy Service.
*
* @param res the <code>PolicyResponse</code> of this Policy Service.
*/
}
/**
* Returns the <code>PolicyNotification</code> object.
*
* @return the PolicyNotification object
*/
return policyNotification;
}
/**
* Sets the <code>PolicyNotification</code> of the Policy Service.
*
* @param noti The <code>PolicyNotification</code> of this Policy Service.
*/
{
}
/**
* Returns <code>PolicyService</code> object constructed from XML.
*
* @param xml the XML document for the <code>PolicyService</code> object.
* @return constructed <code>PolicyService</code> object.
*/
throws PolicyEvaluationException
{
try {
}
"invalid root element specified in the request");
}
}
}
// Check if this is a policy request.
return ps;
}
// Check if this is a policy response.
return ps;
}
// Check if this is a policy notification to the client.
return ps;
}
/*
* We reach here, there is no valid method name specified in
* the xml docuemnt. Throw exception.
*/
}
/**
* Returns string representation of this object.
*
* @return string representation of this object.
*/
.append(" ")
.append("=")
.append("\"")
.append("\"");
.append("=")
.append("\"")
.append("\"");
}
switch(methodID) {
case POLICY_REQUEST_ID:
}
break;
case POLICY_RESPONSE_ID:
}
break;
case POLICY_NOTIFICATION_ID:
if (policyNotification != null) {
}
break;
default:
break;
}
.append(">")
}
}