Esri Geoportal Server
1.0

com.esri.gpt.catalog.publication
Class ProcessingContext

java.lang.Object
  extended by com.esri.gpt.catalog.publication.ProcessingContext

public class ProcessingContext
extends Object

Holds context properties and summary information for a resource processing request.


Constructor Summary
ProcessingContext()
          Default constructor.
ProcessingContext(RequestContext requestContext, Publisher publisher, HttpClientRequest httpClient, PublicationRecord template, boolean validateOnly)
          Constrcuts a processing context.
 
Method Summary
 HttpClientRequest getHttpClient()
          Gets an HTTP client suitable for outbound requests.
 Exception getLastException()
          Gets the last exception encountered (if applicable).
 MessageBroker getMessageBroker()
          Gets the resource bundle message broker.
 int getNumberCreated()
          Gets the number of documents created.
 int getNumberDeleted()
          Gets the number of documents deleted.
 int getNumberFailed()
          Gets the number of documents that failed.
 int getNumberReplaced()
          Gets the number of documents replaced.
 int getNumberUnchanged()
          Gets the number of documents unchanged.
 int getNumberValidated()
          Gets the number of documents validated.
 List<ProcessedRecord> getProcessedRecords()
          Gets the list of records processed during this request.
 Publisher getPublisher()
          Gets publisher associated with the processing request.
 RequestContext getRequestContext()
          Gets the underlying request context.
 PublicationRecord getTemplate()
          Gets the template associated with new documents.
 boolean getValidateOnly()
          Gets the status indicating if this is a validate only request.
 boolean getWasSingleSource()
          Gets the status indicating if processing occurred against a single source document.
 void incrementNumberCreated()
          Increments the number of documents created.
 void incrementNumberDeleted()
          Increments the number of documents deleted.
 void incrementNumberFailed()
          Increments the number of documents that failed.
 void incrementNumberReplaced()
          Increments the number of documents replaced.
 void incrementNumberUnchanged()
          Increments the number of documents unchanged.
 void incrementNumberValidated()
          Increments the number of documents validated.
 void setHttpClient(HttpClientRequest client)
          Sets an HTTP client suitable for outbound requests.
 void setLastException(Exception e)
          Sets the last exception encountered (if applicable).
 void setMessageBroker(MessageBroker messageBroker)
          Sets the resource bundle message broker.
 void setNumberCreated(int number)
          Sets the number of documents created.
 void setNumberDeteted(int number)
          Sets the number of documents deleted.
 void setNumberFailed(int number)
          Sets the number of documents that failed.
 void setNumberReplaced(int number)
          Sets the number of documents replaced.
 void setNumberUnchanged(int number)
          Sets the number of documents unchanged.
 void setNumberValidated(int number)
          Sets the number of documents validated.
 void setPublisher(Publisher publisher)
          Sets publisher associated with the processing request.
 void setRequestContext(RequestContext requestContext)
          Sets the underlying request context.
 void setTemplate(PublicationRecord template)
          Sets the template associated with new documents.
 void setValidateOnly(boolean wasValidateOnly)
          Sets ets the status indicating if this is a validate only request.
 void setWasSingleSource(boolean wasSingleSource)
          Sets the status indicating if processing occurred against a single source document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessingContext

public ProcessingContext()
Default constructor.


ProcessingContext

public ProcessingContext(RequestContext requestContext,
                         Publisher publisher,
                         HttpClientRequest httpClient,
                         PublicationRecord template,
                         boolean validateOnly)
Constrcuts a processing context.

Parameters:
requestContext - the underlying request context
publisher - the publisher associated with the processing request
httpClient - an HTTP client suitable for outbound requests
template - the template associated with new documents (can be null)
validateOnly - true if this is a validate only request
Method Detail

getHttpClient

public HttpClientRequest getHttpClient()
Gets an HTTP client suitable for outbound requests.

Returns:
the HTTP client

setHttpClient

public void setHttpClient(HttpClientRequest client)
Sets an HTTP client suitable for outbound requests.

Parameters:
client - the HTTP client

