|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.util.NodeDataWrapper
public abstract class NodeDataWrapper
Wraps a NodeData
to which it delegates. Used to manipulate node datas.
Field Summary |
---|
Fields inherited from interface info.magnolia.cms.core.NodeData |
---|
MULTIVALUE_FALSE, MULTIVALUE_TRUE, MULTIVALUE_UNDEFINED |
Constructor Summary | |
---|---|
NodeDataWrapper()
|
|
NodeDataWrapper(NodeData wrappedNodeData)
|
Method Summary | |
---|---|
void |
delete()
Remove this path. |
String |
getAttribute(String name)
get attribute, available only if NodeData is of type Binary . |
Collection |
getAttributeNames()
get all attribute names. |
boolean |
getBoolean()
Returns the boolean representation of the value. |
long |
getContentLength()
returns size in bytes. |
Calendar |
getDate()
Returns the Calendar representation of the value. |
double |
getDouble()
Returns the double representation of the value. |
String |
getHandle()
get a handle representing path relative to the content repository. |
HierarchyManager |
getHierarchyManager()
|
javax.jcr.Property |
getJCRProperty()
Access to property at the JCR level. |
long |
getLong()
Returns the long representation of the value. |
String |
getName()
|
Content |
getParent()
returns Parent node. |
Content |
getReferencedContent()
Returns the Content that this NodeData references (if its type is PropertyType.REFERENCE). |
Content |
getReferencedContent(String repositoryId)
Same as NodeData.getReferencedContent() but achieves the referenced node from a different workspace. |
InputStream |
getStream()
Returns the InputStream representation of the value. |
String |
getString()
Returns the String representation of the value. |
String |
getString(String lineBreak)
Returns the String representation of the value: decodes like breaks with the specified regular
expression. |
int |
getType()
Returns the type of this NodeData . |
javax.jcr.Value |
getValue()
Returns the value of this NodeData . |
javax.jcr.Value[] |
getValues()
For multi-value properties. |
NodeData |
getWrappedNodeData()
|
boolean |
isExist()
checks if the atom exists in the repository. |
boolean |
isGranted(long permissions)
checks for the allowed access rights. |
int |
isMultiValue()
for multi-value controls. |
void |
refresh(boolean keepChanges)
Refreshes current node keeping all changes. |
void |
save()
Persists all changes to the repository if validation succeeds. |
void |
setAttribute(String name,
Calendar value)
set attribute, available only if NodeData is of type Binary . |
void |
setAttribute(String name,
String value)
set attribute, available only if NodeData is of type Binary . |
void |
setValue(boolean value)
set value of type boolean . |
void |
setValue(Calendar value)
set value of type Calendar . |
void |
setValue(Content value)
Sets a reference value. |
void |
setValue(double value)
set value of type double . |
void |
setValue(InputStream value)
set value of type InputStream . |
void |
setValue(int value)
set value of type int . |
void |
setValue(long value)
set value of type long . |
void |
setValue(String value)
set value of type String . |
void |
setValue(javax.jcr.Value value)
set value of type Value . |
void |
setValue(javax.jcr.Value[] value)
set value of type Value[] . |
void |
setWrappedNodeData(NodeData wrappedNodeData)
|
String |
toString()
|
protected Content |
wrap(Content content)
Default implementation of content wrapping for cases where NodeData needs to return content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NodeDataWrapper()
public NodeDataWrapper(NodeData wrappedNodeData)
Method Detail |
---|
public NodeData getWrappedNodeData()
public void setWrappedNodeData(NodeData wrappedNodeData)
protected Content wrap(Content content)
content
-
public String toString()
toString
in class Object
public void delete() throws javax.jcr.RepositoryException
NodeData
delete
in interface NodeData
javax.jcr.RepositoryException
public String getAttribute(String name)
NodeData
Binary
.
getAttribute
in interface NodeData
public Collection getAttributeNames() throws javax.jcr.RepositoryException
NodeData
getAttributeNames
in interface NodeData
javax.jcr.RepositoryException
public boolean getBoolean()
NodeData
boolean
representation of the value.
getBoolean
in interface NodeData
public long getContentLength()
NodeData
getContentLength
in interface NodeData
public Calendar getDate()
NodeData
Calendar
representation of the value.
getDate
in interface NodeData
public double getDouble()
NodeData
double
representation of the value.
getDouble
in interface NodeData
public String getHandle()
NodeData
getHandle
in interface NodeData
public HierarchyManager getHierarchyManager()
getHierarchyManager
in interface NodeData
public javax.jcr.Property getJCRProperty()
NodeData
getJCRProperty
in interface NodeData
public long getLong()
NodeData
long
representation of the value.
getLong
in interface NodeData
public String getName()
getName
in interface NodeData
public Content getParent() throws AccessDeniedException, javax.jcr.ItemNotFoundException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
NodeData
getParent
in interface NodeData
AccessDeniedException
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
public Content getReferencedContent() throws javax.jcr.RepositoryException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
NodeData
getReferencedContent
in interface NodeData
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException
public Content getReferencedContent(String repositoryId) throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
NodeData
NodeData.getReferencedContent()
but achieves the referenced node from a different workspace.
getReferencedContent
in interface NodeData
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
public InputStream getStream()
NodeData
InputStream
representation of the value.
getStream
in interface NodeData
public String getString()
NodeData
String
representation of the value.
getString
in interface NodeData
public String getString(String lineBreak)
NodeData
String
representation of the value: decodes like breaks with the specified regular
expression.
getString
in interface NodeData
lineBreak
- , regular expression
public int getType()
NodeData
type
of this NodeData
. One of:
PropertyType.STRING
PropertyType.DATE
PropertyType.SOFTLINK
PropertyType.BINARY
PropertyType.DOUBLE
PropertyType.LONG
PropertyType.BOOLEAN
getType
in interface NodeData
public javax.jcr.Value getValue()
NodeData
value
of this NodeData
. One of type:
PropertyType.STRING
PropertyType.DATE
PropertyType.SOFTLINK
PropertyType.BINARY
PropertyType.DOUBLE
PropertyType.LONG
PropertyType.BOOLEAN
getValue
in interface NodeData
public javax.jcr.Value[] getValues()
NodeData
getValues
in interface NodeData
public boolean isExist()
NodeData
isExist
in interface NodeData
public boolean isGranted(long permissions)
NodeData
isGranted
in interface NodeData
permissions
- as defined in javax.jcr.Permission
public int isMultiValue()
NodeData
isMultiValue
in interface NodeData
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
NodeData
refresh
in interface NodeData
javax.jcr.RepositoryException
Item.refresh(boolean)
public void save() throws javax.jcr.RepositoryException
NodeData
save
in interface NodeData
javax.jcr.RepositoryException
public void setAttribute(String name, Calendar value) throws javax.jcr.RepositoryException, AccessDeniedException, UnsupportedOperationException
NodeData
Binary
.
setAttribute
in interface NodeData
javax.jcr.RepositoryException
AccessDeniedException
UnsupportedOperationException
- if its not a Binary typepublic void setAttribute(String name, String value) throws javax.jcr.RepositoryException, AccessDeniedException, UnsupportedOperationException
NodeData
Binary
.
setAttribute
in interface NodeData
javax.jcr.RepositoryException
AccessDeniedException
UnsupportedOperationException
- if its not a Binary typepublic void setValue(boolean value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
boolean
.
setValue
in interface NodeData
value
- , boolean value to be set
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(Calendar value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
Calendar
.
setValue
in interface NodeData
value
- , Calendar value to be set
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(double value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
double
.
setValue
in interface NodeData
value
- , double value to be set
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(InputStream value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
InputStream
.
setValue
in interface NodeData
value
- , InputStream to be set
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(int value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
int
.
setValue
in interface NodeData
value
- , int value to be set
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(long value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
long
.
setValue
in interface NodeData
value
- , long value to be set
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(String value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
String
.
setValue
in interface NodeData
value
- , string to be set
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(Content value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
setValue
in interface NodeData
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(javax.jcr.Value value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
Value
.
setValue
in interface NodeData
javax.jcr.RepositoryException
AccessDeniedException
public void setValue(javax.jcr.Value[] value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
Value[]
.
setValue
in interface NodeData
javax.jcr.RepositoryException
AccessDeniedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |