org.apache.chemistry.opencmis.server.impl.atompub
Class AtomPubUtils

java.lang.Object
  extended by org.apache.chemistry.opencmis.server.impl.atompub.AtomPubUtils

public final class AtomPubUtils
extends Object

This class contains operations used by all services.


Field Summary
static BigInteger PAGE_SIZE
           
static String RESOURCE_ACL
           
static String RESOURCE_ALLOWABLEACIONS
           
static String RESOURCE_CHANGES
           
static String RESOURCE_CHECKEDOUT
           
static String RESOURCE_CHILDREN
           
static String RESOURCE_CONTENT
           
static String RESOURCE_DESCENDANTS
           
static String RESOURCE_ENTRY
           
static String RESOURCE_FOLDERTREE
           
static String RESOURCE_OBJECTBYID
           
static String RESOURCE_OBJECTBYPATH
           
static String RESOURCE_PARENTS
           
static String RESOURCE_POLICIES
           
static String RESOURCE_QUERY
           
static String RESOURCE_RELATIONSHIPS
           
static String RESOURCE_TYPE
           
static String RESOURCE_TYPES
           
static String RESOURCE_TYPESDESC
           
static String RESOURCE_UNFILED
           
static String RESOURCE_VERSIONS
           
static String TYPE_AUTHOR
           
 
Method Summary
static org.apache.chemistry.opencmis.commons.impl.UrlBuilder compileBaseUrl(javax.servlet.http.HttpServletRequest request, String repositoryId)
          Compiles the base URL for links, collections and templates.
static String compileUrl(org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl, String resource, String id)
          Compiles a URL for links, collections and templates.
static org.apache.chemistry.opencmis.commons.impl.UrlBuilder compileUrlBuilder(org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl, String resource, String id)
          Compiles a URL for links, collections and templates.
static void writeContentChangesObjectEntry(org.apache.chemistry.opencmis.commons.server.CmisService service, AtomEntry entry, org.apache.chemistry.opencmis.commons.data.ObjectData object, List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> children, String repositoryId, String pathSegment, String relativePathSegment, org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl, boolean isRoot)
          Writes the a object entry in a content changes list.
static void writeObjectChildren(org.apache.chemistry.opencmis.commons.server.CmisService service, AtomEntry entry, org.apache.chemistry.opencmis.commons.server.ObjectInfo folderInfo, List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> children, String repositoryId, org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl)
          Writes an objects entry children feed.
static void writeObjectEntry(org.apache.chemistry.opencmis.commons.server.CmisService service, AtomEntry entry, org.apache.chemistry.opencmis.commons.data.ObjectData object, List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> children, String repositoryId, String pathSegment, String relativePathSegment, org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl, boolean isRoot)
          Writes the a object entry.
static void writeTypeEntry(AtomEntry entry, org.apache.chemistry.opencmis.commons.definitions.TypeDefinition type, List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> children, String repositoryId, org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl, boolean isRoot)
          Writes the a type entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_CHILDREN

public static final String RESOURCE_CHILDREN
See Also:
Constant Field Values

RESOURCE_DESCENDANTS

public static final String RESOURCE_DESCENDANTS
See Also:
Constant Field Values

RESOURCE_FOLDERTREE

public static final String RESOURCE_FOLDERTREE
See Also:
Constant Field Values

RESOURCE_TYPE

public static final String RESOURCE_TYPE
See Also:
Constant Field Values

RESOURCE_TYPES

public static final String RESOURCE_TYPES
See Also:
Constant Field Values

RESOURCE_TYPESDESC

public static final String RESOURCE_TYPESDESC
See Also:
Constant Field Values

RESOURCE_ENTRY

public static final String RESOURCE_ENTRY
See Also:
Constant Field Values

RESOURCE_PARENTS

public static final String RESOURCE_PARENTS
See Also:
Constant Field Values

RESOURCE_VERSIONS

public static final String RESOURCE_VERSIONS
See Also:
Constant Field Values

RESOURCE_ALLOWABLEACIONS

public static final String RESOURCE_ALLOWABLEACIONS
See Also:
Constant Field Values

RESOURCE_ACL

