org.gcube.vremanagement.resourcemanager.impl.state.observers
Class Serializer

java.lang.Object
  extended by org.gcube.vremanagement.resourcemanager.impl.state.observers.ScopeObserver
      extended by org.gcube.vremanagement.resourcemanager.impl.state.observers.Serializer
All Implemented Interfaces:
Observer

public class Serializer
extends ScopeObserver

Serializer for ScopeState

Author:
Manuele Simi (ISTI-CNR)

Field Summary
 
Fields inherited from class org.gcube.vremanagement.resourcemanager.impl.state.observers.ScopeObserver
logger
 
Constructor Summary
Serializer()
           
 
Method Summary
protected static File getSerializationFile(org.gcube.common.core.scope.GCUBEScope scope)
           
static void load(ScopeState scopeState, org.gcube.common.core.scope.GCUBEScope scope)
          Loads the list of ScopedResource from the local file system
protected  void scopeChanged(ScopeState scopeState)
          Serializes the notified list on the file system
static void store(ScopeState scopeState)
           
 
Methods inherited from class org.gcube.vremanagement.resourcemanager.impl.state.observers.ScopeObserver
update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serializer

public Serializer()
Method Detail

scopeChanged

protected void scopeChanged(ScopeState scopeState)
Serializes the notified list on the file system

Specified by:
scopeChanged in class ScopeObserver
Parameters:
scopeState - the list to serialize

store

public static void store(ScopeState scopeState)
                  throws IOException
Throws:
IOException

load

public static void load(ScopeState scopeState,
                        org.gcube.common.core.scope.GCUBEScope scope)
                 throws IOException
Loads the list of ScopedResource from the local file system

Parameters:
the - actual scope
Throws:
IOException - if the list was not found on the file system

getSerializationFile

protected static File getSerializationFile(org.gcube.common.core.scope.GCUBEScope scope)


Copyright © 2013. All Rights Reserved.