|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.core.AbstractNodeData info.magnolia.cms.core.BinaryNodeData
public class BinaryNodeData
A node data hiding the fact that node datas of type BINARY are stored as nodes of type ItemType.NT_RESOURCE
.
Field Summary |
---|
Fields inherited from class info.magnolia.cms.core.AbstractNodeData |
---|
name, parent |
Fields inherited from interface info.magnolia.cms.core.NodeData |
---|
MULTIVALUE_FALSE, MULTIVALUE_TRUE, MULTIVALUE_UNDEFINED |
Constructor Summary | |
---|---|
protected |
BinaryNodeData(Content parent,
java.lang.String name)
|
Method Summary | |
---|---|
void |
delete()
Remove this path. |
java.lang.String |
getAttribute(java.lang.String name)
get attribute, available only if NodeData is of type Binary . |
java.util.Collection<java.lang.String> |
getAttributeNames()
get all attribute names. |
protected javax.jcr.Node |
getBinaryNode(boolean createIfNotExisting)
|
boolean |
getBoolean()
Returns the boolean representation of the value. |
protected Content |
getContentFromJCRReference()
Specific implementation for retrieving the referenced node when using a property of type REFERENCE. |
long |
getContentLength()
returns size in bytes. |
java.util.Calendar |
getDate()
Returns the Calendar representation of the value. |
double |
getDouble()
Returns the double representation of the value. |
javax.jcr.Property |
getJCRProperty()
Access to property at the JCR level. |
long |
getLong()
Returns the long representation of the value. |
Content |
getReferencedContent()
Returns the Content that this NodeData references (if its type is PropertyType.REFERENCE). |
Content |
getReferencedContent(java.lang.String repositoryId)
Same as NodeData.getReferencedContent() but achieves the referenced node from a different workspace. |
java.io.InputStream |
getStream()
Returns the InputStream representation of the value. |
java.lang.String |
getString()
Returns the String representation of the value. |
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. |
boolean |
isExist()
checks if the atom exists in the repository. |
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(java.lang.String name,
java.util.Calendar value)
set attribute, available only if NodeData is of type Binary . |
void |
setAttribute(java.lang.String name,
java.lang.String value)
set attribute, available only if NodeData is of type Binary . |
void |
setValue(boolean value)
set value of type boolean . |
void |
setValue(java.util.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(java.io.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(java.lang.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[] . |
Methods inherited from class info.magnolia.cms.core.AbstractNodeData |
---|
getHandle, getHierarchyManager, getName, getParent, getReferencedContent, getString, isGranted, setParent, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected BinaryNodeData(Content parent, java.lang.String name)
Method Detail |
---|
public javax.jcr.Property getJCRProperty()
NodeData
protected javax.jcr.Node getBinaryNode(boolean createIfNotExisting)
public boolean isExist()
NodeData
public java.io.InputStream getStream()
NodeData
InputStream
representation of the value.
public void setValue(java.io.InputStream value) throws javax.jcr.RepositoryException, AccessDeniedException
NodeData
InputStream
.
value
- , InputStream to be set
javax.jcr.RepositoryException
AccessDeniedException
public void delete() throws javax.jcr.RepositoryException
NodeData
javax.jcr.RepositoryException
public void setAttribute(java.lang.String name, java.lang.String value) throws javax.jcr.RepositoryException, AccessDeniedException, java.lang.UnsupportedOperationException
NodeData
Binary
.
setAttribute
in interface NodeData
setAttribute
in class AbstractNodeData
javax.jcr.RepositoryException
AccessDeniedException
java.lang.UnsupportedOperationException
- if its not a Binary typepublic void setAttribute(java.lang.String name, java.util.Calendar value) throws javax.jcr.RepositoryException, AccessDeniedException, java.lang.UnsupportedOperationException
NodeData
Binary
.
setAttribute
in interface NodeData
setAttribute
in class AbstractNodeData
javax.jcr.RepositoryException
AccessDeniedException
java.lang.UnsupportedOperationException
- if its not a Binary typepublic java.lang.String getAttribute(java.lang.String name)
NodeData
Binary
.
getAttribute
in interface NodeData
getAttribute
in class AbstractNodeData
public java.util.Collection<java.lang.String> getAttributeNames() throws javax.jcr.RepositoryException
NodeData
getAttributeNames
in interface NodeData
getAttributeNames
in class AbstractNodeData
javax.jcr.RepositoryException
public int getType()
NodeData
type
of this NodeData
. One of:
PropertyType.STRING
PropertyType.DATE
PropertyType.SOFTLINK
PropertyType.BINARY
PropertyType.DOUBLE
PropertyType.LONG
PropertyType.BOOLEAN
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
public long getContentLength()
NodeData
public int isMultiValue()
NodeData
isMultiValue
in interface NodeData
isMultiValue
in class AbstractNodeData
public void refresh(boolean keepChanges) throws javax.jcr.RepositoryException
NodeData
javax.jcr.RepositoryException
Item.refresh(boolean)
public void save() throws javax.jcr.RepositoryException
NodeData
javax.jcr.RepositoryException
public Content getReferencedContent() throws javax.jcr.RepositoryException
NodeData
getReferencedContent
in interface NodeData
getReferencedContent
in class AbstractNodeData
javax.jcr.RepositoryException
public Content getReferencedContent(java.lang.String repositoryId) throws javax.jcr.RepositoryException
NodeData
NodeData.getReferencedContent()
but achieves the referenced node from a different workspace.
getReferencedContent
in interface NodeData
getReferencedContent
in class AbstractNodeData
javax.jcr.RepositoryException
protected Content getContentFromJCRReference() throws javax.jcr.RepositoryException
AbstractNodeData
getContentFromJCRReference
in class AbstractNodeData
javax.jcr.RepositoryException
public java.lang.String getString()
NodeData
String
representation of the value.
public java.util.Calendar getDate()
NodeData
Calendar
representation of the value.
public boolean getBoolean()
NodeData
boolean
representation of the value.
public double getDouble()
NodeData
double
representation of the value.
public long getLong()
NodeData
long
representation of the value.
public javax.jcr.Value[] getValues()
NodeData
public void setValue(java.lang.String value) throws javax.jcr.RepositoryException
NodeData
String
.
value
- , string to be set
javax.jcr.RepositoryException
public void setValue(int value) throws javax.jcr.RepositoryException
NodeData
int
.
value
- , int value to be set
javax.jcr.RepositoryException
public void setValue(long value) throws javax.jcr.RepositoryException
NodeData
long
.
value
- , long value to be set
javax.jcr.RepositoryException
public void setValue(double value) throws javax.jcr.RepositoryException
NodeData
double
.
value
- , double value to be set
javax.jcr.RepositoryException
public void setValue(boolean value) throws javax.jcr.RepositoryException
NodeData
boolean
.
value
- , boolean value to be set
javax.jcr.RepositoryException
public void setValue(java.util.Calendar value) throws javax.jcr.RepositoryException
NodeData
Calendar
.
value
- , Calendar value to be set
javax.jcr.RepositoryException
public void setValue(Content value) throws javax.jcr.RepositoryException
NodeData
javax.jcr.RepositoryException
public void setValue(javax.jcr.Value value) throws javax.jcr.RepositoryException
NodeData
Value
.
javax.jcr.RepositoryException
public void setValue(javax.jcr.Value[] value) throws javax.jcr.RepositoryException
NodeData
Value[]
.
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |