fr.paris5.shaman.insight.operation
Class UpdatePublicationStateOperation

java.lang.Object
  |
  +--fr.paris5.shaman.insight.service.Operation
        |
        +--fr.paris5.shaman.insight.operation.UpdatePublicationStateOperation
All Implemented Interfaces:
java.io.Serializable

public class UpdatePublicationStateOperation
extends Operation

Changes a Publication state.

Version:
$Id: UpdatePublicationStateOperation.java,v 1.4 2002/08/07 13:30:53 caillette Exp $
Author:
Laurent Caillette
See Also:
Serialized Form

Field Summary
private  boolean makeDefault
           
private  java.lang.String newState
           
private  Publication publication
           
private  Publication result
           
(package private) static long serialVersionUID
           
 
Fields inherited from class fr.paris5.shaman.insight.service.Operation
consumed, insightManager, insightModel
 
Constructor Summary
UpdatePublicationStateOperation(Publication publication)
          Sets publication state to Publication.SEALED_STATE.
UpdatePublicationStateOperation(Publication publication, boolean makeDefault)
          Sets publication state to Publication.SEALED_STATE.
UpdatePublicationStateOperation(Publication publication, java.lang.String newState)
          Sets publication state to an arbitrary value.
UpdatePublicationStateOperation(Publication publication, java.lang.String newState, boolean makeDefault)
           
 
Method Summary
protected  void doExecute(InsightModel insightModel)
           
 Publication getResult()
          Returns the updated Publication object.
 
Methods inherited from class fr.paris5.shaman.insight.service.Operation
execute, getInsightManager, getInsightModel, isMutator
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID

publication

private final Publication publication

newState

private final java.lang.String newState

makeDefault

private final boolean makeDefault

result

private Publication result
Constructor Detail

UpdatePublicationStateOperation

public UpdatePublicationStateOperation(Publication publication)
Sets publication state to Publication.SEALED_STATE.
Parameters:
publication -  

UpdatePublicationStateOperation

public UpdatePublicationStateOperation(Publication publication,
                                       boolean makeDefault)
Sets publication state to Publication.SEALED_STATE.
Parameters:
publication -  
makeDefault - true if publication should become it's topic's default, false otherwise.

UpdatePublicationStateOperation

public UpdatePublicationStateOperation(Publication publication,
                                       java.lang.String newState)
Sets publication state to an arbitrary value.
Parameters:
publication -  
newState - The new state.
Throws:
NullPointerException - If publication or newState is null.

UpdatePublicationStateOperation

public UpdatePublicationStateOperation(Publication publication,
                                       java.lang.String newState,
                                       boolean makeDefault)
Method Detail

doExecute

protected void doExecute(InsightModel insightModel)
                  throws InvalidIdException,
                         PublicationNotOwnedException,
                         PublicationSealedException
Overrides:
doExecute in class Operation

getResult

public Publication getResult()
Returns the updated Publication object.
Returns:
The updated Publication object.


Copyright © 2002 Laurent Caillette and l'Université René Descartes, Paris 5. All rights reserved.