Package org.fcrepo.server.config

Examples of org.fcrepo.server.config.ServerConfiguration


    }

    @Override
    protected void registerBeanDefinitions()
            throws ServerInitializationException{
        ServerConfiguration sc = getConfig();
        ModuleConfiguration rim = sc.getModuleConfiguration(ResourceIndex.class.getName());
        if (rim != null){
            String ds = rim.getParameter("datastore");
            if (ds != null){
                DatastoreConfiguration dsConfig = sc.getDatastoreConfiguration(ds);
                if (dsConfig != null){
                    try{
                        String name = TriplestoreConnector.class.getName();
                        GenericBeanDefinition beanDefinition = Server.getTriplestoreConnectorBeanDefinition(dsConfig);
                        beanDefinition.setAttribute("name", name);
View Full Code Here


    private static ServerConfiguration getServerConfig(File serverDir,
            String profile) throws IOException {
        ServerConfigurationParser parser =
                new ServerConfigurationParser(new FileInputStream(new File(
                        serverDir, "config/fedora.fcfg")));
        ServerConfiguration serverConfig = parser.parse();
        // set all the values according to the profile, if specified
        if (profile != null) {
            int c = setValuesForProfile(serverConfig, profile);

            c +=
                    setValuesForProfile(serverConfig.getModuleConfigurations(),
                            profile);
            c +=
                    setValuesForProfile(serverConfig
                            .getDatastoreConfigurations(), profile);
            if (c == 0) {
                throw new IOException("Unrecognized server-profile: " + profile);
            }
        }
View Full Code Here

                rootLogger.removeHandler(handlers[i]);
            }
            SLF4JBridgeHandler.install();

            File serverDir = new File(fedoraHomeDir, "server");
            ServerConfiguration serverConfig =
                    getServerConfig(serverDir, profile);
            System.err.println();
            System.err.println("                       Fedora Rebuild Utility");
            System.err
                    .println("                     ..........................");
View Full Code Here

          "org.fcrepo.server.security.xacml.pdp.decorator.PolicyIndexInvocationHandler");
    }

    try {
      FileInputStream fis = new FileInputStream(fcfgBase);
      ServerConfiguration config = new ServerConfigurationParser(fis)
          .parse();
      config.applyProperties(props);

      // If using akubra-fs, set the class of the module and clear params.
      if (usingAkubra()) {
        ModuleConfiguration mConfig = config
            .getModuleConfiguration("org.fcrepo.server.storage.lowlevel.ILowlevelStorage");
        config.getModuleConfigurations().remove(mConfig);
      }

      config.serialize(new FileOutputStream(fcfg));
    } catch (IOException e) {
      throw new InstallationFailedException(e.getMessage(), e);
    }
  }
View Full Code Here

            }
            logger.debug("Loading and validating configuration file \""
                    + m_configFile + "\"");

            // do the parsing and validation of configuration
            ServerConfiguration serverConfig = getConfig();
            List<DatastoreConfiguration> dsConfigs = serverConfig.getDatastoreConfigurations();
            List<ModuleConfiguration> moduleConfigs = serverConfig.getModuleConfigurations();

            // ensure server's module roles are met
            String[] reqRoles = getRequiredModuleRoles();
            for (String element : reqRoles) {
                if (!knownBeanDefinition(element) && serverConfig.getModuleConfiguration(element) == null) {
                    throw new ServerInitializationException(MessageFormat
                            .format(INIT_SERVER_SEVERE_UNFULFILLEDROLE,
                                    new Object[] {element}));
                }
            }
View Full Code Here

TOP

Related Classes of org.fcrepo.server.config.ServerConfiguration

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.