com.evdb.javaapi.operations
Class BaseOperations

java.lang.Object
  extended by com.evdb.javaapi.operations.BaseOperations
Direct Known Subclasses:
DemandOperations, EventOperations, ImageOperations, LocationOperations, PerformerOperations, VenueOperations

public abstract class BaseOperations
extends java.lang.Object

The base operations class, contains methods common to all objects

Author:
tylerv

Field Summary
protected  ServerCommunication serverCommunication
          The main server communication object
 
Constructor Summary
BaseOperations()
           
 
Method Summary
protected  void addComment(java.lang.String method, java.lang.String id, Comment comment)
          Add a comment to an object
protected  void addImage(java.lang.String method, java.lang.String id, Image image)
          Add am image
protected  void addLink(java.lang.String method, java.lang.String id, Link link)
          Add a link
protected  int addProperty(java.lang.String method, java.lang.String id, Property property)
          Add a property
protected  void deleteComment(java.lang.String method, Comment comment)
          Delete a comment
protected  void deleteImage(java.lang.String method, java.lang.String id, Image image)
          Delete an image
protected  void deleteLink(java.lang.String method, Link link)
          Remove a link
protected  void deleteProperty(java.lang.String method, java.lang.String id, Property property)
          Remove a property
protected  javax.xml.bind.Unmarshaller getUnmarshaller(java.lang.Class clazz)
          Return an unmarshaller
protected  java.lang.Object listProperties(java.lang.Class clazz, java.lang.String method, java.lang.String id)
          List properties
protected  java.lang.Object listTags(java.lang.Class clazz, java.lang.String method, java.lang.String id)
          List the tags for an object
protected  void modifyComment(java.lang.String method, Comment comment)
          Modify a comment
protected  void modifyTags(java.lang.String method, java.lang.String id, java.util.List<Tag> tagList)
          Add or remove tags from an object
protected  java.lang.Object unmarshallRequest(java.lang.Class clazz, java.io.InputStream is)
          Unmarshall server response data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverCommunication

protected ServerCommunication serverCommunication
The main server communication object

Constructor Detail

BaseOperations

public BaseOperations()
Method Detail

getUnmarshaller

protected javax.xml.bind.Unmarshaller getUnmarshaller(java.lang.Class clazz)
                                               throws javax.xml.bind.JAXBException
Return an unmarshaller

Parameters:
clazz -
Returns:
Unmarshaller
Throws:
javax.xml.bind.JAXBException

listTags

protected java.lang.Object listTags(java.lang.Class clazz,
                                    java.lang.String method,
                                    java.lang.String id)
                             throws EVDBRuntimeException,
                                    EVDBAPIException
List the tags for an object

Parameters:
clazz -
method -
id -
Returns:
Object
Throws:
EVDBAPIException
EVDBRuntimeException

listProperties

protected java.lang.Object listProperties(java.lang.Class clazz,
                                          java.lang.String method,
                                          java.lang.String id)
                                   throws EVDBRuntimeException,
                                          EVDBAPIException
List properties

Parameters:
clazz -
method -
id -
Returns:
Object
Throws:
EVDBRuntimeException
EVDBAPIException

modifyTags

protected void modifyTags(java.lang.String method,
                          java.lang.String id,
                          java.util.List<Tag> tagList)
                   throws EVDBRuntimeException,
                          EVDBAPIException
Add or remove tags from an object

Parameters:
method -
id -
tagList -
Throws:
EVDBRuntimeException
EVDBAPIException

addProperty

protected int addProperty(java.lang.String method,
                          java.lang.String id,
                          Property property)
                   throws EVDBRuntimeException,
                          EVDBAPIException
Add a property

Parameters:
method -
id -
property -
Throws:
EVDBRuntimeException
EVDBAPIException

deleteProperty

protected void deleteProperty(java.lang.String method,
                              java.lang.String id,
                              Property property)
                       throws EVDBRuntimeException,
                              EVDBAPIException
Remove a property

Parameters:
method -
id -
property -
Throws:
EVDBRuntimeException
EVDBAPIException

addComment

protected void addComment(java.lang.String method,
                          java.lang.String id,
                          Comment comment)
                   throws EVDBRuntimeException,
                          EVDBAPIException
Add a comment to an object

Parameters:
method -
id -
comment -
Throws:
EVDBRuntimeException
EVDBAPIException

modifyComment

protected void modifyComment(java.lang.String method,
                             Comment comment)
                      throws EVDBRuntimeException,
                             EVDBAPIException
Modify a comment

Parameters:
method -
comment -
Throws:
EVDBRuntimeException
EVDBAPIException

deleteComment

protected void deleteComment(java.lang.String method,
                             Comment comment)
                      throws EVDBRuntimeException,
                             EVDBAPIException
Delete a comment

Parameters:
method -
comment -
Throws:
EVDBRuntimeException
EVDBAPIException

deleteImage

protected void deleteImage(java.lang.String method,
                           java.lang.String id,
                           Image image)
                    throws EVDBRuntimeException,
                           EVDBAPIException
Delete an image

Parameters:
method -
id -
image -
Throws:
EVDBRuntimeException
EVDBAPIException

addImage

protected void addImage(java.lang.String method,
                        java.lang.String id,
                        Image image)
                 throws EVDBRuntimeException,
                        EVDBAPIException
Add am image

Parameters:
method -
id -
image -
Throws:
EVDBRuntimeException
EVDBAPIException

addLink

protected void addLink(java.lang.String method,
                       java.lang.String id,
                       Link link)
                throws EVDBRuntimeException,
                       EVDBAPIException
Add a link

Parameters:
method -
id -
link -
Throws:
EVDBRuntimeException
EVDBAPIException

deleteLink

protected void deleteLink(java.lang.String method,
                          Link link)
                   throws EVDBRuntimeException,
                          EVDBAPIException
Remove a link

Parameters:
method -
link -
Throws:
EVDBRuntimeException
EVDBAPIException

unmarshallRequest

protected java.lang.Object unmarshallRequest(java.lang.Class clazz,
                                             java.io.InputStream is)
                                      throws EVDBAPIException
Unmarshall server response data

Parameters:
clazz - Class to unmarshall to
is - Input stream
Returns:
Unmarshalled object
Throws:
javax.xml.bind.JAXBException
EVDBRuntimeException
EVDBAPIException


Copyright © 2007 Eventful Inc. All Rights Reserved.