public class CmsContentService extends CmsGwtService implements I_CmsContentService
限定符和类型 | 字段和说明 |
---|---|
protected static org.apache.commons.logging.Log |
LOG
The logger for this class.
|
perThreadRequest, perThreadResponse
DICT_CONTENT_DEFINITION, PARAM_BACKLINK
构造器和说明 |
---|
CmsContentService() |
限定符和类型 | 方法和说明 |
---|---|
protected java.lang.String |
decodeNewLink(java.lang.String newLink)
Decodes the newlink request parameter if possible.
|
static java.lang.String |
getAttributeName(I_CmsXmlContentValue contentValue)
Returns the entity attribute name representing the given content value.
|
static java.lang.String |
getAttributeName(java.lang.String elementName,
java.lang.String parentType)
Returns the entity attribute name to use for this element.
|
protected java.lang.String |
getElementName(java.lang.String attributeName)
Returns the element name to the given element.
|
static java.lang.String |
getEntityId(I_CmsXmlContentValue contentValue)
Returns the entity id to the given content value.
|
protected java.lang.String |
getFileEncoding(CmsObject cms,
CmsResource file)
Helper method to determine the encoding of the given file in the VFS,
which must be set using the "content-encoding" property.
|
static java.lang.String |
getRdfaAttributes(I_CmsXmlContentValue parentValue,
java.lang.String childNames)
Returns the RDF annotations required for in line editing.
|
static java.lang.String |
getRdfaAttributes(I_CmsXmlDocument document,
java.util.Locale contentLocale,
java.lang.String childName)
Returns the RDF annotations required for in line editing.
|
static java.lang.String |
getTypeUri(CmsXmlContentDefinition xmlContentDefinition)
Returns the type URI.
|
com.alkacon.acacia.shared.ContentDefinition |
loadContentDefinition(java.lang.String entityId) |
CmsContentDefinition |
loadDefinition(java.lang.String entityId)
Loads the content definition for a given entity.
|
CmsContentDefinition |
loadDefinition(java.lang.String entityId,
java.lang.String newLink,
CmsUUID modelFileId,
java.lang.String editContext)
Loads the content definition for a given entity.
|
CmsContentDefinition |
loadNewDefinition(java.lang.String entityId)
Loads new entity definition.
|
CmsContentDefinition |
prefetch()
Returns the content definition of the resource requested through parameter 'resource'.
|
static CmsContentDefinition |
prefetch(javax.servlet.http.HttpServletRequest request)
Fetches the initial content definition.
|
protected com.alkacon.acacia.shared.Entity |
readEntity(CmsXmlContent content,
org.dom4j.Element element,
java.util.Locale locale,
java.lang.String entityId,
java.lang.String parentPath,
java.lang.String typeName,
java.util.Map<java.lang.String,com.alkacon.vie.shared.I_Type> registeredTypes)
Parses the element into an entity.
|
protected java.util.Map<java.lang.String,com.alkacon.vie.shared.I_Type> |
readTypes(CmsXmlContentDefinition xmlContentDefinition,
java.util.Locale locale)
Reads the types from the given content definition and adds the to the map of already registered
types if necessary.
|
com.alkacon.acacia.shared.ValidationResult |
saveAndDeleteEntities(java.util.List<com.alkacon.acacia.shared.Entity> changedEntities,
java.util.List<java.lang.String> deletedEntities,
boolean clearOnSuccess)
Saves and deletes the given entities.
|
com.alkacon.acacia.shared.ValidationResult |
saveEntities(java.util.List<com.alkacon.acacia.shared.Entity> entities) |
com.alkacon.acacia.shared.ValidationResult |
saveEntity(com.alkacon.acacia.shared.Entity entity) |
com.alkacon.acacia.shared.EntityHtml |
updateEntityHtml(com.alkacon.acacia.shared.Entity entity,
java.lang.String contextUri,
java.lang.String htmlContextInfo) |
com.alkacon.acacia.shared.ValidationResult |
validateEntities(java.util.List<com.alkacon.acacia.shared.Entity> changedEntities) |
checkPermissions, clearThreadStorage, doGetSerializationPolicy, doUnexpectedFailure, ensureLock, ensureLock, ensureLock, ensureSession, error, getCmsObject, getPropertiesByName, getRequest, getResponse, log, log, logError, service, setCms, setContext, setRequest, setResponse, tryUnlock
checkPermutationStrongName, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
doPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service
public static java.lang.String getAttributeName(I_CmsXmlContentValue contentValue)
contentValue
- the content valuepublic static java.lang.String getAttributeName(java.lang.String elementName, java.lang.String parentType)
elementName
- the element nameparentType
- the parent typepublic static java.lang.String getEntityId(I_CmsXmlContentValue contentValue)
contentValue
- the content valuepublic static java.lang.String getRdfaAttributes(I_CmsXmlContentValue parentValue, java.lang.String childNames)
parentValue
- the parent XML content valuechildNames
- the child attribute names separated by '|'public static java.lang.String getRdfaAttributes(I_CmsXmlDocument document, java.util.Locale contentLocale, java.lang.String childName)
document
- the parent XML documentcontentLocale
- the content localechildName
- the child attribute namepublic static java.lang.String getTypeUri(CmsXmlContentDefinition xmlContentDefinition)
xmlContentDefinition
- the type content definitionpublic static CmsContentDefinition prefetch(javax.servlet.http.HttpServletRequest request) throws CmsRpcException
request
- the current requestCmsRpcException
- if something goes wrongpublic com.alkacon.acacia.shared.ContentDefinition loadContentDefinition(java.lang.String entityId) throws CmsRpcException
loadContentDefinition
在接口中 com.alkacon.acacia.shared.rpc.I_ContentService
CmsRpcException
I_ContentService.loadContentDefinition(java.lang.String)
public CmsContentDefinition loadDefinition(java.lang.String entityId) throws CmsRpcException
I_CmsContentService
loadDefinition
在接口中 I_CmsContentService
entityId
- the entity id/URICmsRpcException
I_CmsContentService.loadDefinition(java.lang.String)
public CmsContentDefinition loadDefinition(java.lang.String entityId, java.lang.String newLink, CmsUUID modelFileId, java.lang.String editContext) throws CmsRpcException
I_CmsContentService
loadDefinition
在接口中 I_CmsContentService
entityId
- the entity id/URInewLink
- the new linkmodelFileId
- the optional model file ideditContext
- the container page currently being edited (may be null)CmsRpcException
- if something goes wrong processing the requestI_CmsContentService.loadDefinition(java.lang.String, java.lang.String, org.opencms.util.CmsUUID, java.lang.String)
public CmsContentDefinition loadNewDefinition(java.lang.String entityId) throws CmsRpcException
I_CmsContentService
This will load the entity representation of a new locale node.
loadNewDefinition
在接口中 I_CmsContentService
entityId
- the entity id/URICmsRpcException
- if something goes wrong processing the requestI_CmsContentService.loadNewDefinition(java.lang.String)
public CmsContentDefinition prefetch() throws CmsRpcException
I_CmsContentService
prefetch
在接口中 I_CmsContentService
CmsRpcException
- if something goes wrongI_CmsContentService.prefetch()
public com.alkacon.acacia.shared.ValidationResult saveAndDeleteEntities(java.util.List<com.alkacon.acacia.shared.Entity> changedEntities, java.util.List<java.lang.String> deletedEntities, boolean clearOnSuccess) throws CmsRpcException
I_CmsContentService
saveAndDeleteEntities
在接口中 I_CmsContentService
changedEntities
- the changed entitiesdeletedEntities
- the entity id's to deleteclearOnSuccess
- true
to unlock resource after savingCmsRpcException
- if something goes wrong processing the requestI_CmsContentService.saveAndDeleteEntities(java.util.List, java.util.List, boolean)
public com.alkacon.acacia.shared.ValidationResult saveEntities(java.util.List<com.alkacon.acacia.shared.Entity> entities) throws CmsRpcException
saveEntities
在接口中 com.alkacon.acacia.shared.rpc.I_ContentService
CmsRpcException
I_ContentService.saveEntities(java.util.List)
public com.alkacon.acacia.shared.ValidationResult saveEntity(com.alkacon.acacia.shared.Entity entity) throws CmsRpcException
saveEntity
在接口中 com.alkacon.acacia.shared.rpc.I_ContentService
CmsRpcException
I_ContentService.saveEntity(com.alkacon.acacia.shared.Entity)
public com.alkacon.acacia.shared.EntityHtml updateEntityHtml(com.alkacon.acacia.shared.Entity entity, java.lang.String contextUri, java.lang.String htmlContextInfo) throws java.lang.Exception
updateEntityHtml
在接口中 com.alkacon.acacia.shared.rpc.I_ContentService
java.lang.Exception
I_ContentService.updateEntityHtml(com.alkacon.acacia.shared.Entity, java.lang.String, java.lang.String)
public com.alkacon.acacia.shared.ValidationResult validateEntities(java.util.List<com.alkacon.acacia.shared.Entity> changedEntities) throws CmsRpcException
validateEntities
在接口中 com.alkacon.acacia.shared.rpc.I_ContentService
CmsRpcException
I_ContentService.validateEntities(java.util.List)
protected java.lang.String decodeNewLink(java.lang.String newLink)
newLink
- the parameter to decodeprotected java.lang.String getElementName(java.lang.String attributeName)
attributeName
- the attribute nameprotected java.lang.String getFileEncoding(CmsObject cms, CmsResource file)
cms
- the CmsObjectfile
- the file which is to be checkedprotected com.alkacon.acacia.shared.Entity readEntity(CmsXmlContent content, org.dom4j.Element element, java.util.Locale locale, java.lang.String entityId, java.lang.String parentPath, java.lang.String typeName, java.util.Map<java.lang.String,com.alkacon.vie.shared.I_Type> registeredTypes)
content
- the entity contentelement
- the current elementlocale
- the content localeentityId
- the entity idparentPath
- the parent pathtypeName
- the entity type nameregisteredTypes
- the types used within the entityprotected java.util.Map<java.lang.String,com.alkacon.vie.shared.I_Type> readTypes(CmsXmlContentDefinition xmlContentDefinition, java.util.Locale locale)
xmlContentDefinition
- the XML content definitionlocale
- the messages locale