@Deprecated public abstract class AbstractJcrNodeAdapter extends AbstractJcrAdapter
Item
wrapping/representing a Node
. Implements {Property.ValueChangeListener} in order to inform/change JCR
property when a Vaadin property has changed. Access JCR repository for all read Jcr Property.UNIDENTIFIED
Constructor and Description |
---|
AbstractJcrNodeAdapter(javax.jcr.Node jcrNode)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
AbstractJcrNodeAdapter |
addChild(AbstractJcrNodeAdapter child)
Deprecated.
Add a child adapter to the current Item.
|
boolean |
addItemProperty(Object id,
com.vaadin.v7.data.Property property)
Deprecated.
Add a new JCR Property.
|
javax.jcr.Node |
applyChanges()
Deprecated.
Returns the JCR Node represented by this Item with changes applied.
|
AbstractJcrNodeAdapter |
getChild(String nodeName)
Deprecated.
|
Map<String,AbstractJcrNodeAdapter> |
getChildren()
Deprecated.
|
com.vaadin.v7.data.Property |
getItemProperty(Object id)
Deprecated.
|
javax.jcr.Node |
getJcrItem()
Deprecated.
Return the corresponding node directly from the JCR repository.
|
String |
getNodeName()
Deprecated.
Return the current Node Name.
|
AbstractJcrNodeAdapter |
getParent()
Deprecated.
Return the current Parent Item (If Item is a child).
|
String |
getPrimaryNodeTypeName()
Deprecated.
Return the Primary node type Name.
|
protected Map<String,AbstractJcrNodeAdapter> |
getRemovedChildren()
Deprecated.
|
boolean |
hasChildItemChanges()
Deprecated.
|
protected void |
initCommonAttributes(javax.jcr.Item jcrItem)
Deprecated.
Init common Item attributes.
|
boolean |
isNode()
Deprecated.
|
protected void |
markPropertyForDeletion(String propertyId)
Deprecated.
Marks the given property ID for removal upon next properties update (typically via #applyChanges).
|
boolean |
removeChild(AbstractJcrNodeAdapter toRemove)
Deprecated.
Remove a child Node from the child list.
|
void |
setNodeName(String nodeName)
Deprecated.
|
void |
setParent(AbstractJcrNodeAdapter parent)
Deprecated.
|
protected void |
setPrimaryNodeTypeName(String primaryNodeTypeName)
Deprecated.
|
void |
updateChildren(javax.jcr.Node node)
Deprecated.
Updates and removes children based on the
children and removedChildren maps. |
void |
updateProperties(javax.jcr.Item item)
Deprecated.
Updates and removes properties on given item, based on the
AbstractJcrAdapter.changedProperties and AbstractJcrAdapter.removedProperties maps. |
protected void |
updateProperty(javax.jcr.Item item,
String propertyId,
com.vaadin.v7.data.Property property)
Deprecated.
Update or remove property.
|
getChangedProperties, getItemId, getRemovedProperties, getWorkspace, hasChangedProperties, setItemId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isNew
public AbstractJcrNodeAdapter(javax.jcr.Node jcrNode)
public boolean isNode()
protected void initCommonAttributes(javax.jcr.Item jcrItem)
AbstractJcrAdapter
initCommonAttributes
in class AbstractJcrAdapter
protected void setPrimaryNodeTypeName(String primaryNodeTypeName)
public String getPrimaryNodeTypeName()
protected Map<String,AbstractJcrNodeAdapter> getRemovedChildren()
public javax.jcr.Node getJcrItem()
getJcrItem
in interface JcrItemAdapter
getJcrItem
in class AbstractJcrAdapter
public boolean addItemProperty(Object id, com.vaadin.v7.data.Property property)
public com.vaadin.v7.data.Property getItemProperty(Object id)
public javax.jcr.Node applyChanges() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void updateChildren(javax.jcr.Node node) throws javax.jcr.RepositoryException
children
and removedChildren
maps.
TODO: Has been made public as of MGNLUI-3124 resolution. Needs further API improvement (e.g. no-arg version or possibly some other better way to update the JCR node internals).javax.jcr.RepositoryException
public void updateProperties(javax.jcr.Item item) throws javax.jcr.RepositoryException
AbstractJcrAdapter
AbstractJcrAdapter.changedProperties
and AbstractJcrAdapter.removedProperties
maps. Read-only properties will not be updated and null valued properties will get removed.updateProperties
in class AbstractJcrAdapter
javax.jcr.RepositoryException
protected void updateProperty(javax.jcr.Item item, String propertyId, com.vaadin.v7.data.Property property)
updateProperties(javax.jcr.Item)
we have to make sure it is removed before running in here as Item.removeItemProperty(Object)
is manipulating the AbstractJcrAdapter.changedProperties
list directly.updateProperty
in class AbstractJcrAdapter
protected void markPropertyForDeletion(String propertyId)
public AbstractJcrNodeAdapter getChild(String nodeName)
nodeName
- name of the child nodepublic Map<String,AbstractJcrNodeAdapter> getChildren()
public AbstractJcrNodeAdapter addChild(AbstractJcrNodeAdapter child)
public boolean removeChild(AbstractJcrNodeAdapter toRemove)
public AbstractJcrNodeAdapter getParent()
public void setParent(AbstractJcrNodeAdapter parent)
public String getNodeName()
public void setNodeName(String nodeName)
public boolean hasChildItemChanges()
Item
was added or removed, false otherwise.Copyright © 2019 Magnolia International Ltd.. All rights reserved.