org.gcube.contentmanagement.viewmanager.activationrecord
Class ActivationRecord

java.lang.Object
  extended by org.gcube.contentmanagement.viewmanager.activationrecord.ActivationRecord

public class ActivationRecord
extends java.lang.Object


Method Summary
 ActivationRecordBody getBody()
          Returns the body of the wrapped resource as a ActivationRecordBody.
 GCUBEGenericResource getResource()
          Returns the wrapped resource.
static ActivationRecord newInstance(GCUBEGenericResource resource)
          Creates a new instance around a given resource.
static ActivationRecord newInstance(java.lang.String name, java.lang.String description, ActivationRecordBody body)
          Creates an instance that wraps a resource with a given name, description, and body.
 void publish()
          Publishes the record.
 void publish( scheduler)
          Schedules the publication of the record.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static ActivationRecord newInstance(GCUBEGenericResource resource)
Creates a new instance around a given resource.

Parameters:
resource - the resource.
Returns:
the instance.

newInstance

public static ActivationRecord newInstance(java.lang.String name,
                                           java.lang.String description,
                                           ActivationRecordBody body)
                                    throws java.lang.Exception
Creates an instance that wraps a resource with a given name, description, and body.

Parameters:
name - the name.
description - the description.
body - the body.
Returns:
the instance.
Throws:
java.lang.Exception - if the instance could not be returned.

getResource

public GCUBEGenericResource getResource()
Returns the wrapped resource.

Returns:
the resource.

getBody

public ActivationRecordBody getBody()
                             throws java.lang.Exception
Returns the body of the wrapped resource as a ActivationRecordBody.

Returns:
the body.
Throws:
java.lang.Exception - if the body could not be parsed into a ActivationRecordBody.

publish

public void publish()
             throws java.lang.Exception
Publishes the record.

Throws:
java.lang.Exception - if the record could not be published.

publish

public void publish( scheduler)
             throws java.lang.Exception
Schedules the publication of the record.

Parameters:
scheduler - a pre-configured scheduler.
Throws:
java.lang.Exception - if the publication could not be scheduled.