|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.util.jcr.AbstractJcrConverter
public abstract class AbstractJcrConverter
Constructor Summary | |
---|---|
AbstractJcrConverter()
|
Method Summary | |
---|---|
void |
addCalendarProperty(javax.jcr.Node node,
String propertyName,
Calendar value)
Defines the Calendar value of a JCR Node's property. |
void |
addDateProperty(javax.jcr.Node node,
String propertyName,
Date value)
Defines the Calendar value of a JCR Node's property. |
void |
addStringProperty(javax.jcr.Node node,
String propertyName,
String value)
Defines the value of a JCR Node's property. |
protected String |
computeUniqueName(String prefix,
String tableName)
Compute a unique node name if a node with the same name already exists under the same parent node. |
javax.jcr.Binary |
getBinaryContent(javax.jcr.Node fileNode)
|
protected boolean |
getBooleanProperty(javax.jcr.Node node,
String propertyName)
Return the property value as a boolean for a JCR Node. |
protected Calendar |
getCalendarProperty(javax.jcr.Node node,
String propertyName)
Return the property value as Calendar for a JCR Node. |
protected String |
getComponentId(javax.jcr.Node node)
Compute the componentId corresponding to the specified node by checking the name of the first Ancestor. |
byte[] |
getContent(javax.jcr.Node fileNode)
|
void |
getContent(javax.jcr.Node fileNode,
OutputStream out)
|
String |
getContentMimeType(javax.jcr.Node fileNode)
Returns the mime-type of the jcr:content node stored in the fileNode. |
long |
getContentSize(javax.jcr.Node fileNode)
Return the size of the file in the jcr:content node which is a child node of the specified node. |
protected Date |
getDateProperty(javax.jcr.Node node,
String propertyName)
Return the property value as java.util.Date for a JCR Node. |
javax.jcr.Node |
getFolder(javax.jcr.Node parent,
String name)
Return the node whith the specified parent and name. |
protected int |
getIntProperty(javax.jcr.Node node,
String propertyName)
Return the property value as an int for a JCR Node. |
protected long |
getLongProperty(javax.jcr.Node node,
String propertyName)
Return the property value as an long for a JCR Node. |
protected String |
getStringProperty(javax.jcr.Node node,
String propertyName)
Return the property value as String for a JCR Node. |
boolean |
isMixinApplied(javax.jcr.Node node,
String mixin)
Return true if the specified mixin type is explicitly assigned to the node. |
protected javax.jcr.Value[] |
removeReference(javax.jcr.Value[] values,
String uuid)
Remove a reference from an array of javax.jcr.Value. |
void |
setContent(javax.jcr.Node fileNode,
byte[] content,
String mimeType)
Add binary content to the specified node. |
void |
setContent(javax.jcr.Node fileNode,
File file,
String mimeType)
|
void |
setContent(javax.jcr.Node fileNode,
InputStream content,
String mimeType)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractJcrConverter()
Method Detail |
---|
protected String getStringProperty(javax.jcr.Node node, String propertyName) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
node
- the node whose property is required.propertyName
- the name of the property required.
javax.jcr.RepositoryException
javax.jcr.ValueFormatException
protected String getComponentId(javax.jcr.Node node) throws javax.jcr.ItemNotFoundException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
node
- the node whose componentId is required.
javax.jcr.ItemNotFoundException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException
public void addStringProperty(javax.jcr.Node node, String propertyName, String value) throws javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
node
- the node whose property is being set.propertyName
- the name of the property being set.value
- the value being set. If it is null then the property is removed.
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public void addDateProperty(javax.jcr.Node node, String propertyName, Date value) throws javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
node
- the node whose property is being set.propertyName
- the name of the property being set.value
- the value being set. If it is null then the property is removed.
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
public void addCalendarProperty(javax.jcr.Node node, String propertyName, Calendar value) throws javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
node
- the node whose property is being set.propertyName
- the name of the property being set.value
- the value being set. If it is null then the property is removed.
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.RepositoryException
protected Calendar getCalendarProperty(javax.jcr.Node node, String propertyName) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
node
- the node whose property is required.propertyName
- the name of the property required.
javax.jcr.RepositoryException
javax.jcr.ValueFormatException
protected Date getDateProperty(javax.jcr.Node node, String propertyName) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
node
- the node whose property is required.propertyName
- the name of the property required.
javax.jcr.RepositoryException
javax.jcr.ValueFormatException
protected int getIntProperty(javax.jcr.Node node, String propertyName) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
node
- the node whose property is required.propertyName
- the name of the property required.
javax.jcr.RepositoryException
javax.jcr.ValueFormatException
protected boolean getBooleanProperty(javax.jcr.Node node, String propertyName) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
node
- the node whose property is required.propertyName
- the name of the property required.
javax.jcr.RepositoryException
javax.jcr.ValueFormatException
protected long getLongProperty(javax.jcr.Node node, String propertyName) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
node
- the node whose property is required.propertyName
- the name of the property required.
javax.jcr.RepositoryException
javax.jcr.ValueFormatException
protected javax.jcr.Value[] removeReference(javax.jcr.Value[] values, String uuid) throws javax.jcr.ValueFormatException, IllegalStateException, javax.jcr.RepositoryException
values
- the array of referencesuuid
- the reference to be removed
javax.jcr.ValueFormatException
IllegalStateException
javax.jcr.RepositoryException
protected String computeUniqueName(String prefix, String tableName) throws UtilException
prefix
- tableName
- the name of the column used to stored the id.
UtilException
public void setContent(javax.jcr.Node fileNode, InputStream content, String mimeType) throws javax.jcr.RepositoryException
fileNode
- content
- mimeType
-
javax.jcr.RepositoryException
public String getContentMimeType(javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
fileNode
-
javax.jcr.RepositoryException
public long getContentSize(javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
fileNode
-
javax.jcr.RepositoryException
public void setContent(javax.jcr.Node fileNode, File file, String mimeType) throws javax.jcr.RepositoryException
fileNode
- file
- mimeType
-
javax.jcr.RepositoryException
public void setContent(javax.jcr.Node fileNode, byte[] content, String mimeType) throws javax.jcr.RepositoryException
fileNode
- the node.content
- the binary content.mimeType
- the mime type of the content.
javax.jcr.RepositoryException
public byte[] getContent(javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
fileNode
-
javax.jcr.RepositoryException
public javax.jcr.Binary getBinaryContent(javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
fileNode
-
javax.jcr.RepositoryException
public void getContent(javax.jcr.Node fileNode, OutputStream out) throws javax.jcr.RepositoryException, IOException
fileNode
- out
-
javax.jcr.RepositoryException
IOException
public javax.jcr.Node getFolder(javax.jcr.Node parent, String name) throws javax.jcr.RepositoryException
parent
- parent node of the folder.name
- name of the folder.
javax.jcr.RepositoryException
public boolean isMixinApplied(javax.jcr.Node node, String mixin) throws javax.jcr.RepositoryException
node
- the node on which we are looking for the specified mixin.mixin
- the name of the mixin.
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |