Class CmsContentService

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ATTR_EDITOR_SAVING
      Request context attribute to mark a writeFile() triggered by the user saving in the content editor.
      protected static org.apache.commons.logging.Log LOG
      The logger for this class.
      • Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

        perThreadRequest, perThreadResponse
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CmsContentDefinition callEditorChangeHandlers​(java.lang.String entityId, CmsEntity editedLocaleEntity, java.util.Collection<java.lang.String> skipPaths, java.util.Collection<java.lang.String> changedScopes)
      Calls the editor change handlers.
      void copyLocale​(java.util.Collection<java.lang.String> locales, CmsEntity sourceLocale)
      Copies the given source locale to the target locales.
      protected java.lang.String decodeNewLink​(java.lang.String newLink)
      Decodes the newlink request parameter if possible.
      static java.lang.String defaultCreateResourceToEdit​(CmsObject cms, java.lang.String newLink, java.util.Locale locale, java.lang.String referenceSitePath, java.lang.String modelFileSitePath, java.lang.String mode, java.lang.String postCreateHandler)
      Creates a new resource to edit, delegating to an edit handler if edit handler data is passed in.
      static java.lang.String getAttributeName​(java.lang.String elementName, java.lang.String parentType)
      Returns the entity attribute name to use for this element.
      static java.lang.String getAttributeName​(I_CmsXmlContentValue contentValue)
      Returns the entity attribute name representing the given content value.
      CmsObject getCmsObject()
      Returns the current cms context.
      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_CmsXmlDocument document, java.util.Locale contentLocale, java.lang.String elementPath)
      Returns the RDF annotations required for in line editing.
      static java.lang.String getRdfaAttributes​(I_CmsXmlContentValue value)
      Returns the RDF annotations required for in line editing.
      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 getTypeUri​(CmsXmlContentDefinition xmlContentDefinition)
      Returns the type URI.
      CmsContentDefinition loadContentDefinition​(java.lang.String entityId)
      Loads the content definition for a given entity.
      CmsContentDefinition loadDefinition​(java.lang.String entityId, java.lang.String clientId, CmsEntity editedLocaleEntity, java.util.Collection<java.lang.String> skipPaths, java.util.Map<java.lang.String,​java.lang.String> settingPresets)
      Loads the content definition for a given entity.
      CmsContentDefinition loadInitialDefinition​(java.lang.String entityId, java.lang.String clientId, java.lang.String newLink, CmsUUID modelFileId, java.lang.String editContext, java.lang.String mainLocale, java.lang.String mode, java.lang.String postCreateHandler, CmsEditHandlerData editHandlerDataForNew, java.util.Map<java.lang.String,​java.lang.String> settingPresets, java.lang.String editorStylesheet)
      Loads the content definition for a given entity.
      CmsContentDefinition loadNewDefinition​(java.lang.String entityId, java.lang.String clientId, CmsEntity editedLocaleEntity, java.util.Collection<java.lang.String> skipPaths, java.util.Map<java.lang.String,​java.lang.String> settingPresets)
      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 CmsEntity readEntity​(CmsXmlContent content, org.dom4j.Element element, java.util.Locale locale, java.lang.String entityId, java.lang.String parentPath, java.lang.String typeName, CmsContentTypeVisitor visitor, boolean includeInvisible, CmsEntity editedLocalEntity)
      Parses the element into an entity.
      protected java.util.Map<java.lang.String,​CmsType> 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.
      CmsSaveResult saveAndDeleteEntities​(CmsEntity lastEditedEntity, java.lang.String clientId, java.util.List<java.lang.String> deletedEntities, java.util.Collection<java.lang.String> skipPaths, java.lang.String lastEditedLocale, boolean clearOnSuccess)
      Saves and deletes the given entities.
      CmsValidationResult saveEntities​(java.util.List<CmsEntity> entities)
      Saves the given entities and returns a validation result in case of invalid entities.
      CmsValidationResult saveEntity​(CmsEntity entity)
      Saves the given entity and returns a validation result in case of invalid entities.
      java.lang.String saveValue​(java.lang.String contentId, java.lang.String contentPath, java.lang.String localeString, java.lang.String newValue)
      Saves a value in an existing XML content.
      protected void synchronizeLocaleIndependentFields​(CmsFile file, CmsXmlContent content, java.util.Collection<java.lang.String> skipPaths, java.util.Collection<CmsEntity> entities, java.util.Locale lastEdited)
      Synchronizes the locale independent fields.
      protected void transferInvisibleValues​(CmsEntity original, CmsEntity target, CmsContentTypeVisitor visitor)
      Transfers values marked as invisible from the original entity to the target entity.
      CmsEntityHtml updateEntityHtml​(CmsEntity entity, java.lang.String contextUri, java.lang.String htmlContextInfo)
      Retrieves the updated entity HTML representation.
      CmsValidationResult validateEntity​(CmsEntity changedEntity)
      Validates the given entity and returns maps of error and warning messages in case of invalid attributes.
      • Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet

        checkPermutationStrongName, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponse
      • Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

        doPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait