public abstract class GraphicElementPreview extends Object implements Serializable, ResourceHolder
Modifier and Type | Field and Description |
---|---|
protected Properties |
description |
protected String |
id |
protected Long |
panelId |
protected Properties |
resources |
protected Map |
resourcesDeployed |
protected Long |
sectionId |
protected int |
status |
static int |
STATUS_DESCRIPTOR_CORRUPT |
static int |
STATUS_MISSING_DESCRIPTOR |
static int |
STATUS_OK |
static int |
STATUS_ZIP_CORRUPT |
protected String |
workspaceId |
protected byte[] |
zipData |
Constructor and Description |
---|
GraphicElementPreview(File f,
String workspaceId,
Long sectionId,
Long panelId,
String id) |
Modifier and Type | Method and Description |
---|---|
void |
checkDeployment()
Checks resource deployment status, and deploys if needed
|
Map |
getDescription() |
protected abstract String |
getDescriptorFilename() |
String |
getId() |
Long |
getPanelId() |
Resource |
getResource(ResourceName resName,
String lang)
Retrieve resource by resource identifier.
|
Set |
getResources()
Get the resource names inside this preview.
|
Long |
getSectionId() |
int |
getStatus() |
String |
getWorkspaceId() |
int |
getZipSize() |
protected void |
initDataStructures(File f) |
protected abstract GraphicElement |
makeNewElement() |
protected void |
setDescription(String value,
String lang) |
protected byte[] |
toByteArray(InputStream is) |
GraphicElement |
toElement()
Convert this preview into a skin.
|
String |
toString() |
public static final int STATUS_OK
public static final int STATUS_ZIP_CORRUPT
public static final int STATUS_MISSING_DESCRIPTOR
public static final int STATUS_DESCRIPTOR_CORRUPT
protected byte[] zipData
protected String workspaceId
protected Long sectionId
protected Long panelId
protected String id
protected int status
protected Properties description
protected Properties resources
protected Map resourcesDeployed
protected abstract String getDescriptorFilename()
protected abstract GraphicElement makeNewElement()
protected void initDataStructures(File f) throws IOException
IOException
protected byte[] toByteArray(InputStream is) throws IOException
IOException
public Resource getResource(ResourceName resName, String lang) throws Exception
getResource
in interface ResourceHolder
resName
- Resource whose name is to be retrieved.lang
- Language for the resource.Exception
public Set getResources()
getResources
in interface ResourceHolder
public void checkDeployment()
checkDeployment
in interface ResourceHolder
public int getStatus()
public int getZipSize()
public String getWorkspaceId()
public Long getSectionId()
public Long getPanelId()
public String getId()
public Map getDescription()
public GraphicElement toElement()
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.