|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Collection
A document representing a collection of documents. This class is in prototyping stage.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_HREF
Name of the href attribute. |
static java.lang.String |
ATTRIBUTE_TYPE
Name of the type attribute. |
static java.lang.String |
ATTRIBUTE_UUID
attribute for document IDs |
static java.lang.String |
DEFAULT_PREFIX
default namespace prefix |
static java.lang.String |
ELEMENT_COLLECTION
document element |
static java.lang.String |
ELEMENT_DOCUMENT
element for single document references |
static java.lang.String |
NAMESPACE
collection namespace |
static java.lang.String |
TYPE_CHILDREN
Type for automatic inclusion of child documents. |
static java.lang.String |
TYPE_LINK
Type for manual addition of documents. |
static java.lang.String |
TYPE_MANUAL
Type for manual addition of documents. |
Method Summary | |
---|---|
void |
add(org.apache.lenya.cms.publication.Document document)
Adds a document to the collection. |
void |
add(int position,
org.apache.lenya.cms.publication.Document document)
Inserts a document into the collection at a specific position. |
void |
clear()
Removes all documents from this collection. |
boolean |
contains(org.apache.lenya.cms.publication.Document document)
Checks if this collection contains a specific document. |
org.apache.lenya.cms.publication.Document |
getDelegate()
|
org.apache.lenya.cms.publication.Document[] |
getDocuments()
Returns the documents in this collection. |
int |
getFirstPosition(org.apache.lenya.cms.publication.Document document)
Returns the first position of this document in the collection. |
java.lang.String |
getHref()
|
java.lang.String |
getType()
|
void |
remove(org.apache.lenya.cms.publication.Document document)
Removes a document from the collection. |
void |
setHref(java.lang.String href)
|
void |
setType(java.lang.String type)
|
int |
size()
Returns the number of documents in this collection. |
Field Detail |
---|
static final java.lang.String NAMESPACE
static final java.lang.String DEFAULT_PREFIX
static final java.lang.String ELEMENT_COLLECTION
static final java.lang.String ELEMENT_DOCUMENT
static final java.lang.String ATTRIBUTE_UUID
static final java.lang.String ATTRIBUTE_TYPE
static final java.lang.String ATTRIBUTE_HREF
static final java.lang.String TYPE_CHILDREN
static final java.lang.String TYPE_MANUAL
static final java.lang.String TYPE_LINK
Method Detail |
---|
org.apache.lenya.cms.publication.Document[] getDocuments() throws org.apache.lenya.cms.publication.DocumentException
org.apache.lenya.cms.publication.DocumentException
- when something went wrong.void add(org.apache.lenya.cms.publication.Document document) throws org.apache.lenya.cms.publication.DocumentException
document
- A document.
org.apache.lenya.cms.publication.DocumentException
- when an error occurs.void add(int position, org.apache.lenya.cms.publication.Document document) throws org.apache.lenya.cms.publication.DocumentException
document
- A document.position
- The position of the document after insertion,
starting with 0.
org.apache.lenya.cms.publication.DocumentException
- when something went wrong.void remove(org.apache.lenya.cms.publication.Document document) throws org.apache.lenya.cms.publication.DocumentException
document
- A document.
org.apache.lenya.cms.publication.DocumentException
- when the document is not contained
or another error occurs.void clear() throws org.apache.lenya.cms.publication.DocumentException
org.apache.lenya.cms.publication.DocumentException
- when something went wrong.boolean contains(org.apache.lenya.cms.publication.Document document) throws org.apache.lenya.cms.publication.DocumentException
document
- The document to check.
org.apache.lenya.cms.publication.DocumentException
- when something went wrong.int getFirstPosition(org.apache.lenya.cms.publication.Document document) throws org.apache.lenya.cms.publication.DocumentException
document
- The document.
org.apache.lenya.cms.publication.DocumentException
- when the document is not contained.int size() throws org.apache.lenya.cms.publication.DocumentException
org.apache.lenya.cms.publication.DocumentException
- when something went wrong.org.apache.lenya.cms.publication.Document getDelegate()
void setType(java.lang.String type)
type
- One of TYPE_CHILDREN
, TYPE_MANUAL
, TYPE_LINK
.java.lang.String getType()
TYPE_CHILDREN
, TYPE_MANUAL
, TYPE_LINK
.java.lang.String getHref()
void setHref(java.lang.String href)
href
- The link target. If the type is not TYPE_LINK
, calling
this method has no effect.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |