public class Node extends Object implements StateAccessor
Node
implementation. The actual data is stored in contained objects that are Fragment
s.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Set<String> |
getAllMixinTypes()
Gets the mixins.
|
Object[] |
getArray(String name)
Gets an array value.
|
CollectionProperty |
getCollectionProperty(String name)
Gets a collection property from the node, given its name.
|
Serializable |
getId()
Gets the node unique id, usually a Long or a String.
|
String[] |
getMixinTypes()
Gets the instance mixins.
|
String |
getName() |
Serializable |
getParentId() |
String |
getPath()
Gets the path that was assigned at
Node construction time. |
Long |
getPos() |
String |
getPrimaryType() |
SimpleProperty |
getSimpleProperty(String name)
Gets a simple property from the node, given its name.
|
Object |
getSingle(String name)
Gets a single value.
|
int |
hashCode() |
boolean |
hasMixinType(String mixin)
Checks the mixins.
|
boolean |
isProxy() |
boolean |
isVersion() |
void |
setArray(String name,
Object[] value)
Sets an array value.
|
void |
setCollectionProperty(String name,
Object[] value) |
void |
setSimpleProperty(String name,
Object value) |
void |
setSingle(String name,
Object value)
Sets a single value.
|
String |
toString() |
public Serializable getId()
public String getName()
public Long getPos()
public String getPrimaryType()
public Serializable getParentId()
public String getPath()
Node
construction time. Then it's reset to null
. Should only
be used once.null
for unknownpublic boolean isVersion()
public boolean isProxy()
public String[] getMixinTypes()
Never returns null
.
public Set<String> getAllMixinTypes()
public boolean hasMixinType(String mixin)
public SimpleProperty getSimpleProperty(String name) throws StorageException
name
- the property nameIllegalArgumentException
- if the name is invalidStorageException
public CollectionProperty getCollectionProperty(String name) throws StorageException
name
- the property nameIllegalArgumentException
- if the name is invalidStorageException
public void setSimpleProperty(String name, Object value) throws StorageException
StorageException
public void setCollectionProperty(String name, Object[] value) throws StorageException
StorageException
public Object getSingle(String name) throws PropertyException
StateAccessor
getSingle
in interface StateAccessor
name
- the namePropertyException
public Object[] getArray(String name) throws PropertyException
StateAccessor
getArray
in interface StateAccessor
name
- the namePropertyException
public void setSingle(String name, Object value) throws PropertyException
StateAccessor
setSingle
in interface StateAccessor
name
- the namevalue
- the valuePropertyException
public void setArray(String name, Object[] value) throws PropertyException
StateAccessor
setArray
in interface StateAccessor
name
- the namevalue
- the valuePropertyException
Copyright © 2015 Nuxeo SA. All rights reserved.