|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.jcrutil.BasicDaoFactory
public class BasicDaoFactory
Field Summary | |
---|---|
static String |
JRC_REPOSITORY
|
Method Summary | |
---|---|
static void |
addCalendarProperty(javax.jcr.Node node,
String propertyName,
Calendar value)
Defines the Calendar value of a JCR Node's property. |
static void |
addDateProperty(javax.jcr.Node node,
String propertyName,
Date value)
Defines the Calendar value of a JCR Node's property. |
static void |
addStringProperty(javax.jcr.Node node,
String propertyName,
String value)
Defines the value of a JCR Node's property. |
static 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. |
protected org.springframework.context.ApplicationContext |
getApplicationContext()
|
static javax.jcr.Session |
getAuthentifiedSession(String login,
String password)
Create a system JCR session |
static Object |
getBean(String name)
|
static Calendar |
getCalendarProperty(javax.jcr.Node node,
String propertyName)
Return the property value as Calendar for a JCR Node. |
static String |
getComponentId(javax.jcr.Node node)
Compute the componentId corresponding to the specified node by checking the name of the first Ancestor. |
static byte[] |
getContent(javax.jcr.Node fileNode)
|
static void |
getContent(javax.jcr.Node fileNode,
OutputStream out)
|
static Date |
getDateProperty(javax.jcr.Node node,
String propertyName)
Return the property value as java.util.Date for a JCR Node. |
static BasicDaoFactory |
getInstance()
|
static int |
getIntProperty(javax.jcr.Node node,
String propertyName)
Return the property value as an int for a JCR Node. |
static long |
getLongProperty(javax.jcr.Node node,
String propertyName)
Return the property value as an long for a JCR Node. |
static long |
getSize(javax.jcr.Node contentNode)
|
static String |
getStringProperty(javax.jcr.Node node,
String propertyName)
Return the property value as String for a JCR Node. |
static javax.jcr.Session |
getSystemSession()
Create a system JCR session |
static void |
logout(javax.jcr.Session session)
Logout of the JCR session |
static javax.jcr.Value[] |
removeReference(javax.jcr.Value[] values,
String uuid)
Remove a reference from an array of javax.jcr.Value. |
void |
setApplicationContext(org.springframework.context.ApplicationContext context)
|
static void |
setContent(javax.jcr.Node fileNode,
byte[] content,
String mimeType)
|
static void |
setContent(javax.jcr.Node fileNode,
File file,
String mimeType)
|
static 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 |
Field Detail |
---|
public static final String JRC_REPOSITORY
Method Detail |
---|
protected org.springframework.context.ApplicationContext getApplicationContext()
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public static BasicDaoFactory getInstance()
public static Object getBean(String name)
public static javax.jcr.Session getSystemSession() throws javax.jcr.LoginException, javax.jcr.RepositoryException
javax.jcr.LoginException
javax.jcr.RepositoryException
public static javax.jcr.Session getAuthentifiedSession(String login, String password) throws javax.jcr.LoginException, javax.jcr.RepositoryException
login
- the user's login.password
- the user's password.
javax.jcr.LoginException
javax.jcr.RepositoryException
public static void logout(javax.jcr.Session session)
session
- the session to be closed.public static 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 static 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 static 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 static 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
public static 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
public static 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
public static 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
public static 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
public static 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
public static 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
public static String computeUniqueName(String prefix, String tableName) throws UtilException
prefix
- tableName
- the name of the column used to stored the id.
UtilException
public static void setContent(javax.jcr.Node fileNode, InputStream content, String mimeType) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static void setContent(javax.jcr.Node fileNode, File file, String mimeType) throws javax.jcr.RepositoryException, IOException
javax.jcr.RepositoryException
IOException
public static void setContent(javax.jcr.Node fileNode, byte[] content, String mimeType) throws javax.jcr.RepositoryException, IOException
javax.jcr.RepositoryException
IOException
public static byte[] getContent(javax.jcr.Node fileNode) throws javax.jcr.RepositoryException, IOException
javax.jcr.RepositoryException
IOException
public static void getContent(javax.jcr.Node fileNode, OutputStream out) throws javax.jcr.RepositoryException, IOException
javax.jcr.RepositoryException
IOException
public static long getSize(javax.jcr.Node contentNode) throws javax.jcr.ValueFormatException, javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
javax.jcr.ValueFormatException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |