Search in sources :

Example 6 with SharedObjectCreateException

use of org.eclipse.ecf.core.sharedobject.SharedObjectCreateException in project ecf by eclipse.

the class SharedModelFactory method addSharedObject.

protected void addSharedObject(ISharedObjectManager mgr, ID id, Object data, String updaterID) throws SharedObjectCreateException {
    HashMap props = new HashMap(2);
    props.put(INITIAL_DATA_KEY, data);
    props.put(MODEL_UPDATER_KEY, updaterID);
    try {
        mgr.addSharedObject(id, new LocalAgent(), props);
    } catch (SharedObjectAddException e) {
        throw new SharedObjectCreateException(e);
    }
}
Also used : LocalAgent(org.eclipse.ecf.pubsub.model.impl.LocalAgent) SharedObjectAddException(org.eclipse.ecf.core.sharedobject.SharedObjectAddException) HashMap(java.util.HashMap) SharedObjectCreateException(org.eclipse.ecf.core.sharedobject.SharedObjectCreateException)

Aggregations

SharedObjectCreateException (org.eclipse.ecf.core.sharedobject.SharedObjectCreateException)6 IDCreateException (org.eclipse.ecf.core.identity.IDCreateException)3 IOException (java.io.IOException)2 HashMap (java.util.HashMap)2 ID (org.eclipse.ecf.core.identity.ID)2 ISharedObject (org.eclipse.ecf.core.sharedobject.ISharedObject)2 ISharedObjectManager (org.eclipse.ecf.core.sharedobject.ISharedObjectManager)2 SharedObjectDescription (org.eclipse.ecf.core.sharedobject.SharedObjectDescription)2 IChannelListener (org.eclipse.ecf.datashare.IChannelListener)2 IPublishedServiceDirectory (org.eclipse.ecf.pubsub.IPublishedServiceDirectory)2 LocalAgent (org.eclipse.ecf.pubsub.model.impl.LocalAgent)2 Constructor (java.lang.reflect.Constructor)1 Map (java.util.Map)1 IContainerListener (org.eclipse.ecf.core.IContainerListener)1 IContainerEvent (org.eclipse.ecf.core.events.IContainerEvent)1 StringID (org.eclipse.ecf.core.identity.StringID)1 SharedObjectAddException (org.eclipse.ecf.core.sharedobject.SharedObjectAddException)1 SharedObjectTypeDescription (org.eclipse.ecf.core.sharedobject.SharedObjectTypeDescription)1 ISharedObjectActivatedEvent (org.eclipse.ecf.core.sharedobject.events.ISharedObjectActivatedEvent)1 ECFException (org.eclipse.ecf.core.util.ECFException)1