if (PolicyContextHandlerImpl.HTTP_SERVLET_REQUEST.equalsIgnoreCase(key)){
return httpReq;
} else if (PolicyContextHandlerImpl.SUBJECT.equalsIgnoreCase(key)){
return SecurityContext.getCurrent().getSubject();
} else if (PolicyContextHandlerImpl.REUSE.equalsIgnoreCase(key)) {
PermissionCacheFactory.resetCaches();
return new Integer(0);
}
if (inv == null) {
return null;
}
if (PolicyContextHandlerImpl.SOAP_MESSAGE.equalsIgnoreCase(key)){
SOAPMessage soapMessage = null;
MessageContext msgContext = inv.messageContext;
if (msgContext != null) {
if (msgContext instanceof SOAPMessageContext) {
SOAPMessageContext smc =
(SOAPMessageContext) msgContext;
soapMessage = smc.getMessage();
}
} else {
soapMessage = inv.getSOAPMessage();
}
return soapMessage;
} else if (PolicyContextHandlerImpl.ENTERPRISE_BEAN.equalsIgnoreCase(key)){
return inv.getJaccEjb();
} else if (PolicyContextHandlerImpl.EJB_ARGUMENTS.equalsIgnoreCase(key)){
if (inv.isWebService) {
return null;
} else {
return (inv.methodParams != null) ?
inv.methodParams : new Object[0];
}
}
return null;