-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into MODORDERS-1207
- Loading branch information
Showing
19 changed files
with
531 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/org/folio/models/pieces/PieceBatchCreationHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.folio.models.pieces; | ||
|
||
import java.util.List; | ||
|
||
import org.folio.rest.jaxrs.model.Piece; | ||
import org.folio.rest.jaxrs.model.PieceCollection; | ||
|
||
public class PieceBatchCreationHolder extends BasePieceFlowHolder { | ||
private List<Piece> piecesToCreate; | ||
private boolean createItem; | ||
|
||
public PieceBatchCreationHolder withCreateItem(boolean createItem) { | ||
this.createItem = createItem; | ||
return this; | ||
} | ||
|
||
public boolean isCreateItem() { | ||
return createItem; | ||
} | ||
|
||
public PieceBatchCreationHolder withPieceToCreate(List<Piece> piecesToCreate) { | ||
this.piecesToCreate = piecesToCreate; | ||
return this; | ||
} | ||
|
||
public PieceBatchCreationHolder withPieceToCreate(PieceCollection pieceCollection) { | ||
this.piecesToCreate = pieceCollection.getPieces(); | ||
return this; | ||
} | ||
|
||
public List<Piece> getPiecesToCreate() { | ||
return piecesToCreate; | ||
} | ||
|
||
@Override | ||
public String getOrderLineId() { | ||
if (piecesToCreate.isEmpty()) { | ||
return null; | ||
} | ||
return piecesToCreate.get(0).getPoLineId(); | ||
} | ||
|
||
@Override | ||
public String getTitleId() { | ||
if (piecesToCreate.isEmpty()) { | ||
return null; | ||
} | ||
return piecesToCreate.get(0).getTitleId(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.