|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sage.orion.sdata.servlet.SDataResponseEntry
com.sage.orion.sdata.servlet.accpac.ResponseEntry
public class ResponseEntry
Adds the accpac requirements to the SDataResponseEntry
Field Summary | |
---|---|
static java.lang.String |
AUTHOR_NAME
A simple Author because the ATOM specification requires something. |
protected static java.lang.String |
AUTHOR_TAG
|
protected static java.lang.String |
EDIT_RELATIONSHIP
|
protected static java.lang.String |
ENTRY_TAG
|
protected static java.lang.String |
FEED_TAG
|
protected static java.lang.String |
FIRST_RELATIONSHIP
|
protected static java.lang.String |
HREF_ATTRIBUTE
|
protected static java.lang.String |
ID_TAG
|
protected static java.lang.String |
LAST_RELATIONSHIP
|
protected static java.lang.String |
LINK_TAG
|
protected static java.lang.String |
MIME_ATOM_XML_ENTRY
|
protected static java.lang.String |
MIME_ATOM_XML_FEED
|
protected static java.lang.String |
MIME_XML_XSD
|
protected static java.lang.String |
NEXT_RELATIONSHIP
|
protected static java.lang.String |
PREV_RELATIONSHIP
|
protected static java.lang.String |
RELATIONSHIP_ATTRIBUTE
|
protected static java.lang.String |
SELF_RELATIONSHIP
|
protected static java.lang.String |
TITLE_ATTRIBUTE
|
protected static java.lang.String |
TITLE_EDIT
|
protected static java.lang.String |
TITLE_FIRST
|
protected static java.lang.String |
TITLE_LAST
|
protected static java.lang.String |
TITLE_NEXT
|
protected static java.lang.String |
TITLE_PREV
|
protected static java.lang.String |
TITLE_SELF
|
protected static java.lang.String |
TYPE_ATTRIBUTE
|
protected static java.lang.String |
UPDATED_TAG
|
Method Summary | |
---|---|
protected void |
addCategory(org.w3c.dom.Element atomElement)
Add the category information to the given DOM element (feed or entry) |
protected static void |
addNamespaces(org.w3c.dom.Element parent)
Add the namespace attributes that are common to SDataEntry and SDataFeed |
protected void |
addSchemaEtcLinks(org.w3c.dom.Element parent,
java.lang.String urlBase,
boolean canPost,
boolean hasService)
Add the schema, post, service and template links to the given feed or entry element |
protected static void |
appendIfNotNull(org.w3c.dom.Element entry,
org.w3c.dom.Element child)
Utility to append a child only if it is defined |
protected org.w3c.dom.Element |
createElement(org.w3c.dom.Document doc,
boolean isDocumentElement,
java.lang.String resourcesURL,
java.util.List<SDataDiagnosis> errors)
adds the accpac-specific additions to the element |
protected org.w3c.dom.Element |
createElement(org.w3c.dom.Document doc,
boolean isDocumentElement,
java.lang.String resourcesURL,
java.util.List<SDataDiagnosis> errors,
java.lang.String typeTag)
Creates an atom element |
protected void |
createSchemaLink(java.lang.String urlBase,
org.w3c.dom.Element atomElement)
adds the schema link to the parent provided, complete with actual schema if any |
protected static org.w3c.dom.Element |
getAtomLinkElement(org.w3c.dom.Document document,
java.lang.String type,
java.lang.String relationship,
java.lang.String title,
java.lang.String href)
Create an Atom link element for the given link-relation entry |
protected java.lang.String |
getID(java.lang.String resourcesURL)
Get the ID used for the ID, self and edit links |
protected static org.w3c.dom.Element |
getLinkRelationElement(org.w3c.dom.Document document,
java.lang.String relationship,
java.lang.String type,
java.lang.String title,
java.lang.String href)
Create an Atom link element for the given link-relation entry |
Methods inherited from class com.sage.orion.sdata.servlet.SDataResponseEntry |
---|
getAtomEntryLinkElement, getEditLink, getKey, getPayload, newIntermediateEntry, setPayload |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String TITLE_EDIT
protected static final java.lang.String TITLE_SELF
protected static final java.lang.String TITLE_FIRST
protected static final java.lang.String TITLE_LAST
protected static final java.lang.String TITLE_PREV
protected static final java.lang.String TITLE_NEXT
protected static final java.lang.String MIME_XML_XSD
protected static final java.lang.String MIME_ATOM_XML_FEED
protected static final java.lang.String MIME_ATOM_XML_ENTRY
protected static final java.lang.String SELF_RELATIONSHIP
protected static final java.lang.String EDIT_RELATIONSHIP
protected static final java.lang.String FIRST_RELATIONSHIP
protected static final java.lang.String LAST_RELATIONSHIP
protected static final java.lang.String PREV_RELATIONSHIP
protected static final java.lang.String NEXT_RELATIONSHIP
protected static final java.lang.String LINK_TAG
protected static final java.lang.String RELATIONSHIP_ATTRIBUTE
protected static final java.lang.String TITLE_ATTRIBUTE
protected static final java.lang.String TYPE_ATTRIBUTE
protected static final java.lang.String HREF_ATTRIBUTE
protected static final java.lang.String ENTRY_TAG
protected static final java.lang.String FEED_TAG
protected static final java.lang.String ID_TAG
protected static final java.lang.String AUTHOR_TAG
protected static final java.lang.String UPDATED_TAG
public static final java.lang.String AUTHOR_NAME
Method Detail |
---|
protected java.lang.String getID(java.lang.String resourcesURL)
getID
in class SDataResponseEntry
resourcesURL
- the base resources URL, already encoded for transportprotected org.w3c.dom.Element createElement(org.w3c.dom.Document doc, boolean isDocumentElement, java.lang.String resourcesURL, java.util.List<SDataDiagnosis> errors)
createElement
in class SDataResponseEntry
doc
- the Document in which to create the elementisDocumentElement
- true if this element is the document top level element, in which
case it will have the namespace attributes. If false then the
namespace attributes should be added to the feed above this
element.resourcesURL
- The base URL to be used in creating links, ids etc. This
includes all elements up to and including the resource kind but
does not include subresources etc.errors
- The list of errors
protected static void appendIfNotNull(org.w3c.dom.Element entry, org.w3c.dom.Element child)
entry
- entrychild
- childprotected static org.w3c.dom.Element getLinkRelationElement(org.w3c.dom.Document document, java.lang.String relationship, java.lang.String type, java.lang.String title, java.lang.String href)
document
- the document which will own the entryrelationship
- the relationship; one of schema, template, post and servicetype
- the type of the result? depends on relationshiptitle
- titlehref
- href
protected static org.w3c.dom.Element getAtomLinkElement(org.w3c.dom.Document document, java.lang.String type, java.lang.String relationship, java.lang.String title, java.lang.String href)
document
- the document which will own the entryrelationship
- the relationship; one of schema, template, post and servicetype
- the type of the result? depends on relationshiptitle
- titlehref
- href
protected void addSchemaEtcLinks(org.w3c.dom.Element parent, java.lang.String urlBase, boolean canPost, boolean hasService)
parent
- the entry or feed element to which the links are attachedurlBase
- the URL that is used as the base text for the links. It should
already be in RFC3987 IRI format.canPost
- true if and only if the entry or feed supports post (and so the
post and template links are included)hasService
- true if and only if the entry or feed has services (and so the
service link is included)protected final void createSchemaLink(java.lang.String urlBase, org.w3c.dom.Element atomElement)
urlBase
- the base string to use in forming the hrefatomElement
- the parent element that is the feed or entryprotected org.w3c.dom.Element createElement(org.w3c.dom.Document doc, boolean isDocumentElement, java.lang.String resourcesURL, java.util.List<SDataDiagnosis> errors, java.lang.String typeTag)
doc
- documentisDocumentElement
- whether document is document elementresourcesURL
- resources URLerrors
- errorstypeTag
- type tag ( i.e. feed or entry)
protected static final void addNamespaces(org.w3c.dom.Element parent)
parent
- the element to which to add the attributesprotected final void addCategory(org.w3c.dom.Element atomElement)
atomElement
- the parent element that is the feed or entry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |