net.sourceforge.pebble
Class PluginProperties

java.lang.Object
  extended by net.sourceforge.pebble.PluginProperties

public class PluginProperties
extends java.lang.Object

Contains properties that can be used by Pebble plugins.

Author:
Simon Brown

Constructor Summary
PluginProperties(Blog blog)
          Creates a new instance with the specified owning blog.
 
Method Summary
 java.util.Properties getProperties()
           
 java.lang.String getPropertiesAsString()
          Gets properties file as a String in the format it is saved on disk.
 java.lang.String getProperty(java.lang.String name)
          Gets the named property.
 boolean hasProperty(java.lang.String name)
          Determines whether a property with the specified name exists.
 void setPropertiesAsString(java.lang.String content)
          Sets the properties and saves it to disk.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the named property.
 void store()
          Helper method to store the properties to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginProperties

public PluginProperties(Blog blog)
Creates a new instance with the specified owning blog.

Parameters:
blog - the owning Blog instance
Method Detail

getPropertiesAsString

public java.lang.String getPropertiesAsString()
Gets properties file as a String in the format it is saved on disk.

Returns:
a String

setPropertiesAsString

public void setPropertiesAsString(java.lang.String content)
Sets the properties and saves it to disk.

Parameters:
content - the properties file format as a String

hasProperty

public boolean hasProperty(java.lang.String name)
Determines whether a property with the specified name exists.

Parameters:
name - the name of th eproperty to test for
Returns:
true if the property exists, false otherwise

getProperty

public java.lang.String getProperty(java.lang.String name)
Gets the named property.

Parameters:
name - the name of the property
Returns:
the value of the property, or null if it doesn't exist

getProperties

public java.util.Properties getProperties()

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets the named property.

Parameters:
name - the name of the property
value - the value of the property

store

public void store()
Helper method to store the properties to disk.



Copyright © 2003-2006, Simon Brown. All Rights Reserved.