Package org.apache.turbine.services.resources

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


        if (getInit()) return;

        super.init(conf);

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

        this.runDataService =
           (JetspeedRunDataService)TurbineServices.getInstance()
               .getService(RunDataService.SERVICE_NAME);

        cascadeDelete = serviceConf.getBoolean( CASCADE_DELETE, DEFAULT_CASCADE_DELETE );
        cachingEnable = serviceConf.getBoolean( CACHING_ENABLE, cachingEnable );
        systemPermissions = serviceConf.getVector( CONFIG_SYSTEM_PERMISSIONS, new Vector() );
        setInit(true);
     }
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

    {

        //Ensure that the servlet service is initialized
        TurbineServices.getInstance().initService(ServletService.SERVICE_NAME, conf);

        ResourceService serviceConf = ((TurbineServices) TurbineServices.getInstance())
                                                     .getResources(RegistryService.SERVICE_NAME);
        String mapFile = null;
        Vector names = new Vector();
        int refreshRate = 0;

        // read the configuration keys
        try
        {
            directory = serviceConf.getString("directory");
            mapFile = serviceConf.getString("mapping", DEFAULT_MAPPING);
            extension = serviceConf.getString("extension", DEFAULT_EXTENSION);
            refreshRate = serviceConf.getInt("refreshRate", DEFAULT_REFRESH);

            mapFile = TurbineServlet.getRealPath(mapFile);
            directory = TurbineServlet.getRealPath(directory);
        }
        catch (Throwable t)
        {
            throw new InitializationException("Unable to initialize CastorRegistryService, missing config keys");
        }

        // build the map of default fragments, eahc registry must be associated
        // with at least one fragment
        try
        {
            ResourceService defaults = serviceConf.getResources("default");
            Iterator i = defaults.getKeys();
            while (i.hasNext())
            {
                String name = (String) i.next();
                String fragmentFileName = defaults.getString(name);

                String absFileName = new File(directory, fragmentFileName + extension).getCanonicalPath();
                // add this name in the list of available registries
                names.add(name);
View Full Code Here

     */
    public static ObjectHandler getHandler(Object obj) throws Exception
    {
        ObjectHandler handler = null;

  ResourceService serviceConf = ((TurbineServices) TurbineServices.getInstance())
                                      .getResources(SearchService.SERVICE_NAME);
  String handlerClass = serviceConf.getString("document." + obj.getClass().getName())

        if (handlerClass == null)
        {
            throw new Exception("No handler was found for document type: " + obj.getClass().getName());
        }
View Full Code Here

     * Turbine <code>Service</code> framework
     */
    public void init(ServletConfig conf) throws InitializationException
    {

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

        this.defaultControl = serviceConf.getString("default.control");
        this.defaultController = serviceConf.getString("default.controller");
        this.defaultSkin = serviceConf.getString("default.skin");
        this.defaultUserSecurityRef = serviceConf.getString("default.user.security.ref");
        this.defaultAnonSecurityRef = serviceConf.getString("default.anon.security.ref");
        this.defaultRoleSecurityRef = serviceConf.getString("default.role.security.ref");
        this.defaultGroupSecurityRef = serviceConf.getString("default.group.security.ref");
        setInit(true);

    }
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);
View Full Code Here

        if (getInit()) return;

        super.init(conf);

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

        anonymousUser = serviceConf.getString(CONFIG_ANONYMOUS_USER, anonymousUser);
        cachingEnable = serviceConf.getBoolean( CACHING_ENABLE, cachingEnable );
        expirationPeriod = serviceConf.getInt( this.CONFIG_PASSWORD_EXPIRATION_PERIOD, 0 );

        this.runDataService =
            (JetspeedRunDataService)TurbineServices.getInstance()
                .getService(RunDataService.SERVICE_NAME);
View Full Code Here

     * fails to initialize
     */
    private void initConfiguration() throws InitializationException
    {
        // get configuration parameters from Jetspeed Resources
        ResourceService serviceConf = ((TurbineServices)TurbineServices.getInstance())
                                                     .getResources(IdGeneratorService.SERVICE_NAME);

        peidPrefix = serviceConf.getString( CONFIG_PEID_PREFIX, DEFAULT_CONFIG_PEID_PREFIX );
        peidSuffix = serviceConf.getString( CONFIG_PEID_SUFFIX, DEFAULT_CONFIG_PEID_SUFFIX );
        synchronized(JetspeedIdGeneratorService.class)
        {
            idCounter = serviceConf.getLong( CONFIG_COUNTER_START, DEFAULT_CONFIG_COUNTER_START );
        }
       
   }
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

     * Turbine <code>Service</code> framework
     */
    public void init( ServletConfig conf ) throws InitializationException
    {

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

        this.loggerName = serviceConf.getString("logger", "access");
        this.enabled = serviceConf.getBoolean("enabled");
        this.dateFormat = serviceConf.getString("dateFormat", "dd/MM/yyyy:hh:mm:ss z");
        this.formatter = new SimpleDateFormat(this.dateFormat);
        this.logLoadTime = serviceConf.getBoolean("logLoadTime", false);
       
        setInit(true);

    }
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.