Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.95 KB | None | 0 0
  1.     private boolean isItemProcessing = false;
  2.     public void scanConsolidationShelf(String shelfLabel, boolean isStrictAdvisingMode) {
  3.         if (isItemProcessing) {
  4.             return;
  5.         }
  6.         try {
  7.             if (consolidationShelfName.isPresent() && !consolidationShelfName.equals(fromNullable(shelfLabel))) {
  8.                 if (isStrictAdvisingMode) {
  9.                     throw new LMException(CONSOLIDATION_WRONG_SHELF, shelfLabel, consolidationShelfName.get());
  10.                 }
  11.             }
  12.             this.consolidationShelfName = fromNullable(shelfLabel);
  13.             isItemProcessing = true;
  14.             consolidationFacade.putItemInConsolidationShelf(shelfLabel, itemLabel.get());
  15.         } catch (EJBTransactionRolledbackException e) {
  16.             throw new LMException(e, CONSOLIDATION_WRONG_SHELF, shelfLabel, getAssignedConsolidationShelf());
  17.         } finally {
  18.             isItemProcessing = false;
  19.         }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement