com.evdb.javaapi.operations
Class PerformerOperations

java.lang.Object
  extended by com.evdb.javaapi.operations.BaseOperations
      extended by com.evdb.javaapi.operations.PerformerOperations

public class PerformerOperations
extends BaseOperations

Performer operations

Sample code for dealing with performers:

        //Create our operation objects
        PerformerOperations po = new PerformerOperations();
        Performer p = po.get("P0-123-1234-00");

        p.setShortBio("Test API Bio");

        po.modify(p);

        p = po.get("P0-123-1234-00");


        assertEquals(p.getSpid(), "P0-123-1234-00");
        assertEquals(p.getName(), "API Test Performer");
        assertEquals(p.getShortBio(), "Test API Bio");
        

Author:
tylerv

Field Summary
 
Fields inherited from class com.evdb.javaapi.operations.BaseOperations
serverCommunication
 
Constructor Summary
PerformerOperations()
           
 
Method Summary
 void addComment(java.lang.String spid, Comment comment)
          Add a comment to a performer
 void addImage(java.lang.String spid, Image image)
          Add an image to the given performer
 void addLink(java.lang.String spid, Link link)
          Add a link to the performer
 int addProperty(java.lang.String spid, Property property)
          Add a property
 void addTags(java.lang.String spid, java.util.List<Tag> tagList)
          Add tags to a performer
 Performer create(Performer p)
          Create a new performer
 void deleteComment(Comment comment)
          Delete a comment
 void deleteImage(java.lang.String spid, Image image)
          Remove the image
 void deleteLink(java.lang.String spid, Link link)
          Remove a link from the performer
 void deleteProperty(java.lang.String spid, Property property)
          Delete a property
 void deleteTags(java.lang.String spid, java.util.List<Tag> tagList)
          Add tags to an performer
 Performer get(java.lang.String spid)
          Return a performer from an SPID
 java.util.List<Property> getProperties(java.lang.String spid)
          Return a list of properties
 java.util.List<Tag> getTags(java.lang.String spid)
          List the tags for a given SPID
 Performer modify(Performer p)
          Modify a performer
 void modifyComment(Comment comment)
          Modify a comment
 void restore(java.lang.String spid)
          Restores (i.e.
 SearchResult search(PerformerSearchRequest searchRequest)
          Performer search request
 void withdraw(java.lang.String spid, java.lang.String withdrawNote)
          Withdraws an performer
 
Methods inherited from class com.evdb.javaapi.operations.BaseOperations
addComment, addImage, addLink, addProperty, deleteComment, deleteImage, deleteProperty, getUnmarshaller, listProperties, listTags, modifyComment, modifyTags, unmarshallRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformerOperations

public PerformerOperations()
Method Detail

get

public Performer get(java.lang.String spid)
              throws EVDBRuntimeException,
                     EVDBAPIException
Return a performer from an SPID

Parameters:
spid - SPID of the performer to lookup
Returns:
the performer object
Throws:
EVDBRuntimeException
EVDBAPIException

create

public Performer create(Performer p)
                 throws EVDBRuntimeException,
                        EVDBAPIException
Create a new performer
                //create our operation objects
                PerformerOperations po = new PerformerOperations();
                Performer p = new Performer();

                p.setName("API Test");
                p.setShortBio("Just a API test");

                //now call create
                p = po.create(p);

                assert(p.getSpid().length() > 0);

                //now get the performer
                Performer p2 = po.get(p.getSpid());
                assertEquals(p2.getName(), "API Test");
                assertEquals(p2.getShortBio(), "Just a API test");
         

Parameters:
p - Performer to create
Returns:
newly created Performer
Throws:
EVDBRuntimeException
EVDBAPIException

modify

public Performer modify(Performer p)
                 throws EVDBRuntimeException,
                        EVDBAPIException
Modify a performer

Parameters:
p - Performer to modify
Returns:
modified Performer
Throws:
EVDBRuntimeException
EVDBAPIException

withdraw

public void withdraw(java.lang.String spid,
                     java.lang.String withdrawNote)
              throws EVDBRuntimeException,
                     EVDBAPIException
Withdraws an performer

Parameters:
spid - SPID of the performer to withdraw
withdrawNote - Note explaining the withdraw
Throws:
java.lang.Exception
EVDBRuntimeException
EVDBAPIException

restore

public void restore(java.lang.String spid)
             throws EVDBRuntimeException,
                    EVDBAPIException
Restores (i.e. un-withdraws) a performer

Parameters:
spid - SVID of the performer to restore
Throws:
java.lang.Exception
EVDBRuntimeException
EVDBAPIException

addTags

public void addTags(java.lang.String spid,
                    java.util.List<Tag> tagList)
             throws EVDBRuntimeException,
                    EVDBAPIException
Add tags to a performer

Parameters:
spid - SPID
tagList - The list of tags to add
Throws:
EVDBRuntimeException
EVDBAPIException

deleteTags

public void deleteTags(java.lang.String spid,
                       java.util.List<Tag> tagList)
                throws EVDBRuntimeException,
                       EVDBAPIException
Add tags to an performer

Parameters:
spid - Performer SPID
tagList - The list of tags to add
Throws:
EVDBRuntimeException
EVDBAPIException

getTags

public java.util.List<Tag> getTags(java.lang.String spid)
                            throws EVDBRuntimeException,
                                   EVDBAPIException
List the tags for a given SPID

Parameters:
spid -
Returns:
List of Tags
Throws:
EVDBRuntimeException
EVDBAPIException

addComment

public void addComment(java.lang.String spid,
                       Comment comment)
                throws EVDBRuntimeException,
                       EVDBAPIException
Add a comment to a performer

Parameters:
spid - SPID of the performer to add the comment to
comment - Comment object
Throws:
EVDBRuntimeException
EVDBAPIException

modifyComment

public void modifyComment(Comment comment)
                   throws EVDBRuntimeException,
                          EVDBAPIException
Modify a comment

Parameters:
comment - Comment to modify
Throws:
EVDBRuntimeException
EVDBAPIException

deleteComment

public void deleteComment(Comment comment)
                   throws EVDBRuntimeException,
                          EVDBAPIException
Delete a comment

Parameters:
comment - Comment to delete
Throws:
EVDBRuntimeException
EVDBAPIException

addLink

public void addLink(java.lang.String spid,
                    Link link)
             throws EVDBRuntimeException,
                    EVDBAPIException
Add a link to the performer

Parameters:
spid - SPID to add the link to
link - Link object
Throws:
EVDBRuntimeException
EVDBAPIException

deleteLink

public void deleteLink(java.lang.String spid,
                       Link link)
                throws EVDBRuntimeException,
                       EVDBAPIException
Remove a link from the performer

Overrides:
deleteLink in class BaseOperations
Parameters:
spid - SPID of the performer
link -
Throws:
EVDBRuntimeException
EVDBAPIException

addImage

public void addImage(java.lang.String spid,
                     Image image)
              throws EVDBRuntimeException,
                     EVDBAPIException
Add an image to the given performer

Parameters:
spid -
image -
Throws:
EVDBRuntimeException
EVDBAPIException

deleteImage

public void deleteImage(java.lang.String spid,
                        Image image)
                 throws EVDBRuntimeException,
                        EVDBAPIException
Remove the image

Parameters:
spid -
image -
Throws:
EVDBRuntimeException
EVDBAPIException

deleteProperty

public void deleteProperty(java.lang.String spid,
                           Property property)
                    throws EVDBRuntimeException,
                           EVDBAPIException
Delete a property

Parameters:
spid -
property -
Throws:
EVDBRuntimeException
EVDBAPIException

addProperty

public int addProperty(java.lang.String spid,
                       Property property)
                throws EVDBRuntimeException,
                       EVDBAPIException
Add a property

Parameters:
spid -
property -
Throws:
EVDBRuntimeException
EVDBAPIException

getProperties

public java.util.List<Property> getProperties(java.lang.String spid)
                                       throws EVDBRuntimeException,
                                              EVDBAPIException
Return a list of properties

Parameters:
spid -
Returns:
List of Properties
Throws:
EVDBRuntimeException
EVDBAPIException

search

public SearchResult search(PerformerSearchRequest searchRequest)
                    throws EVDBRuntimeException,
                           EVDBAPIException
Performer search request

Parameters:
searchRequest - PerformerSearchRequest object
Returns:
Search result object
Throws:
java.lang.Exception
EVDBRuntimeException
EVDBAPIException


Copyright © 2007 Eventful Inc. All Rights Reserved.