Exemplo n.º 1
0
 @Override
 public void doAudit(T auditDataset) {
   XdsAuditStrategy<T> strategy = (XdsAuditStrategy<T>) getAuditStrategy();
   if (strategy != null) {
     strategy.doAudit(auditDataset);
   }
 }
Exemplo n.º 2
0
 @Override
 public boolean enrichAuditDatasetFromResponse(T auditDataset, Object response) {
   XdsAuditStrategy<T> strategy = (XdsAuditStrategy<T>) getAuditStrategy();
   if (strategy != null) {
     return strategy.enrichAuditDatasetFromResponse(auditDataset, response);
   }
   return false;
 }
Exemplo n.º 3
0
 @Override
 public T enrichAuditDatasetFromRequest(
     T auditDataset, Object request, Map<String, Object> parameters) {
   XdsAuditStrategy<T> strategy = (XdsAuditStrategy<T>) getAuditStrategy();
   if (strategy != null) {
     return strategy.enrichAuditDatasetFromRequest(auditDataset, request, parameters);
   }
   return null;
 }
Exemplo n.º 4
0
  private XdsAuditStrategy<? extends XdsAuditDataset> getAuditStrategy() {
    MessageContext messageContext = new WebServiceContextImpl().getMessageContext();
    if ("GET".equals(messageContext.get(MessageContext.HTTP_REQUEST_METHOD))) {
      return null;
    }
    if (!messageContext.containsKey(MessageContext.WSDL_OPERATION)) {
      return null;
    }

    QName operationName = (QName) messageContext.get(MessageContext.WSDL_OPERATION);
    XdsAuditStrategy<? extends XdsAuditDataset> auditStrategy = map.get(operationName);
    if (auditStrategy == null) {
      log.debug("No strategy could be found for operation {}", operationName);
    } else {
      log.debug(
          "Found strategy {} for operation {}",
          auditStrategy.getClass().getCanonicalName(),
          operationName);
    }
    return auditStrategy;
  }
Exemplo n.º 5
0
 @Override
 public RFC3881EventCodes.RFC3881EventOutcomeCodes getEventOutcomeCode(Object response) {
   XdsAuditStrategy<? extends XdsAuditDataset> strategy = getAuditStrategy();
   return (strategy != null) ? strategy.getEventOutcomeCode(response) : null;
 }
Exemplo n.º 6
0
 @Override
 public T createAuditDataset() {
   XdsAuditStrategy<? extends XdsAuditDataset> strategy = getAuditStrategy();
   return (strategy != null) ? (T) strategy.createAuditDataset() : null;
 }