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 java.lang.Object

This class contains operations used by all services.


Field Summary
static java.math.BigInteger PAGE_SIZE
           
static java.lang.String RESOURCE_ACL
           
static java.lang.String RESOURCE_ALLOWABLEACIONS
           
static java.lang.String RESOURCE_CHANGES
           
static java.lang.String RESOURCE_CHECKEDOUT
           
static java.lang.String RESOURCE_CHILDREN
           
static java.lang.String RESOURCE_CONTENT
           
static java.lang.String RESOURCE_DESCENDANTS
           
static java.lang.String RESOURCE_ENTRY
           
static java.lang.String RESOURCE_FOLDERTREE
           
static java.lang.String RESOURCE_OBJECTBYID
           
static java.lang.String RESOURCE_OBJECTBYPATH
           
static java.lang.String RESOURCE_PARENTS
           
static java.lang.String RESOURCE_POLICIES
           
static java.lang.String RESOURCE_QUERY
           
static java.lang.String RESOURCE_RELATIONSHIPS
           
static java.lang.String RESOURCE_TYPE
           
static java.lang.String RESOURCE_TYPES
           
static java.lang.String RESOURCE_TYPESDESC
           
static java.lang.String RESOURCE_UNFILED
           
static java.lang.String RESOURCE_VERSIONS
           
static java.lang.String TYPE_AUTHOR
           
 
Method Summary
static UrlBuilder compileBaseUrl(javax.servlet.http.HttpServletRequest request, java.lang.String repositoryId)
          Compiles the base URL for links, collections and templates.
static java.lang.String compileUrl(UrlBuilder baseUrl, java.lang.String resource, java.lang.String id)
          Compiles a URL for links, collections and templates.
static UrlBuilder compileUrlBuilder(UrlBuilder baseUrl, java.lang.String resource, java.lang.String id)
          Compiles a URL for links, collections and templates.
static void writeContentChangesObjectEntry(CmisService service, AtomEntry entry, ObjectData object, java.util.List<ObjectInFolderContainer> children, java.lang.String repositoryId, java.lang.String pathSegment, java.lang.String relativePathSegment, UrlBuilder baseUrl, boolean isRoot)
          Writes the a object entry in a content changes list.
static void writeObjectChildren(CmisService service, AtomEntry entry, ObjectInfo folderInfo, java.util.List<ObjectInFolderContainer> children, java.lang.String repositoryId, UrlBuilder baseUrl)
          Writes an objects entry children feed.
static void writeObjectEntry(CmisService service, AtomEntry entry, ObjectData object, java.util.List<ObjectInFolderContainer> children, java.lang.String repositoryId, java.lang.String pathSegment, java.lang.String relativePathSegment, UrlBuilder baseUrl, boolean isRoot)
          Writes the a object entry.
