Class ItemDescriptionLogic
java.lang.Object
com.echothree.util.server.control.BaseLogic
com.echothree.model.control.item.server.logic.ItemDescriptionLogic
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteItemDescription
(ItemDescription itemDescription, BasePK deletedBy) void
deleteItemImageDescriptionChildren
(ItemDescription itemDescription, BasePK deletedBy) void
deleteItemImageDescriptionChildren
(ItemDescriptionType itemDescriptionType, Item item, Language language, BasePK deletedBy) getBestParent
(ItemControl itemControl, ItemDescriptionType itemDescriptionType, Item item, Language language) getBestParent
(ItemDescriptionType itemDescriptionType, Item item, Party party) getBestParentImage
(ItemControl itemControl, ItemDescriptionType itemDescriptionType, Item item, Language language) getBestParentUsingNames
(ExecutionErrorAccumulator eea, String itemDescriptionTypeName, Item item, Party party) getBestStringUsingNames
(ExecutionErrorAccumulator eea, String itemDescriptionTypeName, Item item, Party party) getImageDimensions
(String mimeTypeName, ByteArray blobDescription) getImageReader
(MimeType mimeType, ItemBlobDescription itemBlobDescription) static ItemDescriptionLogic
getScaledInstance
(BufferedImage img, int targetWidth, int targetHeight, Object hint, boolean higherQuality) Convenience method that returns a scaled instance of the providedBufferedImage
.boolean
isImage
(ItemDescriptionType itemDescriptionType) double
scaleToFit
(double w1, double h1, double w2, double h2) searchForItemDescription
(ItemDescriptionType itemDescriptionType, Item item, Language language, BasePK createdBy) void
updateItemImageDescriptionTypeFromValue
(ItemImageDescriptionTypeValue itemImageDescriptionTypeValue, BasePK updatedBy) void
updateItemImageTypeFromValue
(ItemImageTypeDetailValue itemImageTypeDetailValue, BasePK updatedBy) Methods inherited from class com.echothree.util.server.control.BaseLogic
addExecutionError, addSecurityMessage, getEntityInstanceByBaseEntity, getEntityInstanceByBasePK, getSession, handleExecutionError, handleSecurityMessage, hasExecutionErrors
-
Method Details
-
getInstance
-
getIndexDefaultItemDescriptionTypeName
-
isImage
-
getBestParent
public ItemDescription getBestParent(ItemControl itemControl, ItemDescriptionType itemDescriptionType, Item item, Language language) -
getBestParent
public ItemDescription getBestParent(ItemDescriptionType itemDescriptionType, Item item, Party party) -
getBestParentUsingNames
public ItemDescription getBestParentUsingNames(ExecutionErrorAccumulator eea, String itemDescriptionTypeName, Item item, Party party) -
getBestStringUsingNames
public String getBestStringUsingNames(ExecutionErrorAccumulator eea, String itemDescriptionTypeName, Item item, Party party) -
getBestParentImage
public ItemDescription getBestParentImage(ItemControl itemControl, ItemDescriptionType itemDescriptionType, Item item, Language language) -
getImageReader
-
getScaledInstance
public BufferedImage getScaledInstance(BufferedImage img, int targetWidth, int targetHeight, Object hint, boolean higherQuality) Convenience method that returns a scaled instance of the providedBufferedImage
.- Parameters:
img
- the original image to be scaledtargetWidth
- the desired width of the scaled instance, in pixelstargetHeight
- the desired height of the scaled instance, in pixelshint
- one of the rendering hints that corresponds toRenderingHints.KEY_INTERPOLATION
(e.g.RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR
,RenderingHints.VALUE_INTERPOLATION_BILINEAR
,RenderingHints.VALUE_INTERPOLATION_BICUBIC
)higherQuality
- if true, this method will use a multi-step scaling technique that provides higher quality than the usual one-step technique (only useful in downscaling cases, wheretargetWidth
ortargetHeight
is smaller than the original dimensions, and generally only when theBILINEAR
hint is specified)- Returns:
- a scaled version of the original
BufferedImage
-
scaleToFit
-
searchForItemDescription
public ItemDescription searchForItemDescription(ItemDescriptionType itemDescriptionType, Item item, Language language, BasePK createdBy) -
getImageDimensions
public ItemDescriptionLogic.ImageDimensions getImageDimensions(String mimeTypeName, ByteArray blobDescription) -
deleteItemImageDescriptionChildren
public void deleteItemImageDescriptionChildren(ItemDescriptionType itemDescriptionType, Item item, Language language, BasePK deletedBy) -
deleteItemImageDescriptionChildren
-
deleteItemDescription
-
updateItemImageDescriptionTypeFromValue
public void updateItemImageDescriptionTypeFromValue(ItemImageDescriptionTypeValue itemImageDescriptionTypeValue, BasePK updatedBy) -
updateItemImageTypeFromValue
public void updateItemImageTypeFromValue(ItemImageTypeDetailValue itemImageTypeDetailValue, BasePK updatedBy)
-