Class SkinPropertyService

java.lang.Object
edu.ucsb.nceas.metacat.shared.BaseService
edu.ucsb.nceas.metacat.properties.SkinPropertyService

public class SkinPropertyService extends BaseService
A suite of utility classes for the skin configuration utility
  • Method Details

    • getInstance

      public static SkinPropertyService getInstance() throws ServiceException
      Get the single instance of SkinPropertyService.
      Returns:
      the single instance of SkinPropertyService
      Throws:
      ServiceException
    • refreshable

      public boolean refreshable()
      Specified by:
      refreshable in class BaseService
    • doRefresh

      public void doRefresh() throws ServiceException
      Specified by:
      doRefresh in class BaseService
      Throws:
      ServiceException
    • stop

      public void stop() throws ServiceException
      Specified by:
      stop in class BaseService
      Throws:
      ServiceException
    • getProperty

      public static String getProperty(String skinName, String propertyName) throws edu.ucsb.nceas.utilities.PropertyNotFoundException
      Utility method to get a property value from the properties file for a specific skin.
      Parameters:
      skinName - the skin for which we want to retrieve the property
      propertyName - the name of the property requested
      Returns:
      the String value for the property
      Throws:
      edu.ucsb.nceas.utilities.PropertyNotFoundException
    • getPropertyNames

      public static Vector<String> getPropertyNames(String skinName) throws edu.ucsb.nceas.utilities.PropertyNotFoundException
      Get a set of all property names for a given skin.
      Parameters:
      skinName - the skin for which we want to retrieve the property names
      Returns:
      List of property names
      Throws:
      edu.ucsb.nceas.utilities.PropertyNotFoundException
    • getPropertyNamesByGroup

      public static Vector<String> getPropertyNamesByGroup(String skinName, String groupName) throws edu.ucsb.nceas.utilities.PropertyNotFoundException
      Get a Set of all property names that start with the groupName prefix.
      Parameters:
      groupName - the prefix of the keys to search for.
      Returns:
      Vector of property names
      Throws:
      edu.ucsb.nceas.utilities.PropertyNotFoundException
    • getProperties

      public static edu.ucsb.nceas.utilities.SortedProperties getProperties(String skinName)
      Get the main backup properties file. These are configurable properties that are stored outside the metacat install directories so the user does not need to re-enter all the configuration information every time they do an upgrade.
      Returns:
      a SortedProperties object with the backup properties
    • getBackupProperties

      public static edu.ucsb.nceas.utilities.SortedProperties getBackupProperties(String skinName)
      Get the main backup properties file. These are configurable properties that are stored outside the metacat install directories so the user does not need to re-enter all the configuration information every time they do an upgrade.
      Returns:
      a SortedProperties object with the backup properties
    • bypassConfiguration

      public static boolean bypassConfiguration()
      Reports whether the metacat configuration utility should be run. Returns false if -- dev.runConfiguration=false and -- backup properties file exists Note that dev.runConfiguration should only be set to false when reinstalling the same version of the application in developement.
      Returns:
      a boolean that is false if dev.runConfiguration is false and the backup properties file exists.