Class AbstractZipPictureManifest<T extends PictureDef>
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.pictures.zip.AbstractZipPictureManifest<T>
-
- All Implemented Interfaces:
IPictureManifest
,IZipPictureManifest
- Direct Known Subclasses:
AbsZipPictureManifest
,GraphicalSchemeZipPictureManifest
,LayoutZipPictureManifest
,MdZipPictureManifest
,PlatformZipPictureManifest
public abstract class AbstractZipPictureManifest<T extends PictureDef> extends Object implements IZipPictureManifest
Abstract implementation ofIPictureManifest
for zip based pictures
-
-
Field Summary
-
Fields inherited from interface com._1c.g5.v8.dt.platform.pictures.IPictureManifest
UNRESOLVED_PICTURE_MANIFEST
-
-
Constructor Summary
Constructors Constructor Description AbstractZipPictureManifest(T picture)
Create instance ofAbstractZipPictureManifest
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeId
getCompositeId()
The pictureCompositeId
PictureDirectionVariant
getDirection(IPictureManifestQuery query)
The picturePictureDirectionVariant
Optional<InputStream>
getInputStream(IPictureManifestQuery query)
The pictureInputStream
protected T
getPicture()
Source zip based picture instanceIZipPictureContent
getZipPictureContent()
Get cachedIZipPictureContent
of current zip based pictureboolean
isTemplate(IPictureManifestQuery query)
Is picture is templateprotected void
setZipPictureContent(IZipPictureContent content)
SetsIZipPictureContent
for this manifest-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.platform.pictures.zip.IZipPictureManifest
readPictureContent
-
-
-
-
Constructor Detail
-
AbstractZipPictureManifest
public AbstractZipPictureManifest(T picture)
Create instance ofAbstractZipPictureManifest
- Parameters:
picture
- the source picture, cannot benull
-
-
Method Detail
-
getCompositeId
public CompositeId getCompositeId()
Description copied from interface:IPictureManifest
The pictureCompositeId
- Specified by:
getCompositeId
in interfaceIPictureManifest
- Returns:
- the
CompositeId
ornull
if picture without id.
-
isTemplate
public boolean isTemplate(IPictureManifestQuery query) throws IOException
Description copied from interface:IPictureManifest
Is picture is template- Specified by:
isTemplate
in interfaceIPictureManifest
- Parameters:
query
- theIPictureManifestQuery
, cannot benull
- Returns:
true
if picture by given query is template,false
in otherwise- Throws:
IOException
- if there is a problem to read the picture content
-
getDirection
public PictureDirectionVariant getDirection(IPictureManifestQuery query) throws IOException
Description copied from interface:IPictureManifest
The picturePictureDirectionVariant
- Specified by:
getDirection
in interfaceIPictureManifest
- Parameters:
query
- theIPictureManifestQuery
, cannot benull
- Returns:
- first suitable
PictureDirectionVariant
by the following algorithm:Picture variant selection in LTR-interface (in order of priority):
- Left to right
- Left to right, can flip
- Right to left, can flip
- Any
- Right to left
Picture variant selection in RTL-interface (in order of priority):
- Right to left
- Right to left, can flip
- Left to right, can flip
- Any
- Left to right
- Throws:
IOException
- if there is a problem to read the picture content
-
getInputStream
public Optional<InputStream> getInputStream(IPictureManifestQuery query) throws IOException
Description copied from interface:IPictureManifest
The pictureInputStream
The picture may be cropped if it contains enough information for this purpose.
- Specified by:
getInputStream
in interfaceIPictureManifest
- Parameters:
query
- theIPictureManifestQuery
, cannot benull
- Returns:
- the
InputStream
of picture by given query, nevernull
- Throws:
IOException
- if there is a problem to read the picture content
-
getZipPictureContent
public IZipPictureContent getZipPictureContent() throws IOException
Description copied from interface:IZipPictureManifest
Get cachedIZipPictureContent
of current zip based picture- Specified by:
getZipPictureContent
in interfaceIZipPictureManifest
- Returns:
- the
IZipPictureContent
of current zip based picture, nevernull
- Throws:
IOException
- if there is a problem to read the picture content
-
getPicture
protected T getPicture()
Source zip based picture instance- Returns:
- the picture instance, never
null
-
setZipPictureContent
protected void setZipPictureContent(IZipPictureContent content)
SetsIZipPictureContent
for this manifest- Parameters:
content
- actualIZipPictureContent
, cannot benull
-
-