org.nuxeo.core.resources.model.impl
Class PropertyManager

java.lang.Object
  extended by org.nuxeo.core.resources.model.impl.PropertyManager
All Implemented Interfaces:
IPropertyManager, ISiteService

public class PropertyManager
extends java.lang.Object
implements IPropertyManager

Temporary property manager implementation
Must be replaced with a db4o implementation
This is storing resources properties in a big property file
Only string values are supported by this implementation

Author:
Bogdan Stefanescu

Constructor Summary
PropertyManager()
           
 
Method Summary
 void copy(ISiteResource source, ISiteResource destination)
          Copy the properties of the source resource to the destination resource
 java.lang.Object getProperty(ISiteResource resource, java.lang.String property)
          Get the property having the given nbame and bound to the given resource
 void remove(ISiteResource resource)
          Remove all properties defined for the given resource
 void setProperty(ISiteResource resource, java.lang.String property, java.lang.Object value)
          Get the property having the given nbame and bound to the given resource
 void shutdown(org.eclipse.core.runtime.IProgressMonitor monitor)
          Shutdown the service.
 void startup(org.eclipse.core.runtime.IProgressMonitor monitor)
          Start the service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyManager

public PropertyManager()
Method Detail

getProperty

public java.lang.Object getProperty(ISiteResource resource,
                                    java.lang.String property)
Description copied from interface: IPropertyManager
Get the property having the given nbame and bound to the given resource

Specified by:
getProperty in interface IPropertyManager
Parameters:
resource - the resource
property - the property name
Returns:
the property value or null if none

setProperty

public void setProperty(ISiteResource resource,
                        java.lang.String property,
                        java.lang.Object value)
Description copied from interface: IPropertyManager
Get the property having the given nbame and bound to the given resource

Specified by:
setProperty in interface IPropertyManager

remove

public void remove(ISiteResource resource)
Description copied from interface: IPropertyManager
Remove all properties defined for the given resource

Specified by:
remove in interface IPropertyManager
Parameters:
resource - the resource to remove properties for

copy

public void copy(ISiteResource source,
                 ISiteResource destination)
Description copied from interface: IPropertyManager
Copy the properties of the source resource to the destination resource

Specified by:
copy in interface IPropertyManager

shutdown

public void shutdown(org.eclipse.core.runtime.IProgressMonitor monitor)
              throws org.eclipse.core.runtime.CoreException
Description copied from interface: ISiteService
Shutdown the service. All system resources used by the service must be freed

Specified by:
shutdown in interface ISiteService
Parameters:
monitor - the progress monitor if monitoring is required or null otherwise
Throws:
org.eclipse.core.runtime.CoreException - if an exception occured

startup

public void startup(org.eclipse.core.runtime.IProgressMonitor monitor)
             throws org.eclipse.core.runtime.CoreException
Description copied from interface: ISiteService
Start the service.

Specified by:
startup in interface ISiteService
Parameters:
monitor - the progress monitor if monitoring is required or null otherwise
Throws:
org.eclipse.core.runtime.CoreException - if an exception occured