org.gcube.data.tm.activationrecord
Class ActivationRecord

java.lang.Object
  extended by org.gcube.data.tm.activationrecord.ActivationRecord

public class ActivationRecord
extends Object

A wrapper of GCUBEGenericResources that record client invocations of the T-Binder service.

Author:
Fabio Simeoni

Method Summary
 ActivationRecordBody getBody()
          Returns the body of the wrapped resource as a ActivationRecordBody.
 org.gcube.common.core.resources.GCUBEGenericResource getResource()
          Returns the wrapped resource
static ActivationRecord newInstance(org.gcube.common.core.resources.GCUBEGenericResource resource)
          Creates an instance around a given resource.
static ActivationRecord newInstance(String description, ActivationRecordBody body)
          Creates an instance from a name, description, and body for the resource.
 void publish()
          Publishes the record
 void publish(org.gcube.common.core.utils.handlers.GCUBEScheduledHandler<Void> scheduler)
          Schedules the publication of the record
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static ActivationRecord newInstance(org.gcube.common.core.resources.GCUBEGenericResource resource)
Creates an instance around a given resource.

Parameters:
resource - the resource
Returns:
the instance

newInstance

public static ActivationRecord newInstance(String description,
                                           ActivationRecordBody body)
Creates an instance from a name, description, and body for the resource.

Parameters:
description - the description
body - the body
Returns:
the instance

getResource

public org.gcube.common.core.resources.GCUBEGenericResource getResource()
Returns the wrapped resource

Returns:
the resource

getBody

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

Returns:
the body
Throws:
Exception - if the body cannot be parsed into a ActivationRecordBody

publish

public void publish()
             throws Exception
Publishes the record

Throws:
Exception - if the record cannot be published

publish

public void publish(org.gcube.common.core.utils.handlers.GCUBEScheduledHandler<Void> scheduler)
             throws Exception
Schedules the publication of the record

Parameters:
scheduler - a pre-configured scheduler
Throws:
Exception - if the publication cannot be scheduled


Copyright © 2013. All Rights Reserved.