Package org.exoplatform.container.xml

Examples of org.exoplatform.container.xml.InitParams


      Component component = null;
      ConfigurationManager manager;
      String componentKey;
      try
      {
         InitParams params = null;
         boolean debug = false;
         synchronized (this)
         {
            // Avoid to create duplicate instances if it is called at the same time by several threads
            if (instance_ != null)
View Full Code Here


      }
   }

   public void testBackupFilesRepositoryConfiguration() throws Exception
   {
      InitParams params = new InitParams();

      ValueParam confPath = new ValueParam();
      confPath.setDescription("JCR configuration file");
      confPath.setName("conf-path");
      confPath.setValue("jar:/conf/standalone/test-jcr-config-ijdbc-ispn.xml");
     
      params.addParam(confPath);
     
      ValueParam maxBackupFiles = new ValueParam();
      maxBackupFiles.setName("max-backup-files");
      maxBackupFiles.setValue("5");

      params.addParam(maxBackupFiles);
     
      ConfigurationManagerImpl configManager =
         (ConfigurationManagerImpl)container.getComponentInstanceOfType(ConfigurationManagerImpl.class);
      InitialContextInitializer context =
         (InitialContextInitializer)container.getComponentInstanceOfType(InitialContextInitializer.class);
View Full Code Here

      assertEquals(1, params.getAllowedFolderNodeTypes().size());
      assertTrue(params.getAllowedFolderNodeTypes().contains(InitParamsDefaults.FOLDER_NODE_TYPE));
      assertEquals(1, params.getAllowedFileNodeTypes().size());
      assertTrue(params.getAllowedFileNodeTypes().contains(InitParamsDefaults.FILE_NODE_TYPE));
     
      InitParams ip = new InitParams();
      ValueParam vp = new ValueParam();
      vp.setName(InitParamsNames.DEF_FOLDER_NODE_TYPE);
      vp.setValue(InitParamsNames.DEF_FOLDER_NODE_TYPE);
      ip.addParameter(vp);
      vp = new ValueParam();
      vp.setName(InitParamsNames.DEF_FILE_NODE_TYPE);
      vp.setValue(InitParamsNames.DEF_FILE_NODE_TYPE);
      ip.addParameter(vp);
      vp = new ValueParam();
      vp.setName(InitParamsNames.DEF_FILE_MIME_TYPE);
      vp.setValue(InitParamsNames.DEF_FILE_MIME_TYPE);
      ip.addParameter(vp);
      vp = new ValueParam();
      vp.setName(InitParamsNames.UPDATE_POLICY);
      vp.setValue(InitParamsNames.UPDATE_POLICY);
      ip.addParameter(vp);
      vp = new ValueParam();
      vp.setName(InitParamsNames.AUTO_VERSION);
      vp.setValue(InitParamsNames.AUTO_VERSION);
      ip.addParameter(vp);
      vp = new ValueParam();
      vp.setName(InitParamsNames.FILE_ICON_PATH);
      vp.setValue(InitParamsNames.FILE_ICON_PATH);
      ip.addParameter(vp);
      vp = new ValueParam();
      vp.setName(InitParamsNames.FOLDER_ICON_PATH);
      vp.setValue(InitParamsNames.FOLDER_ICON_PATH);
      ip.addParameter(vp);
      vp = new ValueParam();
      vp.setName(InitParamsNames.CACHE_CONTROL);
      vp.setValue("text/xml,text/html:max-age=1800;text/*:max-age=777;image/png,image/jpg:max-age=3600;*/*:no-cache;image/*:max-age=555");
      ip.addParameter(vp);
      ValuesParam vsp = new ValuesParam();
      vsp.setName(InitParamsNames.UNTRUSTED_USER_AGENTS);
      vsp.getValues().add(InitParamsNames.UNTRUSTED_USER_AGENTS);
      vsp.getValues().add(InitParamsNames.UNTRUSTED_USER_AGENTS + "2");
      ip.addParameter(vsp);
      vsp = new ValuesParam();
      vsp.setName(InitParamsNames.ALLOWED_FOLDER_NODE_TYPES);
      vsp.getValues().add(InitParamsNames.ALLOWED_FOLDER_NODE_TYPES);
      ip.addParameter(vsp);
      vsp = new ValuesParam();
      vsp.setName(InitParamsNames.ALLOWED_FILE_NODE_TYPES);
      vsp.getValues().add(InitParamsNames.ALLOWED_FILE_NODE_TYPES);
      ip.addParameter(vsp);
     
      assertEquals(11, ip.size());
     
      // This is required to be able to parse the MimeType
      RuntimeDelegate.setInstance(new RuntimeDelegateImpl());
     
      params = new WebDavServiceInitParams(ip);
View Full Code Here

        assertEquals("value2", up.getAttribute("key2"));

        //Try to remove user
        ObjectParameter param = new ObjectParameter();
        param.setObject(new NewUserConfig());
        InitParams params = new InitParams();
        params.addParam(param);
        NewUserEventListener newUserEventListener = new NewUserEventListener(params);
        PreventDeleteUserListener preventDeleteUserListener = new PreventDeleteUserListener();
        uHandler.addUserEventListener(newUserEventListener);
        uHandler.addUserEventListener(preventDeleteUserListener);
        try
View Full Code Here

        assertEquals("value2", up.getAttribute("key2"));

        //Try to remove user
        ObjectParameter param = new ObjectParameter();
        param.setObject(new NewUserConfig());
        InitParams params = new InitParams();
        params.addParam(param);
        NewUserEventListener newUserEventListener = new NewUserEventListener(params);
        uHandler.addUserEventListener(newUserEventListener);
        try
        {
            uHandler.removeUser(userName, true);
View Full Code Here

      Component component = null;
      ConfigurationManager manager;
      String componentKey;
      try
      {
         InitParams params = null;
         boolean debug = false;
         synchronized (this)
         {
            // Avoid to create duplicate instances if it is called at the same time by several threads
            if (instance_ != null)
View Full Code Here

      }
   }

   public void testBackupFilesRepositoryConfiguration() throws Exception
   {
      InitParams params = new InitParams();

      ValueParam confPath = new ValueParam();
      confPath.setDescription("JCR configuration file");
      confPath.setName("conf-path");
      confPath.setValue("jar:/conf/standalone/test-jcr-config-ijdbc-jbc.xml");
     
      params.addParam(confPath);
     
      ValueParam maxBackupFiles = new ValueParam();
      maxBackupFiles.setName("max-backup-files");
      maxBackupFiles.setValue("5");

      params.addParam(maxBackupFiles);
     
      ConfigurationManagerImpl configManager =
         (ConfigurationManagerImpl)container.getComponentInstanceOfType(ConfigurationManagerImpl.class);
      InitialContextInitializer context =
         (InitialContextInitializer)container.getComponentInstanceOfType(InitialContextInitializer.class);
View Full Code Here

TOP

Related Classes of org.exoplatform.container.xml.InitParams

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.