All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xins.server.RuntimeProperties Maven / Gradle / Ivy

The newest version!
/*
 * $Id: RuntimeProperties.java,v 1.20 2012/02/28 18:10:54 agoubard Exp $
 *
 * See the COPYRIGHT file for redistribution and use restrictions.
 */
package org.xins.server;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.xins.common.collections.InvalidPropertyValueException;
import org.xins.common.collections.MissingRequiredPropertyException;
import org.xins.common.service.Descriptor;

/**
 * Base class to get the runtime properties.
 *
 * @version $Revision: 1.20 $ $Date: 2012/02/28 18:10:54 $
 * @author Anthony Goubard
 * @author Tauseef Rehman
 *
 * @since XINS 1.2.0
 */
public class RuntimeProperties {

   /**
    * The stored runtime settings. This variable is initially
    * null and then initialized by
    * {@link #init(Map)}.
    */
   private Map _runtimeSettings;

   /**
    * Initialize the runtime properties. This method should be overwritten
    * by a generated class if any runtime properties is declared in the
    * impl.xml file.
    *
    * @param runtimeSettings
    *    the runtime properties, not null.
    *
    * @throws MissingRequiredPropertyException
    *    if a required property is not given.
    *
    * @throws InvalidPropertyValueException
    *    if the value of a certain property is invalid.
    */
   protected void init(Map runtimeSettings)
   throws MissingRequiredPropertyException, InvalidPropertyValueException {
      _runtimeSettings = runtimeSettings;
   }

   /**
    * Gets the descriptor list. The list is created by getting all the
    * properties which are marked as _descriptor in the run time
    * properties file.
    *
    * 

Since XINS 3.0, the returned collection is type-safe. * * @return * the list of all descriptors, may not be null. * * @since XINS 1.3.0 */ protected List descriptors() { return new ArrayList(); } /** * Gets all the runtime properties. * * @return * the runtime properties, can be null before the initialization. * * @since XINS 2.1 */ public Map properties() { return _runtimeSettings; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy