List of usage examples for javax.naming.directory InvalidAttributesException InvalidAttributesException
public InvalidAttributesException(String explanation)
From source file:main.export.sql.DataImporter.java
private void findDataStoreWriter() throws InvalidAttributesException { if (getDataStoreType().equals(DataStoreType.MONGO)) { writer = new MongoWriter(); } else if (getDataStoreType().equals(DataStoreType.ES)) { writer = new ESWriter(); } else if (getDataStoreType().equals(DataStoreType.COUCH)) { writer = new CouchWriter(); } else {/* w ww . j a v a 2s .co m*/ throw new InvalidAttributesException("The requested datastore support is not available !."); } }
From source file:org.apache.sling.performance.FrameworkPerformanceMethod.java
/** * Get the method annotated with the custom annotation * * @param testClass/* w ww . j a va 2 s. c o m*/ * the test class on which to look for the method * @param methodAnnotation * the method annotation to look for * @return * @throws InvalidAttributesException * @throws IllegalAccessException * @throws InstantiationException */ @SuppressWarnings({ "rawtypes" }) private Method getSpecificTestMethod(Class testClass, Class<? extends Annotation> methodAnnotation) throws InvalidAttributesException, IllegalAccessException, InstantiationException { Method[] methodsToReturn = getSpecificMethods(testClass, methodAnnotation); Method methodToReturn = null; if (methodsToReturn.length == 1) { methodToReturn = methodsToReturn[0]; } else if (methodsToReturn.length > 1) { throw new InvalidAttributesException("Only 1 non parameterized before method accepted"); } return methodToReturn; }