Package com.avoka.fc.core.entity
Class PortalResource
- java.lang.Object
-
- org.apache.cayenne.PersistentObject
-
- org.apache.cayenne.BaseDataObject
-
- org.apache.cayenne.CayenneDataObject
-
- com.avoka.core.entity.BaseEntity
-
- com.avoka.fc.core.entity.auto._PortalResource
-
- com.avoka.fc.core.entity.PortalResource
-
- All Implemented Interfaces:
IEntity
,Serializable
,org.apache.cayenne.DataObject
,org.apache.cayenne.Persistent
,org.apache.cayenne.Validating
@CacheGroups("CONFIG") public class PortalResource extends _PortalResource
Provides a portal resource, such as an image.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
RESOURCES_PATH_PREFIX
The resource path prefix - all resources need to be located in this structure-
Fields inherited from class com.avoka.fc.core.entity.auto._PortalResource
CONTENT, CONTENT_BASE, CONTENT_BASE_MD5, CONTENT_BASE_MD5_PROPERTY, CONTENT_BASE_PROPERTY, CONTENT_BASE_TIMESTAMP, CONTENT_BASE_TIMESTAMP_PROPERTY, CONTENT_MD5, CONTENT_MD5_PROPERTY, CONTENT_PROPERTY, CONTENT_TIMESTAMP, CONTENT_TIMESTAMP_PROPERTY, CREATED_AT, CREATED_AT_PROPERTY, CREATED_BY, CREATED_BY_PROPERTY, LAST_MODIFIED_AT, LAST_MODIFIED_AT_PROPERTY, LAST_MODIFIED_BY, LAST_MODIFIED_BY_PROPERTY, MERGED_BASE_MD5, MERGED_BASE_MD5_PROPERTY, PATH, PATH_PROPERTY, PORTAL, PORTAL_PROPERTY, PORTAL_RESOURCE_OID_PK_COLUMN, RESOURCE_HISTORY, RESOURCE_HISTORY_PROPERTY
-
Fields inherited from class com.avoka.core.entity.BaseEntity
ID_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description PortalResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isBaseContentMerged()
Return true if the base content has been merged.boolean
isContentChange()
Return true if there is a difference between the base content and the resource content.boolean
isTextContent()
void
markContentMerged()
Mark the base content as having been merged with resource content.void
refreshContentBaseMd5()
Refresh the base content MD5 hash values.void
rollbackContent()
Roll back portal resource content to the base content available in the web applicationvoid
setContent(byte[] content)
Set the current content, updating the content timestamp as wellvoid
setContentBase(byte[] content)
Update the base resource content defined by the SmartForm Manager web application.-
Methods inherited from class com.avoka.fc.core.entity.auto._PortalResource
addToResourceHistory, getContent, getContentBase, getContentBaseMd5, getContentBaseTimestamp, getContentMd5, getContentTimestamp, getCreatedAt, getCreatedBy, getLastModifiedAt, getLastModifiedBy, getMergedBaseMd5, getPath, getPortal, getResourceHistory, removeFromResourceHistory, setContentBaseMd5, setContentBaseTimestamp, setContentMd5, setContentTimestamp, setCreatedAt, setCreatedBy, setLastModifiedAt, setLastModifiedBy, setMergedBaseMd5, setPath, setPortal
-
Methods inherited from class com.avoka.core.entity.BaseEntity
appendProperties, getId, getValuesMap, isNew, setId, toString
-
Methods inherited from class org.apache.cayenne.CayenneDataObject
makePath, readPropertyDirectly, readState, setPersistenceState, writePropertyDirectly, writeState
-
Methods inherited from class org.apache.cayenne.BaseDataObject
addToManyTarget, beforePropertyRead, beforePropertyWrite, getSnapshotVersion, readNestedProperty, readProperty, readSerialized, removeToManyTarget, setObjectContext, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writeSerialized
-
Methods inherited from class org.apache.cayenne.PersistentObject
getMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectId
-
-
-
-
Field Detail
-
RESOURCES_PATH_PREFIX
public static final String RESOURCES_PATH_PREFIX
The resource path prefix - all resources need to be located in this structure- See Also:
- Constant Field Values
-
-
Method Detail
-
isContentChange
public boolean isContentChange()
Return true if there is a difference between the base content and the resource content.- Returns:
- true if there is a difference between the base content and the resource content
- Since:
- 3.6.0
-
setContent
public void setContent(byte[] content)
Set the current content, updating the content timestamp as well- Overrides:
setContent
in class_PortalResource
- Parameters:
content
- the new content
-
setContentBase
public void setContentBase(byte[] content)
Update the base resource content defined by the SmartForm Manager web application. This method is called internally - to update current content, usesetContent(byte[])
- Overrides:
setContentBase
in class_PortalResource
- Parameters:
content
- the new content
-
rollbackContent
public void rollbackContent()
Roll back portal resource content to the base content available in the web application
-
refreshContentBaseMd5
public void refreshContentBaseMd5()
Refresh the base content MD5 hash values.
-
isTextContent
public boolean isTextContent()
- Returns:
- true if the portal resource has text content
-
isBaseContentMerged
public boolean isBaseContentMerged()
Return true if the base content has been merged.- Returns:
- true if the base content has been merged.
- Since:
- 4.2.0
-
markContentMerged
public void markContentMerged()
Mark the base content as having been merged with resource content.- Since:
- 4.2.0
-
-