private RoleEntry[] mapFromFortress(Configuration roleConfiguration) throws ConfigurationException { Validate.notNull(roleConfiguration, "roleConfiguration"); throw new ConfigurationException("Not supported yet"); } }
private RoleEntry[] mapFromFortress( Configuration roleConfiguration ) throws ConfigurationException { Validate.notNull(roleConfiguration, "roleConfiguration"); throw new ConfigurationException("Not supported yet"); } }
private RoleEntry[] mapFromPhoenix( Configuration roleConfiguration ) throws ConfigurationException { Validate.notNull(roleConfiguration, "roleConfiguration"); throw new ConfigurationException("Not supported yet"); }
private RoleEntry[] mapFromPhoenix(Configuration roleConfiguration) throws ConfigurationException { Validate.notNull(roleConfiguration, "roleConfiguration"); throw new ConfigurationException("Not supported yet"); }
private void registerInstruction(String instructionName, String targetNamespace, String className) throws ConfigurationException { Class clazz; try { clazz = Class.forName(className); if (!ClassUtils.isAssignable(clazz, Instruction.class)) throw new ConfigurationException("Class '" + className + "' is not assignable to " + "o.a.c.template.jxtg.script.event.StartInstruction "); Constructor constructor = clazz.getConstructor(INSTRUCTION_CONSTRUCTOR_PARAMS); String instructionKey = instructionKey(instructionName, targetNamespace); this.instructions.put(instructionKey, constructor); } catch (Exception e) { if (e instanceof ConfigurationException) throw (ConfigurationException) e; else throw new ConfigurationException("unable to register instruction", e); } }
/** * @param scope Value of the error handler scope attribute: external, internal, always. */ public HandleErrorsNode(String scope) throws ConfigurationException { if ("internal".equals(scope)) { this.internal = true; } else if ("external".equals(scope)) { this.external = true; } else if ("always".equals(scope)) { this.internal = true; this.external = true; } else { throw new ConfigurationException("Unrecognized value of when attribute on <handle-errors> at " + getLocation()); } }
public static Iterator getAttributeNames(JXPathHelperConfiguration setup, Object contextObj) throws ConfigurationException { if (contextObj == null) { return null; } try { JXPathBeanInfo info = JXPathIntrospector.getBeanInfo(contextObj.getClass()); java.beans.PropertyDescriptor[] properties = info.getPropertyDescriptors(); List names = new LinkedList(); for (int i = 0; i < properties.length; i++) { names.add(properties[i].getName()); } return names.listIterator(); } catch (Exception e) { throw new ConfigurationException("Error retrieving attribute names for class: " + contextObj.getClass(), e); } } }
protected boolean isParameter(Configuration config) throws ConfigurationException { final String name = config.getName(); if (name.equals("parameter")) { if (this.hasParameters()) { return true; } String msg = "Element '" + name + "' has no parameters at " + config.getLocation(); throw new ConfigurationException(msg); } return false; }
/** * Returns the prefix of the namespace * @return a <code>String</code> value * @throws ConfigurationException if prefix is not present (<code>null</code>). * @since 4.1 */ protected String getPrefix() throws ConfigurationException { if( null != m_prefix ) { return m_prefix; } else { throw new ConfigurationException ( "No prefix (not even default \"\") is associated with the " + "configuration element \"" + getName() + "\" at " + getLocation() ); } }
/** * Returns the value of the configuration element as a <code>String</code>. * * @return a <code>String</code> value * @throws ConfigurationException If the value is not present. */ public String getValue() throws ConfigurationException { if( null != m_value ) { return m_value; } else { throw new ConfigurationException( "No value is associated with the " + "configuration element \"" + getName() + "\" at " + getLocation() ); } }
/** * Check if the namespace URI of the given configuraition is the same as the * one given by the builder. */ protected void checkNamespace(Configuration config) throws ConfigurationException { if (!this.treeBuilder.getNamespace().equals(config.getNamespace())) { String msg = "Invalid namespace '" + config.getNamespace() + "' at " + config.getLocation(); throw new ConfigurationException(msg); } } }
protected void setupNode(ContainerNode node, Configuration config)throws Exception { this.treeBuilder.setupNode(node, config); ProcessingNode[] children = buildChildNodes(config); if (children.length == 0) { String msg = "There must be at least one child at " + config.getLocation(); throw new ConfigurationException(msg); } node.setChildren(children); } }
public void initialize() throws Exception { // Prepare the pattern PreparableMatcher matcher = (PreparableMatcher)getComponent(); try { this.preparedPattern = matcher.preparePattern(this.pattern); } catch(PatternException pe) { String msg = "Invalid pattern '" + this.pattern + "' for matcher at " + getLocation(); throw new ConfigurationException(msg, pe); } finally { releaseComponent(matcher); } }
/** * Set configuration */ public void configure(Configuration conf) throws ConfigurationException { super.configure(conf); mbEncrypt = conf.getChild("encrypt").getValueAsBoolean(false); try { mUserDataFile = new File(getBaseDirectory(), USER_PROP); mUserDataFile.createNewFile(); mUserData = new BaseProperties(mUserDataFile); mlLastModified = mUserDataFile.lastModified(); getLogger().info("Loaded user data file - " + mUserDataFile); } catch(IOException ex) { getLogger().error(ex.getMessage(), ex); throw new ConfigurationException(ex.getMessage()); } }
public void configure(Configuration configuration) throws ConfigurationException { String tFactoryClass = configuration.getChild("transformer-factory").getValue(null); this.osCommand = configuration.getChild("command").getValue(null); if (tFactoryClass != null) { try { this.transformerFactory = (SAXTransformerFactory) ClassUtils .newInstance(tFactoryClass); if (getLogger().isDebugEnabled()) { getLogger().debug("Using transformer factory " + tFactoryClass); } } catch (Exception e) { throw new ConfigurationException( "Cannot load transformer factory " + tFactoryClass, e); } } else { this.transformerFactory = (SAXTransformerFactory) TransformerFactory.newInstance(); } }
/** * Configure user manager - third step. */ public void configure(Configuration config) throws ConfigurationException { mConfig = config; Configuration adminConf = mConfig.getChild("ftp-admin-name", false); mstAdminName = "admin"; if(adminConf != null) { mstAdminName = adminConf.getValue(mstAdminName); } mBaseDirectory = config.getChild("base-directory").getValue(null); if(mBaseDirectory == null) throw new ConfigurationException("Missing configuration element 'base-directory'"); }
/** * Configure user manager - third step. */ public void configure(Configuration config) throws ConfigurationException { mConfig = config; // get server address Configuration tmpConf = mConfig.getChild("allow-ip", false); mbAllowIp = false; if(tmpConf != null) { mbAllowIp = tmpConf.getValueAsBoolean(mbAllowIp); } mBaseDirectory = config.getChild("base-directory").getValue(null); if(mBaseDirectory == null) throw new ConfigurationException("Missing configuration element 'base-directory'"); }
/** * @see org.apache.cocoon.components.treeprocessor.LinkedProcessingNodeBuilder#linkNode() */ public void linkNode() throws Exception { if (this.actSetNode != null) { // Link action-set call to the action set CategoryNode actionSets = CategoryNodeBuilder.getCategoryNode(this.treeBuilder, "action-sets"); if (actionSets == null) throw new ConfigurationException("This sitemap contains no action sets. Cannot call at " + actSetNode.getLocation()); ActionSetNode actionSetNode = (ActionSetNode)actionSets.getNodeByName(this.actSetName); this.actSetNode.setActionSet(actionSetNode); } } }
public void linkNode() throws Exception { if (this.callNode != null) { CategoryNode resources = CategoryNodeBuilder.getCategoryNode(this.treeBuilder, "resources"); if (resources == null) { String msg = "This sitemap contains no resources. Cannot redirect at " + this.callNode.getLocation(); throw new ConfigurationException(msg); } this.callNode.setResource( resources, VariableResolverFactory.getResolver(this.resourceName, this.manager) ); } } }
public void incarnate() throws Exception { try { if( this.isEarlyInit() ) { this.getInstance(); } } catch(Throwable t) { String msg = "Failed initialize " + this.getRoleEntry().getImplementationClazzName(); throw new ConfigurationException(msg,t); } }