Package org.gatein.exports

Examples of org.gatein.exports.OperationFailedException


            String refId = exportPersistenceManager.getExportReferenceId(type, version, ExportData.getInternalBytes(bytes));
            return exportPersistenceManager.getExportContext(refId);
         }
         else
         {
            throw new OperationFailedException("Byte array format not compatible");
         }
      }
      catch (UnsupportedEncodingException e)
      {
         throw new OperationFailedException("Could not decode the byte array.");
      }
      catch (IOException e)
      {
         throw new OperationFailedException("Could not decode the byte array.");
      }
   }
View Full Code Here


            byte[] internalBytes = ExportData.getInternalBytes(bytes);
            return ExportPortletData.create(internalBytes);
         }
         else
         {
            throw new OperationFailedException("Bytes array format not compatible");
         }
      }
      catch (UnsupportedEncodingException e)
      {
         throw new OperationFailedException("Could not decode the byte array.");
      }
      catch (IOException e)
      {
         throw new OperationFailedException("Could not decode the byte array.");
      }
   }
View Full Code Here

            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.");
         }
      }
      catch (IOException e)
      {
         throw new OperationFailedException("Could not decode the byte array.");
      }
   }
View Full Code Here

TOP

Related Classes of org.gatein.exports.OperationFailedException

Copyright © 2018 www.massapicom. 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.