Examples of ExportContext


Examples of org.gatein.exports.data.ExportContext

         double version = ExportData.getVersion(exportContextBytes);

         if (getPersistenceManager().supports(type, version))
         {
            String refId = getPersistenceManager().getExportReferenceId(type, version, ExportData.getInternalBytes(exportContextBytes));
            ExportContext exportContext = getPersistenceManager().getExportContext(refId);

            if (exportContext.isExportByValue())
            {
               throw new OperationFailedException("Cannot set the lifetime for an export that was exported by value.");
            }

            exportContext.setCurrentTime(currentTime);
            exportContext.setTerminationTime(terminationTime);
            exportContext.setRefreshDuration(refreshDuration);

            ExportContext updatedExportContext = getPersistenceManager().updateExportContext(refId, exportContext);
            return updatedExportContext;
         }
         else
         {
            throw new OperationFailedException("Byte array format not recognized.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.