lumis.socialnetworkintegration.action
Class AbstractMessageAction

Package class diagram package AbstractMessageAction
java.lang.Object
  extended by lumis.portal.processqueue.AbstractQueueTask
      extended by lumis.socialnetworkintegration.action.AbstractMessageAction
All Implemented Interfaces:
Serializable, IQueueTask
Direct Known Subclasses:
MessagePublisher, MessageRemover, MessageUpdater

public abstract class AbstractMessageAction
extends AbstractQueueTask

High level representation of what the Mesasge/Content interactions with the Asynch queues should be.

Since:
6.1.0
See Also:
Serialized Form

Nested Class Summary
protected  class AbstractMessageAction.AfterRollbackSetErrorStatus
          Class that will set the SocialNetworkMessage to SocialNetworkMessageStatus.Error after the rollback has occurred.
 
Field Summary
protected  String accountId
          Id of the account that should publish/update/remove the message
protected  String messageContent
          Content that should be published/updated/removed
protected  String messageId
          Id of the message in the current portal.
protected  Date publishDate
          Publish date/time
 
Constructor Summary
AbstractMessageAction(String messageId, String accountId, String messageContent, Date publishDate)
          Default constructor.
 
Method Summary
protected  String getLatestRemoteId(ITransaction transaction)
          Retrieves the latest remote id for a message.
protected  String getProcessId()
          Returns the process Id in which the task is being performed.
protected  void setStatus(ITransaction transaction, SocialNetworkMessageStatus status)
          Updates a process in the queue to a specific status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lumis.portal.processqueue.IQueueTask
run
 

Field Detail

messageId

protected final String messageId
Id of the message in the current portal.

Since:
6.1.0

messageContent

protected final String messageContent
Content that should be published/updated/removed

Since:
6.1.0

accountId

protected final String accountId
Id of the account that should publish/update/remove the message

Since:
6.1.0

publishDate

protected final Date publishDate
Publish date/time

Since:
6.1.0
Constructor Detail

AbstractMessageAction

public AbstractMessageAction(String messageId,
                             String accountId,
                             String messageContent,
                             Date publishDate)
Default constructor. All subclasses should override this method calling super(message).

Parameters:
messageId - id of the message to be published
accountId - id of the account that should publish/update/remove the message
messageContent - content that should be published/updated/removed
publishDate - date/time the messaga should be published/updated/removed
Method Detail

getLatestRemoteId

protected String getLatestRemoteId(ITransaction transaction)
                            throws DaoException
Retrieves the latest remote id for a message.

Parameters:
transaction - to occur the retrieval
Returns:
the latest remote id.
Throws:
DaoException
Since:
6.1.0

getProcessId

protected String getProcessId()
Returns the process Id in which the task is being performed.

Returns:
processId
Since:
6.1.0

setStatus

protected void setStatus(ITransaction transaction,
                         SocialNetworkMessageStatus status)
                  throws DaoException
Updates a process in the queue to a specific status

Parameters:
session -
Throws:
DaoException
Since:
6.1.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.