&& DATASOURCE_ELEMENT.equals(child2.getNodeName())) { Element dsdef = (Element) child2; String logicalName = getAttribute(dsdef, "name"); Properties props = parseParameters(dsdef); dsc.addDataSourceDefinition(logicalName, props);
&& DATASOURCE_ELEMENT.equals(child2.getNodeName())) { Element dsdef = (Element) child2; String logicalName = getAttribute(dsdef, "name"); Properties props = parseParameters(dsdef); dsc.addDataSourceDefinition(logicalName, props);
String value = getAttribute(element, ID_ATTRIBUTE, null); if (value != null) { id = replaceVariables(value); long syncDelay = Long.parseLong(replaceVariables(getAttribute( element, SYNC_DELAY_ATTRIBUTE, DEFAULT_SYNC_DELAY))); long stopDelay = Long.parseLong(replaceVariables(getAttribute( element, STOP_DELAY_ATTRIBUTE, "-1")));
String value = getAttribute(element, ID_ATTRIBUTE, null); if (value != null) { id = replaceVariables(value); long syncDelay = Long.parseLong(replaceVariables(getAttribute( element, SYNC_DELAY_ATTRIBUTE, DEFAULT_SYNC_DELAY))); long stopDelay = Long.parseLong(replaceVariables(getAttribute( element, STOP_DELAY_ATTRIBUTE, "-1")));
throw new ConfigurationException("Only MultiDataStoreAware datastore's can be used within a MultiDataStore."); String type = getAttribute((Element) paramNode, NAME_ATTRIBUTE); if (PRIMARY_DATASTORE_ATTRIBUTE.equals(type)) { primary = subDataStore;
throw new ConfigurationException("Only MultiDataStoreAware datastore's can be used within a MultiDataStore."); String type = getAttribute((Element) paramNode, NAME_ATTRIBUTE); if (PRIMARY_DATASTORE_ATTRIBUTE.equals(type)) { primary = subDataStore;
String name = getAttribute(root, "name", new File(home).getName()); getAttribute(root, CLUSTERED_ATTRIBUTE, "true")); String to = getAttribute(root, "defaultLockTimeout", new Long(Long.MAX_VALUE).toString()); long defaultLockTimeout; try {
String name = getAttribute(root, "name", new File(home).getName()); getAttribute(root, CLUSTERED_ATTRIBUTE, "true")); String to = getAttribute(root, "defaultLockTimeout", new Long(Long.MAX_VALUE).toString()); long defaultLockTimeout; try {
/** * Parses security configuration. Security configuration * uses the following format: * <pre> * <Security appName="..."> * <SecurityManager ...> * <AccessManager ...> * <LoginModule ... (optional)> * </Security> * </pre> * <p> * The <code>SecurityManager</code>, the <code>AccessManager</code> * and <code>LoginModule</code> are all * {@link #parseBeanConfig(Element,String) bean configuration} * elements. * <p> * The login module is an optional feature of repository configuration. * * @param security the <security> element. * @return the security configuration. * @throws ConfigurationException if the configuration is broken */ public SecurityConfig parseSecurityConfig(Element security) throws ConfigurationException { String appName = getAttribute(security, APP_NAME_ATTRIBUTE); SecurityManagerConfig smc = parseSecurityManagerConfig(security); AccessManagerConfig amc = parseAccessManagerConfig(security); LoginModuleConfig lmc = parseLoginModuleConfig(security); return new SecurityConfig(appName, smc, amc, lmc); }
/** * Parses security configuration. Security configuration * uses the following format: * <pre> * <Security appName="..."> * <SecurityManager ...> * <AccessManager ...> * <LoginModule ... (optional)> * </Security> * </pre> * <p> * The <code>SecurityManager</code>, the <code>AccessManager</code> * and <code>LoginModule</code> are all * {@link #parseBeanConfig(Element,String) bean configuration} * elements. * <p> * The login module is an optional feature of repository configuration. * * @param security the <security> element. * @return the security configuration. * @throws ConfigurationException if the configuration is broken */ public SecurityConfig parseSecurityConfig(Element security) throws ConfigurationException { String appName = getAttribute(security, APP_NAME_ATTRIBUTE); SecurityManagerConfig smc = parseSecurityManagerConfig(security); AccessManagerConfig amc = parseAccessManagerConfig(security); LoginModuleConfig lmc = parseLoginModuleConfig(security); return new SecurityConfig(appName, smc, amc, lmc); }
getAttribute(workspaces, ROOT_PATH_ATTRIBUTE)); getAttribute(workspaces, CONFIG_ROOT_PATH_ATTRIBUTE, null); getAttribute(workspaces, DEFAULT_WORKSPACE_ATTRIBUTE)); getAttribute(workspaces, MAX_IDLE_TIME_ATTRIBUTE, "0"));
getAttribute(workspaces, ROOT_PATH_ATTRIBUTE)); getAttribute(workspaces, CONFIG_ROOT_PATH_ATTRIBUTE, null); getAttribute(workspaces, DEFAULT_WORKSPACE_ATTRIBUTE)); getAttribute(workspaces, MAX_IDLE_TIME_ATTRIBUTE, "0"));
replaceVariables(getAttribute(element, ROOT_PATH_ATTRIBUTE));
replaceVariables(getAttribute(element, ROOT_PATH_ATTRIBUTE));
public QueryHandler getQueryHandler(QueryHandlerContext context) throws RepositoryException { Element element = (Element) child; // Optional file system implementation FileSystem fs = null; if (getElement(element, FILE_SYSTEM_ELEMENT, false) != null) { fs = getFileSystemFactory( element, FILE_SYSTEM_ELEMENT).getFileSystem(); } // Search implementation class String className = getAttribute( element, CLASS_ATTRIBUTE, DEFAULT_QUERY_HANDLER); BeanConfig config = new BeanConfig( className, parseParameters(element)); QueryHandler handler = config.newInstance(QueryHandler.class); try { handler.init(fs, context); return handler; } catch (IOException e) { throw new RepositoryException( "Unable to initialize query handler: " + handler, e); } } };
public QueryHandler getQueryHandler(QueryHandlerContext context) throws RepositoryException { Element element = (Element) child; // Optional file system implementation FileSystem fs = null; if (getElement(element, FILE_SYSTEM_ELEMENT, false) != null) { fs = getFileSystemFactory( element, FILE_SYSTEM_ELEMENT).getFileSystem(); } // Search implementation class String className = getAttribute( element, CLASS_ATTRIBUTE, DEFAULT_QUERY_HANDLER); BeanConfig config = new BeanConfig( className, parseParameters(element)); QueryHandler handler = config.newInstance(QueryHandler.class); try { handler.init(fs, context); return handler; } catch (IOException e) { throw new RepositoryException( "Unable to initialize query handler: " + handler, e); } } };
if (smElement != null) { BeanConfig bc = parseBeanConfig(smElement); String wspAttr = getAttribute(smElement, WSP_NAME_ATTRIBUTE, null);
if (smElement != null) { BeanConfig bc = parseBeanConfig(smElement); String wspAttr = getAttribute(smElement, WSP_NAME_ATTRIBUTE, null);