/** * @return a default processed result */ protected HandlerProcessingResult getDefaultProcessedResult() { return HandlerProcessingResultImpl.getDefaultResult( getAnnotationType(), ResultType.PROCESSED); }
public Class<? extends Annotation>[] getTypeDependencies() { return getConnectorAnnotationTypes(); }
boolean isConnectionDefinition = hasConnectorAnnotation(element); if (isConnectionDefinition) { RarBundleContext rarContext = (RarBundleContext) aeHandler; int authMechanismValue = getAuthMechVal(authMechanism.authMechanism()); AuthenticationMechanism.CredentialInterface ci = authMechanism.credentialInterface(); String credentialInterface = ora.getCredentialInterfaceName(ci); ora.addAuthMechanism(auth); } else { getFailureResult(element, "Not a @Connector annotation : @AuthenticationMechanism must " + "be specified along with @Connector annotation", true); getFailureResult(element, "Not a rar bundle context", true); return getDefaultProcessedResult();
private HandlerProcessingResultImpl getFailureResult(AnnotationInfo element, String message, boolean doLog) { HandlerProcessingResultImpl result = new HandlerProcessingResultImpl(); result.addResult(getAnnotationType(), ResultType.FAILED); if (doLog) { Class c = (Class) element.getAnnotatedElement(); String className = c.getName(); Object args[] = new Object[]{ element.getAnnotation(), className, message, }; String localString = localStrings.getLocalString( "enterprise.deployment.annotation.handlers.connectorannotationfailure", "failed to handle annotation [ {0} ] on class [ {1} ], reason : {2}", args); logger.log(Level.WARNING, localString); } return result; } }