Package org.exoplatform.container.configuration

Examples of org.exoplatform.container.configuration.ConfigurationManager


      }
   }

   private void registerNodeTypes(String repositoryName) throws RepositoryException
   {
      ConfigurationManager configService =
               (ConfigurationManager) parentContainer.getComponentInstanceOfType(ConfigurationManager.class);

      ExtendedNodeTypeManager ntManager = getRepository(repositoryName).getNodeTypeManager();
      //
      for (int j = 0; j < addNodeTypePlugins.size(); j++)
      {
         AddNodeTypePlugin plugin = (AddNodeTypePlugin) addNodeTypePlugins.get(j);
         List<String> autoNodeTypesFiles = plugin.getNodeTypesFiles(AddNodeTypePlugin.AUTO_CREATED);
         if (autoNodeTypesFiles != null && autoNodeTypesFiles.size() > 0)
         {
            for (String nodeTypeFilesName : autoNodeTypesFiles)
            {

               InputStream inXml;
               try
               {
                  inXml = configService.getInputStream(nodeTypeFilesName);
               }
               catch (Exception e)
               {
                  throw new RepositoryException(e);
               }
               if (log.isDebugEnabled())
                  log.debug("Trying register node types from xml-file " + nodeTypeFilesName);
               ntManager.registerNodeTypes(inXml, ExtendedNodeTypeManager.IGNORE_IF_EXISTS);
               if (log.isDebugEnabled())
                  log.debug("Node types is registered from xml-file " + nodeTypeFilesName);
            }
            List<String> defaultNodeTypesFiles = plugin.getNodeTypesFiles(repositoryName);
            if (defaultNodeTypesFiles != null && defaultNodeTypesFiles.size() > 0)
            {
               for (String nodeTypeFilesName : defaultNodeTypesFiles)
               {

                  InputStream inXml;
                  try
                  {
                     inXml = configService.getInputStream(nodeTypeFilesName);
                  }
                  catch (Exception e)
                  {
                     throw new RepositoryException(e);
                  }
View Full Code Here


      return context;
   }

   public void initContainer() throws Exception
   {
      ConfigurationManager manager = (ConfigurationManager)getComponentInstanceOfType(ConfigurationManager.class);
      ContainerUtil.addContainerLifecyclePlugin(this, manager);
      ContainerUtil.addComponentLifecyclePlugin(this, manager);
      for (ContainerLifecyclePlugin plugin : containerLifecyclePlugin_)
      {
         plugin.initContainer(this);
View Full Code Here

      }
   }

   private void registerNodeTypes(String repositoryName) throws RepositoryException
   {
      ConfigurationManager configService =
         (ConfigurationManager)parentContainer.getComponentInstanceOfType(ConfigurationManager.class);

      ExtendedNodeTypeManager ntManager = getRepository(repositoryName).getNodeTypeManager();
      //
      for (int j = 0; j < addNodeTypePlugins.size(); j++)
      {
         AddNodeTypePlugin plugin = (AddNodeTypePlugin)addNodeTypePlugins.get(j);
         List<String> autoNodeTypesFiles = plugin.getNodeTypesFiles(AddNodeTypePlugin.AUTO_CREATED);
         if (autoNodeTypesFiles != null && autoNodeTypesFiles.size() > 0)
         {
            for (String nodeTypeFilesName : autoNodeTypesFiles)
            {
               InputStream inXml;
               try
               {
                  inXml = configService.getInputStream(nodeTypeFilesName);
               }
               catch (Exception e)
               {
                  throw new RepositoryException(e);
               }

               if (log.isDebugEnabled())
               {
                  log.debug("Trying register node types from xml-file " + nodeTypeFilesName);
               }
               ntManager.registerNodeTypes(inXml, ExtendedNodeTypeManager.IGNORE_IF_EXISTS);
               if (log.isDebugEnabled())
               {
                  log.debug("Node types is registered from xml-file " + nodeTypeFilesName);
               }
            }
           
            List<String> defaultNodeTypesFiles = plugin.getNodeTypesFiles(repositoryName);
            if (defaultNodeTypesFiles != null && defaultNodeTypesFiles.size() > 0)
            {
               for (String nodeTypeFilesName : defaultNodeTypesFiles)
               {
                  InputStream inXml;
                  try
                  {
                     inXml = configService.getInputStream(nodeTypeFilesName);
                  }
                  catch (Exception e)
                  {
                     throw new RepositoryException(e);
                  }
View Full Code Here

    * {@inheritDoc}
    */
   @Override
   public void start()
   {
      ConfigurationManager cm = super.getComponentInstanceOfType(ConfigurationManager.class);
      // We check if the component has been defined in the configuration of the current container
      // The goal is to enable the GuicegContainer only if it is needed
      Component component = cm.getComponent(ModuleProvider.class);
      if (component == null)
      {
         if (LOG.isDebugEnabled())
         {
            LOG.debug("No ModuleProvider has been defined, thus the GuiceContainer will be disabled."
View Full Code Here

    * {@inheritDoc}
    */
   @Override
   public void start()
   {
      ConfigurationManager cm = super.getComponentInstanceOfType(ConfigurationManager.class);
      // We check if the component has been defined in the configuration of the current container
      // The goal is to enable the WeldContainer only if it is needed
      Component component = cm.getComponent(WeldContainerHelper.class);
      if (component == null)
      {
         if (LOG.isDebugEnabled())
         {
            LOG.debug("No WeldContainerHelper has been defined, thus the WeldContainer will be disabled."
View Full Code Here

    */
   @Override
   @SuppressWarnings({"rawtypes", "unchecked"})
   public void start()
   {
      ConfigurationManager cm = super.getComponentInstanceOfType(ConfigurationManager.class);
      // We check if the component has been defined in the configuration of the current container
      // The goal is to enable the SpringContainer only if it is needed
      Component component = cm.getComponent(ApplicationContextProvider.class);
      if (component == null)
      {
         if (LOG.isDebugEnabled())
         {
            LOG.debug("No ApplicationContextProvider has been defined, thus the SpringContainer will be disabled."
View Full Code Here

      Map<String, String> connectionProperties = new HashMap<String, String>();
      connectionProperties.put("driverClassName", "org.hsqldb.jdbcDriver");
      connectionProperties.put("username", "sa");
      connectionProperties.put("password", "");

      ConfigurationManager cm = (ConfigurationManager)container.getComponentInstanceOfType(ConfigurationManager.class);
      DBCreator dbCreator =
         new DBCreator(serverUrl, connectionProperties, "classpath:/dbcreator/test.sql", "sa", "", cm);

      DBConnectionInfo dbInfo = dbCreator.createDatabase("testdb");
      DBConnectionInfo dbInfo1 = dbCreator.getDBConnectionInfo("testdb");
View Full Code Here

      }
   }

   private void registerNodeTypes(String repositoryName) throws RepositoryException
   {
      ConfigurationManager configService =
         (ConfigurationManager)parentContainer.getComponentInstanceOfType(ConfigurationManager.class);

      ExtendedNodeTypeManager ntManager = getRepository(repositoryName).getNodeTypeManager();
      //
      for (int j = 0; j < addNodeTypePlugins.size(); j++)
      {
         AddNodeTypePlugin plugin = (AddNodeTypePlugin)addNodeTypePlugins.get(j);
         List<String> autoNodeTypesFiles = plugin.getNodeTypesFiles(AddNodeTypePlugin.AUTO_CREATED);
         if (autoNodeTypesFiles != null && autoNodeTypesFiles.size() > 0)
         {
            for (String nodeTypeFilesName : autoNodeTypesFiles)
            {

               InputStream inXml;
               try
               {
                  inXml = configService.getInputStream(nodeTypeFilesName);
               }
               catch (Exception e)
               {
                  throw new RepositoryException(e);
               }
               if (log.isDebugEnabled())
                  log.debug("Trying register node types from xml-file " + nodeTypeFilesName);
               ntManager.registerNodeTypes(inXml, ExtendedNodeTypeManager.IGNORE_IF_EXISTS);
               if (log.isDebugEnabled())
                  log.debug("Node types is registered from xml-file " + nodeTypeFilesName);
            }
            List<String> defaultNodeTypesFiles = plugin.getNodeTypesFiles(repositoryName);
            if (defaultNodeTypesFiles != null && defaultNodeTypesFiles.size() > 0)
            {
               for (String nodeTypeFilesName : defaultNodeTypesFiles)
               {

                  InputStream inXml;
                  try
                  {
                     inXml = configService.getInputStream(nodeTypeFilesName);
                  }
                  catch (Exception e)
                  {
                     throw new RepositoryException(e);
                  }
View Full Code Here

            // default config
            builderType = "org.exoplatform.web.security.codec.JCASymmetricCodecBuilder";

            String gtnConfDir = null;
            if (confDir != null) {
                ConfigurationManager confManager = (ConfigurationManager) RootContainer.getInstance().getComponentInstanceOfType(ConfigurationManager.class);
                try {
                    gtnConfDir = confManager.getResource(confDir).getPath();
                } catch (Exception ex) {
                    log.error("Failed to process the path to gateinConfDir", ex);
                }
            }
View Full Code Here

      if (creationProps == null)
      {
         return (DBCreator)context.getContainer().getComponentInstanceOfType(DBCreator.class);
      }

      ConfigurationManager cm =
         (ConfigurationManager)context.getContainer().getComponentInstanceOfType(ConfigurationManager.class);

      return new DBCreator(creationProps.getServerUrl(), creationProps.getConnProps(), creationProps.getDBScriptPath(),
         creationProps.getDBUserName(), creationProps.getDBPassword(), cm);
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.container.configuration.ConfigurationManager

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.