org.eclipse.emf.emfstore.internal.client.properties
Class PropertyManager

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.properties.PropertyManager

public final class PropertyManager
extends Object

This class is responsible for the modification of EMFStore based properties.
There are two kinds of properties, local and shared ones.

Shared and local properties both have their own namespace meaning that a shared property named "foo" has nothing in common with a local property called "foo".

Author:
haunolder, emueller

Constructor Summary
PropertyManager(ProjectSpace projectSpace)
          PropertyManager constructor.
 
Method Summary
 EMFStoreProperty getLocalProperty(String propertyName)
          Retrieves a local property.
 String getLocalStringProperty(String propertyName)
          Retrieves a local string property.
 EMFStoreProperty getSharedProperty(String propertyName)
          Retrieves the shared property with the given name.
 String getSharedStringProperty(String propertyName)
          Retrieves a shared string property.
 void setLocalProperty(String propertyName, org.eclipse.emf.ecore.EObject value)
          Set a local property.
 void setLocalStringProperty(String propertyName, String value)
          Sets a local string property.
 void setSharedProperty(String propertyName, org.eclipse.emf.ecore.EObject value)
          Set a shared property.
 void setSharedStringProperty(String propertyName, String string)
          Set a shared string property.
 void setSharedVersionedProperty(String propertyName, org.eclipse.emf.ecore.EObject value)
          Sets the property with the given name to the given value.
 void setSharedVersionedStringProperty(String propertyName, String string)
          Set a versioned shared string property.
 void synchronizeSharedProperties()
          Transmit changed shared properties to the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyManager

public PropertyManager(ProjectSpace projectSpace)
PropertyManager constructor.

Parameters:
projectSpace - the project space that should get managed by the property manager
Method Detail

setLocalProperty

public void setLocalProperty(String propertyName,
                             org.eclipse.emf.ecore.EObject value)
Set a local property. If the property already exists it will be updated.

Parameters:
propertyName - the name of the local property
value - the actual value of the property

setLocalStringProperty

public void setLocalStringProperty(String propertyName,
                                   String value)
Sets a local string property. If the property already exists it will be updated.

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

getLocalProperty

public EMFStoreProperty getLocalProperty(String propertyName)
Retrieves a local property.

Parameters:
propertyName - the name of the local property
Returns:
the local property

getLocalStringProperty

public String getLocalStringProperty(String propertyName)
Retrieves a local string property.

Parameters:
propertyName - the name of a local string property
Returns:
the string value if it exists, otherwise null

setSharedVersionedProperty

public void setSharedVersionedProperty(String propertyName,
                                       org.eclipse.emf.ecore.EObject value)
Sets the property with the given name to the given value.

Parameters:
propertyName - the name of the property to be set
value - the actual value of the property

setSharedStringProperty

public void setSharedStringProperty(String propertyName,
                                    String string)
Set a shared string property.

Parameters:
propertyName - the name of the shared property
string - the string value that should be set

setSharedVersionedStringProperty

public void setSharedVersionedStringProperty(String propertyName,
                                             String string)
Set a versioned shared string property.

Parameters:
propertyName - the name of the shared property
string - the string value that should be set

setSharedProperty

public void setSharedProperty(String propertyName,
                              org.eclipse.emf.ecore.EObject value)
Set a shared property.

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

getSharedProperty

public EMFStoreProperty getSharedProperty(String propertyName)
Retrieves the shared property with the given name.

Parameters:
propertyName - the name of the shared property
Returns:
value the actual value of the shared property

getSharedStringProperty

public String getSharedStringProperty(String propertyName)
Retrieves a shared string property.

Parameters:
propertyName - of the shared property as String
Returns:
the string value if it exists, otherwise null

synchronizeSharedProperties

public void synchronizeSharedProperties()
                                 throws AccessControlException,
                                        ESException,
                                        EMFStorePropertiesOutdatedException
Transmit changed shared properties to the server. Clears the changedSharedProperties List and fills shareProperties with the actual properties from the server.

Throws:
AccessControlException - if the caller has no write access to the project space
ESException - if the project space being manipulated is not yet shared or an error occurs within EMFStore
EMFStorePropertiesOutdatedException - if any changed property is outdated


Copyright © 2015. All Rights Reserved.