public static final String RESOURCE_ACL
See Also:
Constant Field Values

RESOURCE_POLICIES

public static final String RESOURCE_POLICIES
See Also:
Constant Field Values

RESOURCE_RELATIONSHIPS

public static final String RESOURCE_RELATIONSHIPS
See Also:
Constant Field Values

RESOURCE_OBJECTBYID

public static final String RESOURCE_OBJECTBYID
See Also:
Constant Field Values

RESOURCE_OBJECTBYPATH

public static final String RESOURCE_OBJECTBYPATH
See Also:
Constant Field Values

RESOURCE_QUERY

public static final String RESOURCE_QUERY
See Also:
Constant Field Values

RESOURCE_CHECKEDOUT

public static final String RESOURCE_CHECKEDOUT
See Also:
Constant Field Values

RESOURCE_UNFILED

public static final String RESOURCE_UNFILED
See Also:
Constant Field Values

RESOURCE_CHANGES

public static final String RESOURCE_CHANGES
See Also:
Constant Field Values

RESOURCE_CONTENT

public static final String RESOURCE_CONTENT
See Also:
Constant Field Values

PAGE_SIZE

public static final BigInteger PAGE_SIZE

TYPE_AUTHOR

public static final String TYPE_AUTHOR
See Also:
Constant Field Values
Method Detail

compileBaseUrl

public static org.apache.chemistry.opencmis.commons.impl.UrlBuilder compileBaseUrl(javax.servlet.http.HttpServletRequest request,
                                                                                   String repositoryId)
Compiles the base URL for links, collections and templates.


compileUrl

public static String compileUrl(org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl,
                                String resource,
                                String id)
Compiles a URL for links, collections and templates.


compileUrlBuilder

public static org.apache.chemistry.opencmis.commons.impl.UrlBuilder compileUrlBuilder(org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl,
                                                                                      String resource,
                                                                                      String id)
Compiles a URL for links, collections and templates.


writeObjectEntry

public static void writeObjectEntry(org.apache.chemistry.opencmis.commons.server.CmisService service,
                                    AtomEntry entry,
                                    org.apache.chemistry.opencmis.commons.data.ObjectData object,
                                    List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> children,
                                    String repositoryId,
                                    String pathSegment,
                                    String relativePathSegment,
                                    org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl,
                                    boolean isRoot)
                             throws XMLStreamException,
                                    JAXBException
Writes the a object entry.

Throws:
XMLStreamException
JAXBException

writeContentChangesObjectEntry

public static void writeContentChangesObjectEntry(org.apache.chemistry.opencmis.commons.server.CmisService service,
                                                  AtomEntry entry,
                                                  org.apache.chemistry.opencmis.commons.data.ObjectData object,
                                                  List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> children,
                                                  String repositoryId,
                                                  String pathSegment,
                                                  String relativePathSegment,
                                                  org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl,
                                                  boolean isRoot)
                                           throws XMLStreamException,
                                                  JAXBException
Writes the a object entry in a content changes list. Content changes objects need special treatment because some of them could have been deleted and an object info cannot be generated.

Throws:
XMLStreamException
JAXBException

writeObjectChildren

public static void writeObjectChildren(org.apache.chemistry.opencmis.commons.server.CmisService service,
                                       AtomEntry entry,
                                       org.apache.chemistry.opencmis.commons.server.ObjectInfo folderInfo,
                                       List<org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer> children,
                                       String repositoryId,
                                       org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl)
                                throws XMLStreamException,
                                       JAXBException
Writes an objects entry children feed.

Throws:
XMLStreamException
JAXBException

writeTypeEntry

public static void writeTypeEntry(AtomEntry entry,
                                  org.apache.chemistry.opencmis.commons.definitions.TypeDefinition type,
                                  List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> children,
                                  String repositoryId,
                                  org.apache.chemistry.opencmis.commons.impl.UrlBuilder baseUrl,
                                  boolean isRoot)
                           throws XMLStreamException,
                                  JAXBException
Writes the a type entry.

Throws:
XMLStreamException
JAXBException


Copyright © 2014 Mairie de Paris. All Rights Reserved.