Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.flexdbserver.services.checkincheckout
Class PromoteService  view PromoteService download PromoteService.java

java.lang.Object
  extended bycom.flexstor.flexdbserver.services.checkincheckout.PromoteService
All Implemented Interfaces:
com.flexstor.flexdbserver.services.Service, com.flexstor.common.threadmgr.ThreadCallbackI

public class PromoteService
extends java.lang.Object
implements com.flexstor.flexdbserver.services.Service, com.flexstor.common.threadmgr.ThreadCallbackI

PromoteService

Makes an older version of an asset be the most current. The current asset becomes a version asset. This service calls the CheckInService to demote the current version; therefore all properties set for the CheckInService must be set for the PromoteService.

Input Data Object

com.flexstor.common.data.ActionData

Output Data Object

com.flexstor.common.data.ActionResult

Programmable Properties (passed inside data object)
Specific Properties (apply to each individual asset)

See CheckInService specifications.


Field Summary
private  com.flexstor.common.data.ActionData data
           
private  int id
           
static java.lang.String IDENTIFIER
           
private  int nManagerRunning
           
private  com.flexstor.common.data.ActionResult result
           
private  java.lang.String sThisService
           
private  java.util.Vector vBadRecords
           
private  java.util.Vector vGoodRecords
           
 
Constructor Summary
PromoteService()
           
 
Method Summary
private  java.util.Hashtable createSubSets()
          create a Hashtable containing a list of objects to be sent to the service manager.
 com.flexstor.common.data.ActionResult go()
          The start of the Promote Service.
 void initData(com.flexstor.common.data.ActionData actionData)
          A data initialization method called at the beginning of the service.
private  void notify(com.flexstor.common.data.ActionResult result)
          update the ImportData after the set of services are executed for a ImportData sub set.
 void setServiceContext(com.flexstor.flexdbserver.services.ServiceContext context)
          Calls before the service is initialized (before initData is called) to pass information about the environment in which the service is running.
 void threadTaskEnd(com.flexstor.common.threadmgr.ThreadConsumerI consumer, java.lang.Object obj)
          Called when a thread task has just finished.
 void threadTaskStart(com.flexstor.common.threadmgr.ThreadConsumerI consumer, java.lang.Object obj)
          Called when a thread task is about to begin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER
See Also:
Constant Field Values

id

private int id

data

private com.flexstor.common.data.ActionData data

result

private com.flexstor.common.data.ActionResult result

vBadRecords

private java.util.Vector vBadRecords

vGoodRecords

private java.util.Vector vGoodRecords

nManagerRunning

private int nManagerRunning

sThisService

private java.lang.String sThisService
Constructor Detail

PromoteService

public PromoteService()
Method Detail

setServiceContext

public void setServiceContext(com.flexstor.flexdbserver.services.ServiceContext context)
Calls before the service is initialized (before initData is called) to pass information about the environment in which the service is running. This environment consists of information about the properties set for the service in one of these files (services.config, roletype_services.config, or *.ctl), plus methods to access other information such as an instance of the service broker to invoke other services, the transaction id for the service, file separator character and local path for the installation directory and configuration directory.

Specified by:
setServiceContext in interface com.flexstor.flexdbserver.services.Service

initData

public void initData(com.flexstor.common.data.ActionData actionData)
A data initialization method called at the beginning of the service.

Specified by:
initData in interface com.flexstor.flexdbserver.services.Service

go

public com.flexstor.common.data.ActionResult go()
The start of the Promote Service.

Specified by:
go in interface com.flexstor.flexdbserver.services.Service

createSubSets

private java.util.Hashtable createSubSets()
create a Hashtable containing a list of objects to be sent to the service manager. key = server name; value = ServiceManagerData


notify

private void notify(com.flexstor.common.data.ActionResult result)
update the ImportData after the set of services are executed for a ImportData sub set.


threadTaskStart

public void threadTaskStart(com.flexstor.common.threadmgr.ThreadConsumerI consumer,
                            java.lang.Object obj)
Called when a thread task is about to begin.

Specified by:
threadTaskStart in interface com.flexstor.common.threadmgr.ThreadCallbackI

threadTaskEnd

public void threadTaskEnd(com.flexstor.common.threadmgr.ThreadConsumerI consumer,
                          java.lang.Object obj)
Called when a thread task has just finished.

Specified by:
threadTaskEnd in interface com.flexstor.common.threadmgr.ThreadCallbackI