Package org.apache.turbine.services.resources

Examples of org.apache.turbine.services.resources.ResourceService


     */
    private List getTools(String keyPrefix)
    {
        List classes = new ArrayList();

        ResourceService toolResources =
            TurbineResources.getResources(keyPrefix);

        /*
         * There might not be any tools for this prefix
         * so return an empty list.
         */
        if (toolResources == null)
        {
            return classes;
        }           

        Iterator it = toolResources.getKeys();
        while (it.hasNext())
        {
            String toolName = (String) it.next();
            String toolClassName = toolResources.getString(toolName);
           
            try
            {
                /*
                 * Create an instance of the tool class.
View Full Code Here


     */
    protected void setUp() throws Exception
    {
        super.setUp();

        ResourceService serviceConf = ((TurbineServices) TurbineServices.getInstance()).getResources(PortalToolkitService.SERVICE_NAME);

        this.defaultSkin = serviceConf.getString("default.skin");
        String path = getTestConfig().getString(SKIN_TEST_PATH);
        String path2 = getTestConfig().getString(SKIN_TEST2_PATH);
        String path3 = getTestConfig().getString(SKIN_TEST3_PATH);
        String path4 = getTestConfig().getString(SKIN_TEST4_PATH);
        prof1 = new File(path);
View Full Code Here

                "[PortalPersistenceService] The current RunData implenetation does not implement the JetspeedRunData interface.");
            setInit(false);
            throw new InitializationException("The current RunData implenetation does not implement the JetspeedRunData interface.");              
        }
       
        ResourceService config = ((TurbineServices)TurbineServices.getInstance())
                                            .getResources(PortalPersistenceService.SERVICE_NAME);
       
        this.autoStore = config.getBoolean("autostore.shared", true);
       
        super.init(data);
    }   
View Full Code Here

            String root = "./webapp";
            String properties = "/WEB-INF/conf/RegistryImport.properties";
            TurbineConfig config = new TurbineConfig(root, properties);

            config.initialize();
            ResourceService serviceConf = ((TurbineServices)
                    TurbineServices.getInstance()).getResources(RegistryService.SERVICE_NAME);

        }
        catch (Throwable t)
        {
View Full Code Here

        if (getInit()) return;

        try
        {
            // get configuration parameters from Jetspeed Resources
            ResourceService serviceConf = ((TurbineServices)TurbineServices.getInstance())
                                                         .getResources(ForwardService.SERVICE_NAME);

            this.mapping = serviceConf.getString(CONFIG_MAPPING, this.mapping);

            this.directory = serviceConf.getString(CONFIG_DIRECTORY, this.directory);

            this.mapping = TurbineServlet.getRealPath(this.mapping);
            this.directory = TurbineServlet.getRealPath(this.directory);

            loadForwards();
View Full Code Here

        {
            handler = (ObjectHandler)handlerCache.get(className);
        }
        else
        {
            ResourceService serviceConf = ((TurbineServices) TurbineServices.getInstance())
                                              .getResources(SearchService.SERVICE_NAME);
            String handlerClass = serviceConf.getString("document." + className);
   
            if (handlerClass == null)
            {
                throw new Exception("No handler was found for document type: " + className);
            }
View Full Code Here

    /**
     * This method initializes the service.
     */
    private void internalInit() throws InitializationException
    {
        ResourceService props = getResources();
        if (props == null)
        {
            throw new InitializationException("LoggingService failed to "
                                              + "get access to the properties for this service.");
        }

        //looking for default logger name
        String defaultLoggerName = props.getString(LoggingConfig.DEFAULT);

        //checking whether default logger is properly configured
        if (defaultLoggerName == null)
        {
            throw new InitializationException("LoggingService can't find "
View Full Code Here

        {
            return;
        }

        // get configuration parameters from Jetspeed Resources
        ResourceService serviceConf = ((TurbineServices) TurbineServices.getInstance())
                                      .getResources(SearchService.SERVICE_NAME);

        // Get config properties
        indexRoot = serviceConf.getString(CONFIG_DIRECTORY);
        //
        // The following section opens or creates the search index
        //
        //
        rootDir = new File(indexRoot);

        //If the rootDir does not exist, treat it as context relative
        if (!rootDir.exists())
        {
            if (indexRoot != null)
            {
                String rootDirPath = TurbineServlet.getRealPath("") + indexRoot;
                rootDir = new File(rootDirPath);
                if (!rootDir.exists())
                {
                    rootDir.mkdir();
                    logger.info("Created index directory '" + rootDir.getPath() + "'");
                }
            }
        }
       
        //Get analyze class name
        analyzerClassName = serviceConf.getString(CONFIG_ANALYZER_CLASS_NAME, DEFAULT_ANALYZER_CLASS_NAME);
       
        //Whether to optimize automatically after an add/remove/update.
        doOptimize = serviceConf.getBoolean(CONFIG_AUTO_OPTIMIZE, DEFAULT_AUTO_OPTIMIZE);

        try
        {
            Searcher searcher = null;
            searcher = new IndexSearcher(rootDir.getPath());
View Full Code Here

    {
        connections = new Hashtable();
        connector = null;
        parser = null;
        env = new Properties();
        ResourceService serviceConf = ((TurbineServices)TurbineServices.getInstance())
                                                     .getResources(SERVICE_NAME);
        this.host = serviceConf.getString("host");
        this.port = serviceConf.getInt("port",DEFAULT_PORT);
        this.sslport = serviceConf.getInt("sslport",DEFAULT_SSLPORT);
        this.limit = serviceConf.getInt("limit",DEFAULT_LIMIT);
        this.timeout = serviceConf.getInt("timeout",DEFAULT_TIMEOUT);
        this.version = serviceConf.getInt("version",DEFAULT_VERSION);
        this.listFilter = repair(serviceConf.getString("listfilter","(objectclass=*)"));
        this.basedn = repair(serviceConf.getString("basedn"));
        this.managerdn = repair(serviceConf.getString("managerdn"));
        this.password = serviceConf.getString("password");
        this.attributesList = getList(serviceConf.getString("attributeslist")," ");
        this.showOpAttributes = serviceConf.getBoolean("showopattributes",false);
        this.anonymousBind = serviceConf.getBoolean("anonymousbind",false);
        this.securityAuthentication = serviceConf.getString("securityauthentication","simple");
        this.securityProtocol = serviceConf.getString("securityprotocol");
        this.socketFactory = serviceConf.getString("socketfactory");
        this.useCachedDirContexts = serviceConf.getBoolean("contextcache", false);

        this.jndiprovider = serviceConf.getString("jndiprovider",DEFAULT_CTX);
        this.saslclientpckgs = serviceConf.getString("saslclientpckgs");
        mainConnect(new LDAPURL(host,port,basedn));
        setInit(true);
    }
View Full Code Here

        if (null == groupClassName)
        {
            try
            {
                ResourceService serviceConf = ((TurbineServices)TurbineServices.getInstance())
                                                         .getResources(JetspeedSecurityService.SERVICE_NAME);
                groupClassName = serviceConf.getString(CONFIG_GROUP_CLASSNAME);                                                            
                groupClass = Class.forName(groupClassName);
            }
            catch(Exception e)
            {
                throw new GroupException(
View Full Code Here

TOP

Related Classes of org.apache.turbine.services.resources.ResourceService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.