static void writeTypeEntry(AtomEntry entry, TypeDefinition type, java.util.List<TypeDefinitionContainer> children, java.lang.String repositoryId, 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 java.lang.String RESOURCE_CHILDREN
See Also:
Constant Field Values

RESOURCE_DESCENDANTS

public static final java.lang.String RESOURCE_DESCENDANTS
See Also:
Constant Field Values

RESOURCE_FOLDERTREE

public static final java.lang.String RESOURCE_FOLDERTREE
See Also:
Constant Field Values

RESOURCE_TYPE

public static final java.lang.String RESOURCE_TYPE
See Also:
Constant Field Values

RESOURCE_TYPES

public static final java.lang.String RESOURCE_TYPES
See Also:
Constant Field Values

RESOURCE_TYPESDESC

public static final java.lang.String RESOURCE_TYPESDESC
See Also:
Constant Field Values

RESOURCE_ENTRY

public static final java.lang.String RESOURCE_ENTRY
See Also:
Constant Field Values

RESOURCE_PARENTS

public static final java.lang.String RESOURCE_PARENTS
See Also:
Constant Field Values

RESOURCE_VERSIONS

public static final java.lang.String RESOURCE_VERSIONS
See Also:
Constant Field Values

RESOURCE_ALLOWABLEACIONS

public static final java.lang.String RESOURCE_ALLOWABLEACIONS
See Also:
Constant Field Values

RESOURCE_ACL

public static final java.lang.String RESOURCE_ACL
See Also:
Constant Field Values

RESOURCE_POLICIES

public static final java.lang.String RESOURCE_POLICIES
See Also:
Constant Field Values

RESOURCE_RELATIONSHIPS

public static final java.lang.String RESOURCE_RELATIONSHIPS
See Also:
Constant Field Values

RESOURCE_OBJECTBYID

public static final java.lang.String RESOURCE_OBJECTBYID
See Also:
Constant Field Values

RESOURCE_OBJECTBYPATH

public static final java.lang.String RESOURCE_OBJECTBYPATH
See Also:
Constant Field Values

RESOURCE_QUERY

public static final java.lang.String RESOURCE_QUERY
See Also:
Constant Field Values

RESOURCE_CHECKEDOUT

public static final java.lang.String RESOURCE_CHECKEDOUT
See Also:
Constant Field Values

RESOURCE_UNFILED

public static final java.lang.String RESOURCE_UNFILED
See Also:
Constant Field Values

RESOURCE_CHANGES

public static final java.lang.String RESOURCE_CHANGES
See Also:
Constant Field Values

RESOURCE_CONTENT

public static final java.lang.String RESOURCE_CONTENT
See Also:
Constant Field Values

PAGE_SIZE

public static final java.math.BigInteger PAGE_SIZE

TYPE_AUTHOR

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

compileBaseUrl

public static UrlBuilder compileBaseUrl(javax.servlet.http.HttpServletRequest request,
                                        java.lang.String repositoryId)
Compiles the base URL for links, collections and templates.


compileUrl

public static java.lang.String compileUrl(UrlBuilder baseUrl,
                                          java.lang.String resource,
                                          java.lang.String id)
Compiles a URL for links, collections and templates.


compileUrlBuilder

public static UrlBuilder compileUrlBuilder(UrlBuilder baseUrl,
                                           java.lang.String resource,
                                           java.lang.String id)
Compiles a URL for links, collections and templates.


writeObjectEntry

public static void writeObjectEntry(CmisService service,
                                    AtomEntry entry,
                                    ObjectData object,
                                    java.util.List<ObjectInFolderContainer> children,
                                    java.lang.String repositoryId,
                                    java.lang.String pathSegment,
                                    java.lang.String relativePathSegment,
                                    UrlBuilder baseUrl,
                                    boolean isRoot)
                             throws javax.xml.stream.XMLStreamException,
                                    javax.xml.bind.JAXBException
Writes the a object entry.

Throws:
javax.xml.stream.XMLStreamException
javax.xml.bind.JAXBException

writeContentChangesObjectEntry

public static void writeContentChangesObjectEntry(CmisService service,
                                                  AtomEntry entry,
                                                  ObjectData object,
                                                  java.util.List<ObjectInFolderContainer> children,
                                                  java.lang.String repositoryId,
                                                  java.lang.String pathSegment,
                                                  java.lang.String relativePathSegment,
                                                  UrlBuilder baseUrl,
                                                  boolean isRoot)
                                           throws javax.xml.stream.XMLStreamException,
                                                  javax.xml.bind.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:
javax.xml.stream.XMLStreamException
javax.xml.bind.JAXBException

writeObjectChildren

public static void writeObjectChildren(CmisService service,
                                       AtomEntry entry,
                                       ObjectInfo folderInfo,
                                       java.util.List<ObjectInFolderContainer> children,
                                       java.lang.String repositoryId,
                                       UrlBuilder baseUrl)
                                throws javax.xml.stream.XMLStreamException,
                                       javax.xml.bind.JAXBException
Writes an objects entry children feed.

Throws:
javax.xml.stream.XMLStreamException
javax.xml.bind.JAXBException

writeTypeEntry

public static void writeTypeEntry(AtomEntry entry,
                                  TypeDefinition type,
                                  java.util.List<TypeDefinitionContainer> children,
                                  java.lang.String repositoryId,
                                  UrlBuilder baseUrl,
                                  boolean isRoot)
                           throws javax.xml.stream.XMLStreamException,
                                  javax.xml.bind.JAXBException
Writes the a type entry.

Throws:
javax.xml.stream.XMLStreamException
javax.xml.bind.JAXBException


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.