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
Provides a portal resource, such as an image.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The resource path prefix - all resources need to be located in this structureFields 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
Fields inherited from class org.apache.cayenne.CayenneDataObject
values
Fields inherited from class org.apache.cayenne.BaseDataObject
snapshotVersion
Fields inherited from class org.apache.cayenne.PersistentObject
objectContext, objectId, persistenceState
Fields inherited from interface org.apache.cayenne.DataObject
DEFAULT_VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return true if the base content has been merged.boolean
Return true if there is a difference between the base content and the resource content.boolean
void
Mark the base content as having been merged with resource content.void
Refresh the base content MD5 hash values.void
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.cayenne.Persistent
getObjectContext, getObjectId, getPersistenceState, setObjectContext, setObjectId, setPersistenceState
-
Field Details
-
RESOURCES_PATH_PREFIX
The resource path prefix - all resources need to be located in this structure- See Also:
-
-
Constructor Details
-
PortalResource
public PortalResource()
-
-
Method Details
-
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
-