org.hippoecm.hst.rest
Interface DocumentService


public interface DocumentService

JaxRS service that returns information about documents.


Method Summary
 List<ChannelDocument> getChannels(String uuid)
          Returns information about all channels a document is part of.
 String getUrl(String uuid, String type)
          Returns a fully qualified URL for a document in a mount of a certain type.
 

Method Detail

getChannels

List<ChannelDocument> getChannels(String uuid)
Returns information about all channels a document is part of. A document is identified by its UUID. When a document is unknown or not part of any channel, an empty list is returned.

Parameters:
uuid - the identifier of the document
Returns:
a list of 'channel documents' that provide information about all channels the document is part of, or an empty list if the identifier is unknown or the document is not part of any channel.
Throws:
javax.ws.rs.WebApplicationException - when the client-side invocation of this service fails

getUrl

String getUrl(String uuid,
              String type)
Returns a fully qualified URL for a document in a mount of a certain type. The document is identified by its UUID. When the type parameter is null or empty, the value 'live' is used. Note that only one link is returned, even when the document is available in multiple channels (i.e. under multiple mounts). When multiple mounts match, we use the one that has the closest canonical content path to the path of the document handle. If multiple mounts have an equally well suited* canonical content path, we use the mount with the fewest types. These mounts are in general the most generic ones. If multiple mounts have an equally well suited canonical content path and an equal number of types, we use a random one.

Parameters:
uuid - the identifier of the document
type - the type of the mounts that can be used to generate a link to the document. When null or empty, the value 'live' is used.
Returns:
a fully qualified link to the document, or an empty string if no link could be created.
Throws:
javax.ws.rs.WebApplicationException - when the client-side invocation of this service fails


Copyright © 2008-2012 Hippo. All Rights Reserved.