getLastException

public Exception getLastException()
Gets the last exception encountered (if applicable).

Returns:
the last exception

setLastException

public void setLastException(Exception e)
Sets the last exception encountered (if applicable).

Parameters:
e - the last exception

getMessageBroker

public MessageBroker getMessageBroker()
Gets the resource bundle message broker.

Returns:
the message broker

setMessageBroker

public void setMessageBroker(MessageBroker messageBroker)
Sets the resource bundle message broker.

Parameters:
messageBroker - the message broker

getNumberCreated

public int getNumberCreated()
Gets the number of documents created.

Returns:
the number created

setNumberCreated

public void setNumberCreated(int number)
Sets the number of documents created.

Parameters:
number - the number created

getNumberDeleted

public int getNumberDeleted()
Gets the number of documents deleted.

Returns:
the number deleted

setNumberDeteted

public void setNumberDeteted(int number)
Sets the number of documents deleted.

Parameters:
number - the number deleted

getNumberFailed

public int getNumberFailed()
Gets the number of documents that failed.

Returns:
the number that failed

setNumberFailed

public void setNumberFailed(int number)
Sets the number of documents that failed.

Parameters:
number - the number that failed

getNumberReplaced

public int getNumberReplaced()
Gets the number of documents replaced.

Returns:
the number replaced

setNumberReplaced

public void setNumberReplaced(int number)
Sets the number of documents replaced.

Parameters:
number - the number replaced

getNumberUnchanged

public int getNumberUnchanged()
Gets the number of documents unchanged.

Returns:
the number unchanged

setNumberUnchanged

public void setNumberUnchanged(int number)
Sets the number of documents unchanged.

Parameters:
number - the number unchanged

getNumberValidated

public int getNumberValidated()
Gets the number of documents validated.

Returns:
the number validated

setNumberValidated

public void setNumberValidated(int number)
Sets the number of documents validated.

Parameters:
number - the number validated

getProcessedRecords

public List<ProcessedRecord> getProcessedRecords()
Gets the list of records processed during this request.

Returns:
the list of processed records

getPublisher

public Publisher getPublisher()
Gets publisher associated with the processing request.

Returns:
the publisher

setPublisher

public void setPublisher(Publisher publisher)
Sets publisher associated with the processing request.

Parameters:
publisher - the publisher

getRequestContext

public RequestContext getRequestContext()
Gets the underlying request context.

Returns:
the request context

setRequestContext

public void setRequestContext(RequestContext requestContext)
Sets the underlying request context.

Parameters:
requestContext - the request context

getTemplate

public PublicationRecord getTemplate()
Gets the template associated with new documents.

Returns:
the new document template

setTemplate

public void setTemplate(PublicationRecord template)
Sets the template associated with new documents.

Parameters:
template - the new document template

getValidateOnly

public boolean getValidateOnly()
Gets the status indicating if this is a validate only request.

Returns:
true if this is a validate only request

setValidateOnly

public void setValidateOnly(boolean wasValidateOnly)
Sets ets the status indicating if this is a validate only request.

Parameters:
wasValidateOnly - true if this is a validate only request

getWasSingleSource

public boolean getWasSingleSource()
Gets the status indicating if processing occurred against a single source document.

Returns:
true if processing occurred against a single source document

setWasSingleSource

public void setWasSingleSource(boolean wasSingleSource)
Sets the status indicating if processing occurred against a single source document.

Parameters:
wasSingleSource - true if processing occurred against a single source document

incrementNumberCreated

public void incrementNumberCreated()
Increments the number of documents created.


incrementNumberDeleted

public void incrementNumberDeleted()
Increments the number of documents deleted.


incrementNumberFailed

public void incrementNumberFailed()
Increments the number of documents that failed.


incrementNumberReplaced

public void incrementNumberReplaced()
Increments the number of documents replaced.


incrementNumberUnchanged

public void incrementNumberUnchanged()
Increments the number of documents unchanged.


incrementNumberValidated

public void incrementNumberValidated()
Increments the number of documents validated.


Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.