Example usage for org.springframework.batch.item ExecutionContext getString

List of usage examples for org.springframework.batch.item ExecutionContext getString

Introduction

In this page you can find the example usage for org.springframework.batch.item ExecutionContext getString.

Prototype

public String getString(String key, String defaultString) 

Source Link

Document

Typesafe Getter for the String represented by the provided key with default value to return if key is not represented.

Usage

From source file:fr.acxio.tools.agia.cmis.CmisReader.java

@Override
public void open(ExecutionContext sExecutionContext) throws ItemStreamException {
    cmisService.startSession();//from w ww  .j  a va  2  s.co  m

    lastTimestamp = sExecutionContext.getString(CONTEXT_KEY_LASTTIMESTAMP, null);

    executeQuery();
}

From source file:fr.acxio.tools.agia.alfresco.AlfrescoNodeReader.java

@Override
public void open(ExecutionContext sExecutionContext) throws ItemStreamException {

    String aFullPath = null;/* ww w .j  a  v a 2  s . c o m*/

    try {
        baseURI = new URI(getAlfrescoService().getWebappAddress()).resolve(WEBDAV_PATH);
        aFullPath = getWebDavDirectoryURI(baseURI.getPath() + path).getPath();
    } catch (URISyntaxException e) {
        throw new ItemStreamException(e);
    }

    currentDirPath = sExecutionContext.getString(CONTEXT_KEY_CURRENTPATH, aFullPath);
    Object aCurrentIndexes = sExecutionContext.get(CONTEXT_KEY_CURRENTINDEXES);
    if (aCurrentIndexes == null) {
        currentIndexes = new ArrayDeque<Integer>();
        currentIndexes.addFirst(0);
    } else {
        Integer[] aArray = (Integer[]) aCurrentIndexes;
        currentIndexes = new ArrayDeque<Integer>(Arrays.asList(aArray));
    }

    sardine = getAlfrescoService().startWebDavSession();
}