-com.lamsinternational.* | +org.lamsfoundation.*
com.lamsinternational.lams.contentrepository.IRepository | +org.lamsfoundation.lams.contentrepository.IRepository | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-REPOSITORY_CONTEXT_PATH |
-"/com/lamsinternational/lams/contentrepository/contentRepositoryApplicationContext.xml" |
+REPOSITORY_CONTEXT_PATH |
+"/org/lamsfoundation/lams/contentrepository/contentRepositoryApplicationContext.xml" |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-REPOSITORY_SERVICE_ID |
+REPOSITORY_SERVICE_ID |
"repositoryService" |
com.lamsinternational.lams.contentrepository.NodeType | +org.lamsfoundation.lams.contentrepository.NodeType | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-DATANODE |
+DATANODE |
"DATANODE" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-FILENODE |
+FILENODE |
"FILENODE" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-PACKAGENODE |
+PACKAGENODE |
"PACKAGENODE" |
com.lamsinternational.lams.contentrepository.PropertyName | +org.lamsfoundation.lams.contentrepository.PropertyName | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-FILENAME |
+FILENAME |
"FILENAME" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-INITIALPATH |
+INITIALPATH |
"INITIALPATH" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-MIMETYPE |
+MIMETYPE |
"MIMETYPE" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-VERSIONDESC |
+VERSIONDESC |
"VERSIONDESC" |
com.lamsinternational.lams.contentrepository.PropertyType | +org.lamsfoundation.lams.contentrepository.PropertyType | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final int |
-BOOLEAN |
+BOOLEAN |
5 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final int |
-DATE |
+DATE |
4 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final int |
-DOUBLE |
+DOUBLE |
3 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final int |
-LONG |
+LONG |
2 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final int |
-STRING |
+STRING |
1 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-TYPENAME_BOOLEAN |
+TYPENAME_BOOLEAN |
"Boolean" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-TYPENAME_DATE |
+TYPENAME_DATE |
"Date" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-TYPENAME_DOUBLE |
+TYPENAME_DOUBLE |
"Double" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-TYPENAME_LONG |
+TYPENAME_LONG |
"Long" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final java.lang.String |
-TYPENAME_STRING |
+TYPENAME_STRING |
"String" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
public static final int |
-UNDEFINED |
+UNDEFINED |
0 |
com.lamsinternational.lams.contentrepository.struts.action.RepositoryDispatchAction | +org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction | ||||
+ |
public static final java.lang.String |
-ERROR_PATH |
+ERROR_PATH |
"error" |
|
+ |
public static final java.lang.String |
-LOGOUT_PATH |
+LOGOUT_PATH |
"logout" |
|
+ |
public static final java.lang.String |
-NODE_LIST_NAME |
+NODE_LIST_NAME |
"nodeList" |
|
+ |
public static final java.lang.String |
-PACKAGE_LIST |
+PACKAGE_LIST |
"packageList" |
|
+ |
public static final java.lang.String |
-SUCCESS_PATH |
+SUCCESS_PATH |
"success" |
|
+ |
public static final java.lang.String |
-TICKET_NAME |
+TICKET_NAME |
"ticket" |
|
+ |
public static final java.lang.String |
-UUID_NAME |
+UUID_NAME |
"uuid" |
|
+ |
public static final java.lang.String |
-VERSION_NAME |
+VERSION_NAME |
"version" |
|
com.lamsinternational.lams.contentrepository | +org.lamsfoundation.lams.contentrepository | This content repository is designed to store single files and packages of files on disk in a relatively. | |||
com.lamsinternational.lams.contentrepository.dao | +org.lamsfoundation.lams.contentrepository.dao | ||||
com.lamsinternational.lams.contentrepository.dao.file | +org.lamsfoundation.lams.contentrepository.dao.file | ||||
com.lamsinternational.lams.contentrepository.dao.hibernate | +org.lamsfoundation.lams.contentrepository.dao.hibernate | ||||
com.lamsinternational.lams.contentrepository.struts.action | +org.lamsfoundation.lams.contentrepository.struts.action | ||||
com.lamsinternational.lams.contentrepository.struts.form | +org.lamsfoundation.lams.contentrepository.struts.form |
-Package com.lamsinternational.lams.contentrepository.struts.action | +Package org.lamsfoundation.lams.contentrepository.struts.form
-Class com.lamsinternational.lams.contentrepository.struts.action.Download extends javax.servlet.http.HttpServlet implements Serializable | +Class org.lamsfoundation.lams.contentrepository.struts.form.AddFileContentForm extends org.apache.struts.action.ActionForm implements Serializable
- -
-
-Package com.lamsinternational.lams.contentrepository.struts.form | -
-Class com.lamsinternational.lams.contentrepository.struts.form.AddFileContentForm extends org.apache.struts.action.ActionForm implements Serializable | -
-Class com.lamsinternational.lams.contentrepository.struts.form.LoginRepositoryForm extends org.apache.struts.action.ActionForm implements Serializable | +Class org.lamsfoundation.lams.contentrepository.struts.form.LoginRepositoryForm extends org.apache.struts.action.ActionForm implements Serializable
-Class com.lamsinternational.lams.contentrepository.struts.form.NodeSelectionForm extends org.apache.struts.action.ActionForm implements Serializable | +Class org.lamsfoundation.lams.contentrepository.struts.form.NodeSelectionForm extends org.apache.struts.action.ActionForm implements Serializable
+Package org.lamsfoundation.lams.contentrepository.struts.action | +
-Class com.lamsinternational.lams.contentrepository.AccessDeniedException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.struts.action.Download extends javax.servlet.http.HttpServlet implements Serializable
+Class org.lamsfoundation.lams.contentrepository.struts.action.TestLogin extends javax.servlet.http.HttpServlet implements Serializable | +
+ +
-Class com.lamsinternational.lams.contentrepository.CrCredential extends java.lang.Object implements Serializable | +Class org.lamsfoundation.lams.contentrepository.AccessDeniedException extends RepositoryCheckedException implements Serializable
+ +
+
+Class org.lamsfoundation.lams.contentrepository.CrCredential extends java.lang.Object implements Serializable | +
-Class com.lamsinternational.lams.contentrepository.CrNode extends java.lang.Object implements Serializable | +Class org.lamsfoundation.lams.contentrepository.CrNode extends java.lang.Object implements Serializable
-CrWorkspace crWorkspace+CrWorkspace crWorkspace
@@ -461,11 +472,11 @@
-Class com.lamsinternational.lams.contentrepository.CrNodeVersion extends java.lang.Object implements Serializable | +Class org.lamsfoundation.lams.contentrepository.CrNodeVersion extends java.lang.Object implements Serializable
-CrNode node+CrNode node
@@ -531,7 +542,7 @@
-CrNodeVersion parentNodeVersion+CrNodeVersion parentNodeVersion
@@ -565,11 +576,11 @@
-Class com.lamsinternational.lams.contentrepository.CrNodeVersionProperty extends java.lang.Object implements Serializable | +Class org.lamsfoundation.lams.contentrepository.CrNodeVersionProperty extends java.lang.Object implements Serializable
-CrNodeVersion crNodeVersion+CrNodeVersion crNodeVersion
@@ -653,11 +664,11 @@
-Class com.lamsinternational.lams.contentrepository.CrWorkspace extends java.lang.Object implements Serializable | +Class org.lamsfoundation.lams.contentrepository.CrWorkspace extends java.lang.Object implements Serializable
-Class com.lamsinternational.lams.contentrepository.CrWorkspaceCredential extends java.lang.Object implements Serializable | +Class org.lamsfoundation.lams.contentrepository.CrWorkspaceCredential extends java.lang.Object implements Serializable
-CrWorkspace crWorkspace+CrWorkspace crWorkspace
@@ -763,7 +774,7 @@
-CrCredential crCredential+CrCredential crCredential
@@ -773,107 +784,107 @@
-Class com.lamsinternational.lams.contentrepository.FileException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.FileException extends RepositoryCheckedException implements Serializable
-Class com.lamsinternational.lams.contentrepository.InvalidParameterException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.InvalidParameterException extends RepositoryCheckedException implements Serializable
-Class com.lamsinternational.lams.contentrepository.ItemExistsException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.ItemExistsException extends RepositoryCheckedException implements Serializable
-Class com.lamsinternational.lams.contentrepository.ItemNotFoundException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.ItemNotFoundException extends RepositoryCheckedException implements Serializable
-Class com.lamsinternational.lams.contentrepository.LoginException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.LoginException extends RepositoryCheckedException implements Serializable
-Class com.lamsinternational.lams.contentrepository.NoSuchNodeTypeException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.NoSuchNodeTypeException extends RepositoryCheckedException implements Serializable
-Class com.lamsinternational.lams.contentrepository.RepositoryCheckedException extends java.lang.Exception implements Serializable | +Class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException extends java.lang.Exception implements Serializable
-Class com.lamsinternational.lams.contentrepository.RepositoryRuntimeException extends java.lang.RuntimeException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.RepositoryRuntimeException extends java.lang.RuntimeException implements Serializable
-Class com.lamsinternational.lams.contentrepository.SimpleCredentials extends java.lang.Object implements Serializable | +Class org.lamsfoundation.lams.contentrepository.SimpleCredentials extends java.lang.Object implements Serializable
-Class com.lamsinternational.lams.contentrepository.ValidationException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.ValidationException extends RepositoryCheckedException implements Serializable
-Class com.lamsinternational.lams.contentrepository.ValueFormatException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.ValueFormatException extends RepositoryCheckedException implements Serializable
-Class com.lamsinternational.lams.contentrepository.WorkspaceNotFoundException extends RepositoryCheckedException implements Serializable | +Class org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException extends RepositoryCheckedException implements Serializable
+
+
|
++ + | +||||||||||
+ PREV LETTER + NEXT LETTER | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV LETTER + NEXT LETTER | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.AccessDeniedException +
+The current ticket doesn't have sufficient rights for the requested action. +
+ +
+
+Constructor Summary | +|
AccessDeniedException()
+
++ Constructs a new instance of this class. |
+|
AccessDeniedException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
AccessDeniedException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
AccessDeniedException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public AccessDeniedException()+
+
+public AccessDeniedException(java.lang.String s)+
+
s
- description+public AccessDeniedException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public AccessDeniedException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.AllTests +
+Runs all the currently implemented tests for the Content Repository. + Before running, load the test data in the database, clear + the repository and check that the files listed in BaseTestCase + exist. +
+ +
+
+Constructor Summary | +|
AllTests()
+
++ |
+
+Method Summary | +|
+static junit.framework.Test |
+suite()
+
++ |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public AllTests()+
+Method Detail | +
+public static junit.framework.Test suite()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++junit.framework.Assert +
junit.framework.TestCase +
org.lamsfoundation.lams.contentrepository.BaseTestCase +
+
+Constructor Summary | +|
BaseTestCase()
+
++ |
+
Methods inherited from class junit.framework.TestCase | +
countTestCases, getName, run, run, runBare, setName, toString |
+
Methods inherited from class junit.framework.Assert | +
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public BaseTestCase()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.CheckCredentialTicketBeforeAdvice +
+Ticket checking functionality for implementers of IRepositoryAdmin. + + All calls to IRepositoryAdmin must have either ICredential or ITicket as + their first parameter. In any case, the parameter must not be null. + + If the first argument is missing then it throws an AccessDeniedException +
+ +
+
+Constructor Summary | +|
CheckCredentialTicketBeforeAdvice()
+
++ |
+
+Method Summary | +|
+ void |
+before(java.lang.reflect.Method m,
+ java.lang.Object[] args,
+ java.lang.Object target)
+
++ |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public CheckCredentialTicketBeforeAdvice()+
+Method Detail | +
+public void before(java.lang.reflect.Method m, + java.lang.Object[] args, + java.lang.Object target) + throws AccessDeniedException, + RepositoryRuntimeException+
before
in interface org.springframework.aop.MethodBeforeAdvice
AccessDeniedException
- if the first parameter is null or it is an unrecognised ticket.
+RuntimeRepositoryException
- if the method has as its first parameter an object that is not
+ an ICredential or an ITicket
+RepositoryRuntimeException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.CrCredential +
+
+Constructor Summary | +|
CrCredential()
+
++ default constructor |
+|
CrCredential(java.lang.String name,
+ java.lang.String password,
+ java.util.Set crWorkspaceCredentials)
+
++ full constructor |
+
+Method Summary | +|
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ java.lang.Long |
+getCredentialId()
+
++ |
+
+ java.util.Set |
+getCrWorkspaceCredentials()
+
++ |
+
+ java.lang.String |
+getName()
+
++ |
+
+ java.lang.String |
+getPassword()
+
++ |
+
+ int |
+hashCode()
+
++ |
+
+ void |
+setCredentialId(java.lang.Long credentialId)
+
++ |
+
+ void |
+setCrWorkspaceCredentials(java.util.Set crWorkspaceCredentials)
+
++ |
+
+ void |
+setName(java.lang.String name)
+
++ |
+
+ void |
+setPassword(java.lang.String password)
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public CrCredential(java.lang.String name, + java.lang.String password, + java.util.Set crWorkspaceCredentials)+
+
+public CrCredential()+
+
+Method Detail | +
+public java.lang.Long getCredentialId()+
+public void setCredentialId(java.lang.Long credentialId)+
+public java.lang.String getName()+
+public void setName(java.lang.String name)+
+public java.lang.String getPassword()+
+public void setPassword(java.lang.String password)+
+public java.util.Set getCrWorkspaceCredentials()+
+public void setCrWorkspaceCredentials(java.util.Set crWorkspaceCredentials)+
+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.CrNode +
+
+Constructor Summary | +|
CrNode()
+
++ default constructor |
+|
CrNode(java.lang.String type,
+ java.lang.Long nextVersionId,
+ CrWorkspace crWorkspace,
+ java.util.Set crNodeVersions)
+
++ minimal constructor |
+|
CrNode(java.lang.String path,
+ java.lang.String type,
+ java.util.Date createdDateTime,
+ java.lang.Long nextVersionId,
+ CrWorkspace crWorkspace,
+ java.util.Set crNodeVersions)
+
++ full constructor |
+
+Method Summary | +|
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ java.util.Date |
+getCreatedDateTime()
+
++ |
+
+ java.util.Set |
+getCrNodeVersions()
+
++ |
+
+ CrWorkspace |
+getCrWorkspace()
+
++ |
+
+ java.lang.Long |
+getNextVersionId()
+
++ |
+
+ java.lang.Long |
+getNodeId()
+
++ |
+
+ CrNodeVersion |
+getNodeVersion(java.lang.Long versionId)
+
++ Get a particular version of this node |
+
+ java.lang.String |
+getPath()
+
++ |
+
+ java.lang.String |
+getType()
+
++ |
+
+ java.util.SortedSet |
+getVersionHistory()
+
++ Get the history for this node. |
+
+ java.lang.Long[] |
+getVersionIds()
+
++ Get a list of all the versions - just the Long value. |
+
+ int |
+hashCode()
+
++ |
+
+ java.lang.Long |
+incrementNextVersionId()
+
++ Get the next version id for this node and then + increment it. |
+
+ boolean |
+isNodeType(java.lang.String nodeTypeName)
+
++ Indicates whether this node is of the specified node type. |
+
+ void |
+setCreatedDateTime(java.util.Date createdDateTime)
+
++ |
+
+ void |
+setCrNodeVersions(java.util.Set crNodeVersions)
+
++ |
+
+ void |
+setCrWorkspace(CrWorkspace crWorkspace)
+
++ |
+
+ void |
+setNextVersionId(java.lang.Long nextVersionId)
+
++ |
+
+ void |
+setNodeId(java.lang.Long nodeId)
+
++ |
+
+ void |
+setPath(java.lang.String path)
+
++ |
+
+ void |
+setType(java.lang.String type)
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public CrNode(java.lang.String path, + java.lang.String type, + java.util.Date createdDateTime, + java.lang.Long nextVersionId, + CrWorkspace crWorkspace, + java.util.Set crNodeVersions)+
+
+public CrNode()+
+
+public CrNode(java.lang.String type, + java.lang.Long nextVersionId, + CrWorkspace crWorkspace, + java.util.Set crNodeVersions)+
+
+Method Detail | +
+public java.lang.Long getNodeId()+
+public void setNodeId(java.lang.Long nodeId)+
+public java.lang.String getPath()+
+public void setPath(java.lang.String path)+
+public java.lang.String getType()+
+public void setType(java.lang.String type)+
+public java.util.Date getCreatedDateTime()+
+public void setCreatedDateTime(java.util.Date createdDateTime)+
+public java.lang.Long getNextVersionId()+
+public void setNextVersionId(java.lang.Long nextVersionId)+
+public CrWorkspace getCrWorkspace()+
+public void setCrWorkspace(CrWorkspace crWorkspace)+
+public java.util.Set getCrNodeVersions()+
+public void setCrNodeVersions(java.util.Set crNodeVersions)+
+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+public java.lang.Long incrementNextVersionId()+
+
+public java.util.SortedSet getVersionHistory()+
+
+public boolean isNodeType(java.lang.String nodeTypeName)+
+
nodeTypeName
- the name of a node type.
++public CrNodeVersion getNodeVersion(java.lang.Long versionId)+
+
+public java.lang.Long[] getVersionIds()+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.CrNodeVersion +
+
+Constructor Summary | +|
CrNodeVersion()
+
++ default constructor |
+|
CrNodeVersion(java.lang.Long versionId,
+ CrNode node,
+ CrNodeVersion parentNodeVersion,
+ java.util.Set crNodeVersionProperties,
+ java.util.Set childNodeVersions)
+
++ minimal constructor |
+|
CrNodeVersion(java.lang.Long versionId,
+ java.util.Date createdDateTime,
+ CrNode node,
+ CrNodeVersion parentNodeVersion,
+ java.util.Set crNodeVersionProperties,
+ java.util.Set childNodeVersions)
+
++ full constructor |
+
+Method Summary | +|
+ void |
+addChildNodeVersion(CrNodeVersion childNode)
+
++ Add a child node to the childNodeVersions collection. |
+
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ CrNodeVersion |
+getChildNodeVersion(java.lang.String relPath)
+
++ Remove a child node to the childNodeVersions collection. |
+
+ java.util.Set |
+getChildNodeVersions()
+
++ Gets the set of child nodes. |
+
+ java.util.Date |
+getCreatedDateTime()
+
++ |
+
+ java.util.Set |
+getCrNodeVersionProperties()
+
++ |
+
+ CrNode |
+getNode()
+
++ |
+
+ java.lang.Long |
+getNvId()
+
++ |
+
+ CrNodeVersion |
+getParentNodeVersion()
+
++ |
+
+ CrNodeVersionProperty |
+getProperty(java.lang.String name)
+
++ Get a property value |
+
+ java.lang.String |
+getVersionDescription()
+
++ Get the version description. |
+
+ java.lang.Long |
+getVersionId()
+
++ |
+
+ int |
+hashCode()
+
++ |
+
+ boolean |
+hasProperties()
+
++ Indicates whether this node has properties. |
+
+ boolean |
+hasProperty(java.lang.String name)
+
++ Indicates whether a property exists for this name + Returns true if a property exists and false otherwise. |
+
+ void |
+removeChildNodeVersion(CrNodeVersion childNode)
+
++ Remove a child node to the childNodeVersions collection. |
+
+ void |
+setChildNodeVersions(java.util.Set childNodeVersions)
+
++ Assigns a new set of child nodes. |
+
+ void |
+setCreatedDateTime(java.util.Date createdDateTime)
+
++ |
+
+ void |
+setCrNodeVersionProperties(java.util.Set crNodeVersionProperties)
+
++ |
+
+ void |
+setNode(CrNode node)
+
++ |
+
+ void |
+setNvId(java.lang.Long nvId)
+
++ |
+
+ void |
+setParentNodeVersion(CrNodeVersion parentNodeVersion)
+
++ |
+
+ CrNodeVersionProperty |
+setProperty(java.lang.String name,
+ java.lang.Object value,
+ int valueType)
+
++ Set a property value. |
+
+ void |
+setVersionDescription(java.lang.String description)
+
++ Set the version description. |
+
+ void |
+setVersionId(java.lang.Long versionId)
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public CrNodeVersion(java.lang.Long versionId, + java.util.Date createdDateTime, + CrNode node, + CrNodeVersion parentNodeVersion, + java.util.Set crNodeVersionProperties, + java.util.Set childNodeVersions)+
+
+public CrNodeVersion()+
+
+public CrNodeVersion(java.lang.Long versionId, + CrNode node, + CrNodeVersion parentNodeVersion, + java.util.Set crNodeVersionProperties, + java.util.Set childNodeVersions)+
+
+Method Detail | +
+public java.lang.Long getNvId()+
+public void setNvId(java.lang.Long nvId)+
+public java.lang.Long getVersionId()+
+public void setVersionId(java.lang.Long versionId)+
+public java.util.Date getCreatedDateTime()+
+public void setCreatedDateTime(java.util.Date createdDateTime)+
+public CrNode getNode()+
+public void setNode(CrNode node)+
+public CrNodeVersion getParentNodeVersion()+
+public void setParentNodeVersion(CrNodeVersion parentNodeVersion)+
+public java.util.Set getCrNodeVersionProperties()+
+public void setCrNodeVersionProperties(java.util.Set crNodeVersionProperties)+
+public java.util.Set getChildNodeVersions()+
+
+public void setChildNodeVersions(java.util.Set childNodeVersions)+
+
+public void addChildNodeVersion(CrNodeVersion childNode)+
+
childNode
- +public void removeChildNodeVersion(CrNodeVersion childNode)+
+
childNode
- +public CrNodeVersion getChildNodeVersion(java.lang.String relPath)+
+
relPath
- of child+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+public CrNodeVersionProperty getProperty(java.lang.String name)+
+
+public CrNodeVersionProperty setProperty(java.lang.String name, + java.lang.Object value, + int valueType) + throws RepositoryRuntimeException+
+
RepositoryRuntimeException
- if name is null+public java.lang.String getVersionDescription()+
+
+public void setVersionDescription(java.lang.String description)+
+
+public boolean hasProperty(java.lang.String name)+
+
name
- The name of a (possible) property.
++public boolean hasProperties()+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.CrNodeVersionProperty +
+
+Constructor Summary | +|
CrNodeVersionProperty()
+
++ default constructor |
+|
CrNodeVersionProperty(java.lang.String name,
+ java.lang.String value,
+ int type,
+ CrNodeVersion crNodeVersion)
+
++ full constructor |
+
+Method Summary | +|
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ boolean |
+getBoolean()
+
++ Returns a boolean representation of the value. |
+
+ CrNodeVersion |
+getCrNodeVersion()
+
++ |
+
+ java.util.Calendar |
+getDate()
+
++ Returns a Calendar representation of the value. |
+
+ double |
+getDouble()
+
++ Returns a double representation of the value. |
+
+ java.lang.Long |
+getId()
+
++ |
+
+ long |
+getLong()
+
++ Returns a long representation of the value. |
+
+ java.lang.String |
+getName()
+
++ |
+
+ java.lang.String |
+getString()
+
++ Returns a string representation of the value. |
+
+ int |
+getType()
+
++ |
+
+ java.lang.String |
+getValue()
+
++ |
+
+ int |
+hashCode()
+
++ |
+
+ void |
+setCrNodeVersion(CrNodeVersion crNodeVersion)
+
++ |
+
+ void |
+setId(java.lang.Long id)
+
++ |
+
+ void |
+setName(java.lang.String name)
+
++ |
+
+ void |
+setType(int type)
+
++ |
+
+ void |
+setValue(java.lang.String value)
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public CrNodeVersionProperty(java.lang.String name, + java.lang.String value, + int type, + CrNodeVersion crNodeVersion)+
+
+public CrNodeVersionProperty()+
+
+Method Detail | +
+public java.lang.Long getId()+
+public void setId(java.lang.Long id)+
+public java.lang.String getName()+
+public void setName(java.lang.String name)+
+public java.lang.String getValue()+
+public void setValue(java.lang.String value)+
+public int getType()+
PropertyType
for values.+public void setType(int type)+
+public CrNodeVersion getCrNodeVersion()+
+public void setCrNodeVersion(CrNodeVersion crNodeVersion)+
+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+public java.lang.String getString()+
+
ValueFormatException
- If able to convert the value to a string.
+java.lang.IllegalStateException
- If calling getString() on a file and the stream cannot be read.
+RepositoryException
- If another error occurs.+public double getDouble() + throws ValueFormatException+
+
ValueFormatException
- If able to convert the value to a double.+public java.util.Calendar getDate() + throws ValueFormatException+
+
ValueFormatException
- If able to convert the value to a Calendar.+public long getLong() + throws ValueFormatException+
+
ValueFormatException
- If able to convert the value to a long.+public boolean getBoolean() + throws ValueFormatException+
+
getBoolean
in interface IValue
ValueFormatException
- If able to convert the value to a boolean.
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.CrWorkspace +
+
+Constructor Summary | +|
CrWorkspace()
+
++ default constructor |
+|
CrWorkspace(java.lang.String name,
+ java.util.Set crWorkspaceCredentials,
+ java.util.Set crNodes)
+
++ full constructor |
+
+Method Summary | +|
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ java.util.Set |
+getCrNodes()
+
++ |
+
+ java.util.Set |
+getCrWorkspaceCredentials()
+
++ |
+
+ java.lang.String |
+getName()
+
++ |
+
+ java.lang.Long |
+getWorkspaceId()
+
++ |
+
+ int |
+hashCode()
+
++ |
+
+ void |
+setCrNodes(java.util.Set crNodes)
+
++ |
+
+ void |
+setCrWorkspaceCredentials(java.util.Set crWorkspaceCredentials)
+
++ |
+
+ void |
+setName(java.lang.String name)
+
++ |
+
+ void |
+setWorkspaceId(java.lang.Long workspaceId)
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public CrWorkspace(java.lang.String name, + java.util.Set crWorkspaceCredentials, + java.util.Set crNodes)+
+
+public CrWorkspace()+
+
+Method Detail | +
+public java.lang.Long getWorkspaceId()+
getWorkspaceId
in interface IWorkspace
+public void setWorkspaceId(java.lang.Long workspaceId)+
+public java.lang.String getName()+
getName
in interface IWorkspace
+public void setName(java.lang.String name)+
+public java.util.Set getCrWorkspaceCredentials()+
+public void setCrWorkspaceCredentials(java.util.Set crWorkspaceCredentials)+
+public java.util.Set getCrNodes()+
+public void setCrNodes(java.util.Set crNodes)+
+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.CrWorkspaceCredential +
+
+Constructor Summary | +|
CrWorkspaceCredential()
+
++ default constructor |
+|
CrWorkspaceCredential(CrWorkspace crWorkspace,
+ CrCredential crCredential)
+
++ full constructor |
+
+Method Summary | +|
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ CrCredential |
+getCrCredential()
+
++ |
+
+ CrWorkspace |
+getCrWorkspace()
+
++ |
+
+ java.lang.Long |
+getWcId()
+
++ |
+
+ int |
+hashCode()
+
++ |
+
+ void |
+setCrCredential(CrCredential crCredential)
+
++ |
+
+ void |
+setCrWorkspace(CrWorkspace crWorkspace)
+
++ |
+
+ void |
+setWcId(java.lang.Long wcId)
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public CrWorkspaceCredential(CrWorkspace crWorkspace, + CrCredential crCredential)+
+
+public CrWorkspaceCredential()+
+
+Method Detail | +
+public java.lang.Long getWcId()+
+public void setWcId(java.lang.Long wcId)+
+public CrWorkspace getCrWorkspace()+
+public void setCrWorkspace(CrWorkspace crWorkspace)+
+public CrCredential getCrCredential()+
+public void setCrCredential(CrCredential crCredential)+
+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.FileException +
+Some error was generated reading or writing the files + to disk. +
+ +
+
+Constructor Summary | +|
FileException()
+
++ Constructs a new instance of this class. |
+|
FileException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
FileException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
FileException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public FileException()+
+
+public FileException(java.lang.String s)+
+
s
- description+public FileException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public FileException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Base interface for all credentials that may be passed to the + Repository.login() method. +
+ +
+
+Method Summary | +|
+ void |
+clearPassword()
+
++ Clear the current password - important not to leave this lying around. |
+
+ java.lang.String |
+getName()
+
++ Returns the name of the tool. |
+
+ char[] |
+getPassword()
+
++ Returns the password. |
+
+Method Detail | +
+public java.lang.String getName()+
+
+public char[] getPassword()+
+ Note that this method returns a reference to the password. + The password is set when the creditionals are passed in to get a ticket, + and then removed. +
+
+
+public void clearPassword()+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Tool access to the repository +
+ +
+
+Field Summary | +|
+static java.lang.String |
+REPOSITORY_CONTEXT_PATH
+
++ String used to define the path to the context file |
+
+static java.lang.String |
+REPOSITORY_SERVICE_ID
+
++ String used to define service in Spring context |
+
+Method Summary | +|
+ NodeKey |
+addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Add a new file to the repository. |
+
+ NodeKey |
+addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ void |
+addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Create a new workspace, with the tool identified in the creditials + as the owner. |
+
+ void |
+createCredential(ICredentials newCredential)
+
++ Create a new repository "user" - usually a tool. |
+
+ java.lang.String[] |
+deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ Delete a node and all its versions, returning a list of the files + that could not be deleted properly. |
+
+ java.lang.String[] |
+deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Delete the current version of a node, returning a list of the files + that could not be deleted properly. |
+
+ IVersionedNode |
+getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Get an item from the repository based on the UUID. |
+
+ IVersionedNode |
+getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.lang.String relPath)
+
++ Get an item from the repository based on the UUID and relative + path. |
+
+ java.util.SortedMap |
+getNodeList(ITicket ticket)
+
++ Get a complete list of all nodes in the workspace and their + version histories. |
+
+ java.util.List |
+getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Return a list of all the nodes for a package. |
+
+ java.util.SortedSet |
+getVersionHistory(ITicket ticket,
+ java.lang.Long uuid)
+
++ Get the history for a node. |
+
+ ITicket |
+login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Login, creating a new ticket for the given credentials and specified + workspace. |
+
+ void |
+logout(ITicket ticket)
+
++ Finish using this ticket. |
+
+ void |
+updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ NodeKey |
+updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Update an existing file in the repository. |
+
+ NodeKey |
+updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+Field Detail | +
+public static final java.lang.String REPOSITORY_SERVICE_ID+
+
+public static final java.lang.String REPOSITORY_CONTEXT_PATH+
+
+Method Detail | +
+public ITicket login(ICredentials credentials, + java.lang.String workspaceName) + throws LoginException, + AccessDeniedException, + WorkspaceNotFoundException+
+
credentials
- The credentials of the userworkspaceName
- the name of a workspace.
+ITicket
for the user to access the repository.
+LoginException
- Login authentication fails.
+AccessDeniedException
- User is not allowed to access this workspace.
+WorkspaceNotFoundException
- Workspace name doesn't exist.+public void addWorkspace(ICredentials credentials, + java.lang.String workspaceName) + throws LoginException, + AccessDeniedException, + ItemExistsException, + RepositoryCheckedException+
+
credentials
- this user/password must already exist in the repository. Password will be checked.workspaceName
-
+LoginException
- if credentials are not authorised to add/access the new workspace.
+ItemExistsException
- if the workspace already exists.
+RepositoryCheckedException
- if parameters are missing. * @param credentials The credentials of the user/tool
+AccessDeniedException
+public void createCredential(ICredentials newCredential) + throws AccessDeniedException, + RepositoryCheckedException+
+
newCredential
- this user/password will be added to the repository
+RepositoryCheckedException
- if parameters are missing.
+AccessDeniedException
+public void updateCredentials(ICredentials oldCredential, + ICredentials newCredential) + throws AccessDeniedException, + RepositoryCheckedException+
+
oldCredential
- the current user/passwordnewCredential
- the new user/password
+LoginException
- if the oldCredential fails login test (e.g. wrong password)
+RepositoryCheckedException
- if one of the credentials objects are missing
+AccessDeniedException
+public NodeKey addFileItem(ITicket ticket, + java.io.InputStream istream, + java.lang.String filename, + java.lang.String mimeType, + java.lang.String versionDescription) + throws FileException, + AccessDeniedException, + InvalidParameterException+
+
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryistream
- new file, as an input stream - mandatorymimeType
- mime type of file - optionalversionDescription
- human readable comment about the version - optional
+AccessDeniedException
- if ticket doesn't allow this action
+FileException
- if unable to save node due to file error
+InvalidParameterException
- if a required parameter is missing
+RepositoryRuntimeException
- if any internal errors have occured+public NodeKey addPackageItem(ITicket ticket, + java.lang.String dirPath, + java.lang.String startFile, + java.lang.String versionDescription) + throws AccessDeniedException, + InvalidParameterException, + FileException+
+
ticket
- ticket issued on login. Identifies tool and workspace - mandatorydirPath
- directory path containing files - mandatorystartFile
- relative path of initial file - optionalversionDescription
- human readable comment about the version - optional
+AccessDeniedException
- if ticket doesn't allow this action
+FileException
- if unable to save node due to file error
+InvalidParameterException
- if a required parameter is missing
+RepositoryRuntimeException
- if any internal errors have occured+public NodeKey updateFileItem(ITicket ticket, + java.lang.Long uuid, + java.lang.String filename, + java.io.InputStream istream, + java.lang.String mimeType, + java.lang.String versionDescription) + throws AccessDeniedException, + ItemNotFoundException, + FileException, + InvalidParameterException+
+
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryuuid
- unique id of the file - mandatoryistream
- new file, as an input stream - mandatoryversionDescription
- human readable comment about the version - optionalmimeType
- mime type of file - optional
+AccessDeniedException
- if ticket doesn't allow this action
+ItemNotFoundException
- if node with uuid cannot be found
+FileException
- if unable to save node due to file error
+InvalidParameterException
- if a required parameter is missing
+RepositoryRuntimeException
- if any internal errors have occured+public NodeKey updatePackageItem(ITicket ticket, + java.lang.Long uuid, + java.lang.String dirPath, + java.lang.String startFile, + java.lang.String versionDescription) + throws AccessDeniedException, + ItemNotFoundException, + FileException, + InvalidParameterException+
+
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryuuid
- unique id of the package - mandatorydirPath
- directory path containing files - mandatorystartFile
- relative path of initial file - optionalversionDescription
- human readable comment about the version - optional
+AccessDeniedException
- if ticket doesn't allow this action
+ItemNotFoundException
- if node with uuid cannot be found
+FileException
- if unable to save node due to file error
+InvalidParameterException
- if a required parameter is missing
+RepositoryRuntimeException
- if any internal errors have occured+public IVersionedNode getFileItem(ITicket ticket, + java.lang.Long uuid, + java.lang.Long version) + throws AccessDeniedException, + ItemNotFoundException, + FileException+
+
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryuuid
- id of the file/package - mandatoryversion
- desired version - if null gets latest version
+AccessDeniedException
+ItemNotFoundException
+FileException
+public IVersionedNode getFileItem(ITicket ticket, + java.lang.Long uuid, + java.lang.Long versionId, + java.lang.String relPath) + throws AccessDeniedException, + ItemNotFoundException, + FileException+
+
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryuuid
- id of the package - mandatoryversionId
- desired version - if null gets latest version. This is the version
+ of the package node, not the related file.relPath
- relative path within the package - if null,
+ returns start file.
+AccessDeniedException
- if ticket doesn't allow this action
+ItemNotFoundException
- if node with uuid cannot be found
+FileException
- if unable to save node due to file error
+RepositoryRuntimeException
- if any internal errors have occured+public java.util.List getPackageNodes(ITicket ticket, + java.lang.Long uuid, + java.lang.Long version) + throws AccessDeniedException, + ItemNotFoundException, + FileException+
+
ticket
- uuid
- uuid of the package nodeversion
- version of the package node
+AccessDeniedException
+ItemNotFoundException
+FileException
+public java.util.SortedSet getVersionHistory(ITicket ticket, + java.lang.Long uuid) + throws ItemNotFoundException, + AccessDeniedException+
+
ticket
- ticket issued on login. Identifies tool and workspace - mandatory
+ItemNotFoundException
+AccessDeniedException
+public java.lang.String[] deleteVersion(ITicket ticket, + java.lang.Long uuid, + java.lang.Long version) + throws AccessDeniedException, + InvalidParameterException, + ItemNotFoundException+
+
AccessDeniedException
- if ticket doesn't allow this action
+ItemNotFoundException
- if node with uuid cannot be found
+InvalidParameterException
- if a required parameter is missing
+RepositoryRuntimeException
- if any internal errors have occured+public java.lang.String[] deleteNode(ITicket ticket, + java.lang.Long uuid) + throws AccessDeniedException, + InvalidParameterException, + ItemNotFoundException+
+
AccessDeniedException
- if ticket doesn't allow this action
+ItemNotFoundException
- if node with uuid cannot be found
+InvalidParameterException
- if a required parameter is missing
+RepositoryRuntimeException
- if any internal errors have occured+public void logout(ITicket ticket) + throws AccessDeniedException+
+
ticket
- ticket issued on login. Identifies tool and workspace - mandatory
+AccessDeniedException
+public java.util.SortedMap getNodeList(ITicket ticket) + throws AccessDeniedException+
+ Warning: Once a workspace gets a lot of nodes, this will be + a very very expensive call!!!!! +
++
ticket
- ticket issued on login. Identifies tool and workspace - mandatory
+AccessDeniedException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Administrative interface to the Repository. "Protects" + the assignCredentials method and isTicketOkay method. +
+ +
+
+Field Summary | +
Fields inherited from interface org.lamsfoundation.lams.contentrepository.IRepository | +
REPOSITORY_CONTEXT_PATH, REPOSITORY_SERVICE_ID |
+
+Method Summary | +|
+ void |
+assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ boolean |
+isTicketOkay(ITicket ticket)
+
++ Is this ticket acceptable to the repository? + Only the interceptor for an IRepositoryAdmin should call this!!!!!! + + Do NOT declare this method as a transaction otherwise we will + end up with an endless loop of forever trying to check if + the ticket is okay as this method would end up getting + checked itself. |
+
Methods inherited from interface org.lamsfoundation.lams.contentrepository.IRepository | +
addFileItem, addPackageItem, addWorkspace, createCredential, deleteNode, deleteVersion, getFileItem, getFileItem, getNodeList, getPackageNodes, getVersionHistory, login, logout, updateCredentials, updateFileItem, updatePackageItem |
+
+Method Detail | +
+public void assignCredentials(ICredentials credentials, + java.lang.String workspaceName) + throws RepositoryCheckedException, + WorkspaceNotFoundException+
RepositoryCheckedException
+WorkspaceNotFoundException
+public boolean isTicketOkay(ITicket ticket)+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Ticket represents the "authorisation" key to the repository. When + the tool logs in, a ticket is given. This ticket must be supplied + whenever a node is accessed. When the tool is finished, it should call + logout, which invalidates the ticket. + + A ticket is for one workspace only - to access more than one + workspace requires more than one ticket. +
+ +
+
+Method Summary | +|
+ void |
+clear()
+
++ Make this ticket unusable. |
+
+ java.lang.String |
+getTicketId()
+
++ |
+
+ java.lang.Long |
+getWorkspaceId()
+
++ Get the workspace associated with this ticket + Should only be accessed by the content repository package members. |
+
+Method Detail | +
+public java.lang.Long getWorkspaceId()+
+
+public java.lang.String getTicketId()+
+public void clear()+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+A value is an object which is explicitly marked with a type. This type can + be used for hints to the persistence layer as to how to store/retrieve + the value. +
+ +
+
+Method Summary | +|
+ boolean |
+getBoolean()
+
++ Returns a boolean representation of the value. |
+
+ java.util.Calendar |
+getDate()
+
++ Returns a Calendar representation of the value. |
+
+ double |
+getDouble()
+
++ Returns a double representation of the value. |
+
+ long |
+getLong()
+
++ Returns a long representation of the value. |
+
+ java.lang.String |
+getString()
+
++ Returns a string representation of the value. |
+
+ int |
+getType()
+
++ |
+
+Method Detail | +
+public int getType()+
PropertyType
for values.+public java.lang.String getString() + throws ValueFormatException+
+
ValueFormatException
- If able to convert the value to a string.+public double getDouble() + throws ValueFormatException+
+
ValueFormatException
- If able to convert the value to a double.+public java.util.Calendar getDate() + throws ValueFormatException+
+
ValueFormatException
- If able to convert the value to a Calendar.+public long getLong() + throws ValueFormatException+
+
ValueFormatException
- If able to convert the value to a long.+public boolean getBoolean() + throws ValueFormatException+
+
ValueFormatException
- If able to convert the value to a boolean.
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Describes the version of a node. Objects that meet this interface + have a natural ordering so they can be placed straight into + a sorted set, with the need for a special comparator. The natural + ordering should be such that null is sorted (ie after) non-null. +
+ +
+
+Method Summary | +|
+ java.util.Date |
+getCreatedDateTime()
+
++ Get the date/time of when this version was created. |
+
+ java.lang.String |
+getDescription()
+
++ Get the general text string describing the version. |
+
+ java.lang.Long |
+getVersionId()
+
++ Get the version id. |
+
Methods inherited from interface java.lang.Comparable | +
compareTo |
+
+Method Detail | +
+public java.lang.Long getVersionId()+
+
+public java.util.Date getCreatedDateTime()+
+
+public java.lang.String getDescription()+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+The IVersionedNode interface represents a particular version of a node + in the hierarchy that makes up the repository. This interface represents + a very restricted version of a node - they are read only methods + so the node cannot be updated - only a new version may be created. + + A VersionedNode may have at most one file attached (ie one per version). +
+ +
+
+Method Summary | +|
+ java.util.Set |
+getChildNodes()
+
++ Returns an Set of all child nodes of node. |
+
+ java.util.Date |
+getCreatedDateTime()
+
++ Get the date/time of when this node was created. |
+
+ java.io.InputStream |
+getFile()
+
++ Get the file, as an inputstream. |
+
+ IVersionedNode |
+getNode(java.lang.String relPath)
+
++ Returns the node at relPath, which is a child of this node. |
+
+ NodeKey |
+getNodeKey()
+
++ Get the uuid and version of this node/version |
+
+ java.lang.String |
+getNodeType()
+
++ Gets the type of the current node. |
+
+ java.lang.String |
+getPath()
+
++ Get the path of this node |
+
+ java.util.Set |
+getProperties()
+
++ Returns all properties of this node. |
+
+ IValue |
+getProperty(java.lang.String name)
+
++ Returns the property at relPath relative to this + node. |
+
+ ITicket |
+getTicket()
+
++ Get the ticket through which this node was accessed. |
+
+ java.lang.Long |
+getUUID()
+
++ Returns the UUID of this node as recorded in the node's jcr:UUID + property. |
+
+ java.lang.Long |
+getVersion()
+
++ Get the version of this node. |
+
+ java.util.SortedSet |
+getVersionHistory()
+
++ Get the version history for this node, ordered by version id. |
+
+ boolean |
+hasNode(java.lang.String relPath)
+
++ Indicates whether a node exists at relPath + Returns true if a node exists at relPath and + false otherwise. |
+
+ boolean |
+hasNodes()
+
++ Indicates whether this node has child nodes. |
+
+ boolean |
+hasParentNode()
+
++ Does this node have a parent node? |
+
+ boolean |
+hasProperties()
+
++ Indicates whether this node has properties. |
+
+ boolean |
+hasProperty(java.lang.String name)
+
++ Indicates whether a property exists for this name + Returns true if a property exists and false otherwise. |
+
+ boolean |
+isNodeType(java.lang.String nodeTypeName)
+
++ Indicates whether this node is of the specified node type. |
+
+Method Detail | +
+public NodeKey getNodeKey()+
+
+public IVersionedNode getNode(java.lang.String relPath) + throws ItemNotFoundException+
+
relPath
- The relative path of the node to retrieve.
+ItemNotFoundException
- If no node exists at the
+ specified path.
+RepositoryException
- If another error occurs.+public java.util.Set getChildNodes()+
+
+public boolean hasParentNode()+
+
+public boolean hasNode(java.lang.String relPath)+
+
relPath
- The path of a (possible) node.
++public boolean hasNodes()+
+
+public IValue getProperty(java.lang.String name)+
+
name
-
++public java.util.Set getProperties()+
+
+public java.lang.Long getUUID()+
+
+public boolean hasProperty(java.lang.String name)+
+
name
- The name of a (possible) property.
++public boolean hasProperties()+
+
+public java.lang.String getNodeType()+
NodeType
for
+ possible node types. Note: the node type is shared across all
+ versions of a node
++
+public boolean isNodeType(java.lang.String nodeTypeName)+
+
nodeTypeName
- the name of a node type.
++public java.util.SortedSet getVersionHistory()+
+
IVersionDetail
objects+public java.lang.String getPath()+
+
+public ITicket getTicket()+
+
+public java.lang.Long getVersion()+
+
+public java.util.Date getCreatedDateTime()+
+
+public java.io.InputStream getFile() + throws FileException+
+
FileException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+IVersionedNodeAdmin represents the full functionality for a versioned node. + + IVersionedNodeAdmin is a protected interface - should only be used within + the repository package. It exists to allow easier replacement of the + SimpleVersionedNode class in line with the Spring framework philosophy + of programming to interfaces. +
+ +
+
+Method Summary | +|
+ java.util.List |
+deleteNode()
+
++ Delete this node and all its versions, returning a list of the files + that could not be deleted properly. |
+
+ java.util.List |
+deleteVersion()
+
++ Delete the current version of this node, returning a list of the files + that could not be deleted properly. |
+
+ void |
+setFile(java.io.InputStream iStream,
+ java.lang.String filename,
+ java.lang.String mimeType)
+
++ Set the file, passed in as an inputstream. |
+
+ void |
+setProperty(java.lang.String name,
+ boolean value)
+
++ Sets the property to a BOOLEAN value. |
+
+ void |
+setProperty(java.lang.String name,
+ java.util.Calendar value)
+
++ Sets the property a CALENDAR value. |
+
+ void |
+setProperty(java.lang.String name,
+ double value)
+
++ Sets the property to a DOUBLE value. |
+
+ void |
+setProperty(java.lang.String name,
+ long value)
+
++ Sets the property to a LONG value. |
+
+ void |
+setProperty(java.lang.String name,
+ java.lang.String value)
+
++ Sets the property to a STRING value. |
+
+ void |
+setProperty(java.lang.String name,
+ java.lang.String value,
+ int type)
+
++ Sets the property to a value, based on the specified type, after converting + from the string. |
+
Methods inherited from interface org.lamsfoundation.lams.contentrepository.IVersionedNode | +
getChildNodes, getCreatedDateTime, getFile, getNode, getNodeKey, getNodeType, getPath, getProperties, getProperty, getTicket, getUUID, getVersion, getVersionHistory, hasNode, hasNodes, hasParentNode, hasProperties, hasProperty, isNodeType |
+
+Method Detail | +
+public void setProperty(java.lang.String name, + java.lang.String value, + int type) + throws RepositoryCheckedException+
+
name
- The name of a property of this nodevalue
- The value to be assignedtype
- The type of the property
+ValueFormatException
- if the type or format of a value
+ is incompatible with the type of the specified property or if
+ value is incompatible with (i.e. can not be converted to) type.
+RepositoryCheckedException
+public void setProperty(java.lang.String name, + java.lang.String value) + throws RepositoryCheckedException+
+
name
- The name of a property of this nodevalue
- The value to be assigned
+RepositoryCheckedException
+public void setProperty(java.lang.String name, + boolean value) + throws RepositoryCheckedException+
+
name
- The name of a property of this nodevalue
- The value to be assigned
+RepositoryCheckedException
+public void setProperty(java.lang.String name, + double value) + throws RepositoryCheckedException+
+
name
- The name of a property of this nodevalue
- The value to be assigned
+RepositoryCheckedException
+public void setProperty(java.lang.String name, + long value) + throws RepositoryCheckedException+
+
name
- The name of a property of this nodevalue
- The value to be assigned
+RepositoryCheckedException
+public void setProperty(java.lang.String name, + java.util.Calendar value) + throws RepositoryCheckedException+
+
name
- The name of a property of this nodevalue
- The value to be assigned
+RepositoryCheckedException
+public void setFile(java.io.InputStream iStream, + java.lang.String filename, + java.lang.String mimeType) + throws InvalidParameterException+
+
iStream
- mandatoryfilename
- mandatorymimeType
- optional
+InvalidParameterException
+public java.util.List deleteNode()+
+
AccessDeniedException
- if ticket doesn't allow this action
+ItemNotFoundException
- if node with uuid cannot be found
+InvalidParameterException
- if a required parameter is missing
+RepositoryRuntimeException
- if any internal errors have occured+public java.util.List deleteVersion()+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+A workspace is a grouping of content, which is accessed by a ticket. + One workspace may have many current tickets. + + A workspace may belong to a tool, in which case only the tool can use this workspace. +
+ +
+
+Method Summary | +|
+ java.lang.String |
+getName()
+
++ |
+
+ java.lang.Long |
+getWorkspaceId()
+
++ |
+
+Method Detail | +
+public java.lang.String getName()+
+public java.lang.Long getWorkspaceId()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.InvalidParameterException +
+Generic exception thrown whenever a parameter is missing. +
+ +
+
+Constructor Summary | +|
InvalidParameterException()
+
++ Constructs a new instance of this class. |
+|
InvalidParameterException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
InvalidParameterException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
InvalidParameterException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public InvalidParameterException()+
+
+public InvalidParameterException(java.lang.String s)+
+
s
- description+public InvalidParameterException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public InvalidParameterException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.ItemExistsException +
+An item already exists with the given id or path. +
+ +
+
+Constructor Summary | +|
ItemExistsException()
+
++ Constructs a new instance of this class. |
+|
ItemExistsException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
ItemExistsException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
ItemExistsException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public ItemExistsException()+
+
+public ItemExistsException(java.lang.String s)+
+
s
- description+public ItemExistsException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public ItemExistsException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.ItemNotFoundException +
+Item requested does not exist. +
+ +
+
+Constructor Summary | +|
ItemNotFoundException()
+
++ Constructs a new instance of this class. |
+|
ItemNotFoundException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
ItemNotFoundException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
ItemNotFoundException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public ItemNotFoundException()+
+
+public ItemNotFoundException(java.lang.String s)+
+
s
- description+public ItemNotFoundException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public ItemNotFoundException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.LoginException +
+Login failed. +
+ +
+
+Constructor Summary | +|
LoginException()
+
++ Constructs a new instance of this class. |
+|
LoginException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
LoginException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
LoginException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public LoginException()+
+
+public LoginException(java.lang.String s)+
+
s
- description+public LoginException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public LoginException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.NoSuchNodeTypeException +
+Tried to create a node with an unknown type. +
+ +
+
+Constructor Summary | +|
NoSuchNodeTypeException()
+
++ Constructs a new instance of this class. |
+|
NoSuchNodeTypeException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
NoSuchNodeTypeException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
NoSuchNodeTypeException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public NoSuchNodeTypeException()+
+
+public NoSuchNodeTypeException(java.lang.String s)+
+
s
- description+public NoSuchNodeTypeException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public NoSuchNodeTypeException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.NodeKey +
+Represents the two part key - UUID and version. + Version may be null; +
+ +
+
+Constructor Summary | +|
NodeKey(java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+Method Summary | +|
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ java.lang.Long |
+getUuid()
+
++ |
+
+ java.lang.Long |
+getVersion()
+
++ |
+
+ int |
+hashCode()
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public NodeKey(java.lang.Long uuid, + java.lang.Long version)+
+Method Detail | +
+public java.lang.Long getUuid()+
+public java.lang.Long getVersion()+
+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++junit.framework.Assert +
junit.framework.TestCase +
org.lamsfoundation.lams.contentrepository.NodeTransactionTest +
+Test the node's transaction handling. Need to test the following scenarios: + +
+ +
+
+Constructor Summary | +|
NodeTransactionTest(java.lang.String name)
+
++ Constructor for NodeTransactionTest. |
+
Methods inherited from class junit.framework.TestCase | +
countTestCases, getName, run, run, runBare, setName, toString |
+
Methods inherited from class junit.framework.Assert | +
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public NodeTransactionTest(java.lang.String name)+
+
name
-
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.NodeType +
+Defines the types of nodes. If you add a new type to this file, + make sure you add it to the isValidNodeType method. +
+ +
+
+Field Summary | +|
+static java.lang.String |
+DATANODE
+
++ Node that has properties but no file. |
+
+static java.lang.String |
+FILENODE
+
++ Node has a file attached. |
+
+static java.lang.String |
+PACKAGENODE
+
++ Node represents a package of other nodes |
+
+Constructor Summary | +|
NodeType()
+
++ |
+
+Method Summary | +|
+static boolean |
+isValidNodeType(java.lang.String type)
+
++ Does this string represent a known node type. |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
+public static final java.lang.String DATANODE+
+
+public static final java.lang.String FILENODE+
+
+public static final java.lang.String PACKAGENODE+
+
+Constructor Detail | +
+public NodeType()+
+Method Detail | +
+public static boolean isValidNodeType(java.lang.String type)+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.PropertyName +
+
+Field Summary | +|
+static java.lang.String |
+FILENAME
+
++ FILENAME is required for a file node - it is set by the call to add the file stream. |
+
+static java.lang.String |
+INITIALPATH
+
++ INITIALPATH is required for a package node |
+
+static java.lang.String |
+MIMETYPE
+
++ MIMETYPE is required for a file node - it is set by the call to add the file stream. |
+
+static java.lang.String |
+VERSIONDESC
+
++ VERSIONDESC is text description relating to a version + It should contain text meaningful to the user. |
+
+Constructor Summary | +|
PropertyName()
+
++ |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
+public static final java.lang.String VERSIONDESC+
+
+public static final java.lang.String MIMETYPE+
+
+public static final java.lang.String FILENAME+
+
+public static final java.lang.String INITIALPATH+
+
+Constructor Detail | +
+public PropertyName()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.PropertyType +
+LAMS property types. +
+ +
+
+Field Summary | +|
+static int |
+BOOLEAN
+
++ Boolean property type |
+
+static int |
+DATE
+
++ Date property type |
+
+static int |
+DOUBLE
+
++ Double property type |
+
+static int |
+LONG
+
++ Long property type |
+
+static int |
+STRING
+
++ String property type |
+
+static java.lang.String |
+TYPENAME_BOOLEAN
+
++ |
+
+static java.lang.String |
+TYPENAME_DATE
+
++ |
+
+static java.lang.String |
+TYPENAME_DOUBLE
+
++ |
+
+static java.lang.String |
+TYPENAME_LONG
+
++ |
+
+static java.lang.String |
+TYPENAME_STRING
+
++ The names of the supported property types, + as used in serialization. |
+
+static int |
+UNDEFINED
+
++ Undefined type. |
+
+Method Summary | +|
+static java.lang.String |
+nameFromValue(int type)
+
++ Returns the name of the specified type. |
+
+static int |
+valueFromName(java.lang.String name)
+
++ Returns the numeric constant value of the type with the specified name. |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
+public static final int STRING+
+
+public static final int LONG+
+
+public static final int DOUBLE+
+
+public static final int DATE+
+
+public static final int BOOLEAN+
+
+public static final int UNDEFINED+
+
+public static final java.lang.String TYPENAME_STRING+
+
+public static final java.lang.String TYPENAME_LONG+
+public static final java.lang.String TYPENAME_DOUBLE+
+public static final java.lang.String TYPENAME_DATE+
+public static final java.lang.String TYPENAME_BOOLEAN+
+Method Detail | +
+public static java.lang.String nameFromValue(int type) + throws RepositoryCheckedException+
+
type
- the property type
+RepostoryException
- if the type is not a valid property type.
+RepositoryCheckedException
+public static int valueFromName(java.lang.String name) + throws RepositoryCheckedException+
+
name
- the name of the property type
+RepostoryException
- if name
+ is not a valid property type name.
+RepositoryCheckedException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
+Main exception thrown by content repository classes. All exceptions thrown by the content + repository (except RepositoryRuntimeException) are based on this class, so calling code + can catch this exception and catch all of the repository exceptions, if it doesn't want to + catch particular exceptions. +
+ +
+
RepositoryRuntimeException
,
+Serialized Form+Constructor Summary | +|
RepositoryCheckedException()
+
++ Constructs a new instance of this class. |
+|
RepositoryCheckedException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
RepositoryCheckedException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
RepositoryCheckedException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
+Method Summary | +|
+ java.lang.String |
+getMessage()
+
++ |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public RepositoryCheckedException()+
+
+public RepositoryCheckedException(java.lang.String s)+
+
s
- description+public RepositoryCheckedException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public RepositoryCheckedException(java.lang.Throwable cause)+
+
cause
- root failure cause+Method Detail | +
+public java.lang.String getMessage()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
java.lang.RuntimeException +
org.lamsfoundation.lams.contentrepository.RepositoryRuntimeException +
+Main runtime exception thrown by content repository classes. This is only + used for unexpected internal errors, such that the calling code could + never recover. +
+ +
+
RepositoryCheckedException
,
+Serialized Form+Constructor Summary | +|
RepositoryRuntimeException()
+
++ Constructs a new instance of this class. |
+|
RepositoryRuntimeException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
RepositoryRuntimeException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
RepositoryRuntimeException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
+Method Summary | +|
+ java.lang.String |
+getMessage()
+
++ |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public RepositoryRuntimeException()+
+
+public RepositoryRuntimeException(java.lang.String s)+
+
s
- description+public RepositoryRuntimeException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public RepositoryRuntimeException(java.lang.Throwable cause)+
+
cause
- root failure cause+Method Detail | +
+public java.lang.String getMessage()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.SimpleCredentials +
+Basic implementation of credentials. Note: the "user id" is + actually "tool id", so its not really a password as an validation + string. +
+ When a tool logs into the repository, it will pass in a simple credentials + object which has just the userid and password set. +
+ The repository then attaches credential to the ticket. + The new credential doesn't have the password and it + is never connected from the database. +
+ The credential comparison is done using the DAO class - it + does not load the data from the database but gets the + password to the db for checking. +
+ The original credentials contains attributes. This will be useful + for the future, but has not yet been implemented. +
+
+ +
+
ICredentials
,
+Serialized Form+Constructor Summary | +|
SimpleCredentials(java.lang.String name,
+ char[] password)
+
++ Should only be used by hibernate or package calls. |
+
+Method Summary | +|
+ void |
+clearPassword()
+
++ Clear the current password. |
+
+ java.lang.String |
+getName()
+
++ Returns the name of the tool. |
+
+ char[] |
+getPassword()
+
++ Returns the password. |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public SimpleCredentials(java.lang.String name, + char[] password)+
+
name
- password
- +Method Detail | +
+public java.lang.String getName()+
+
getName
in interface ICredentials
+public char[] getPassword()+
+ Note that this method returns a reference to the password. + The password is set when the creditionals are passed in to get a ticket, + and then removed. +
+
+
getPassword
in interface ICredentials
+public void clearPassword()+
+
clearPassword
in interface ICredentials
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.SimpleRepository +
+Many methods in this class will throw a RepositoryRuntimeException + if the internal data is missing. This is not indicated + on the method signatures. + + The methods in this class do not explicitly check that a credential + or ticket has been supplied. This is checked by the + checkCredentialTicketBeforeAdvice advisor, for all transactioned + calls (see the application context file). Therefore this + class must be used in the Spring framework - if it is ever + run separately and without suitable AOP support then + each transaction method must check that the credential is okay + or that the ticket is a known ticket (isTicketOkay() method). + + This class also depends on the transactions defined in the + application context for the hibernate sessions to work properly. + If the method isn't transactioned, then there won't be a proper + hibernate session in the DAO and all sorts of errors will occur + on lazy loading (even lazy loading withing the DAO) and when we + write out nodes. + + So while the only footprint you see here of Spring is the beanfactory, + the use of this as a singleton (generated by Spring) affects + more than just how the object is created. +
+ +
+
+Field Summary | +
Fields inherited from interface org.lamsfoundation.lams.contentrepository.IRepository | +
REPOSITORY_CONTEXT_PATH, REPOSITORY_SERVICE_ID |
+
+Constructor Summary | +|
SimpleRepository()
+
++ |
+
+Method Summary | +|
+ NodeKey |
+addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Add a new file to the repository. |
+
+ NodeKey |
+addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ void |
+addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Add a workspace, giving the credentials as the user of this workspace. |
+
+ void |
+assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Assign credentials to a workspace. |
+
+ void |
+createCredential(ICredentials newCredential)
+
++ Create a new repository "user" - usually a tool. |
+
+ java.lang.String[] |
+deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ Delete a node and all its versions, returning a list of the files + that could not be deleted properly. |
+
+ java.lang.String[] |
+deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Delete the current version of a node, returning a list of the files + that could not be deleted properly. |
+
+ ICredentialDAO |
+getCredentialDAO()
+
++ |
+
+ IVersionedNode |
+getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Get an item from the repository based on the UUID. |
+
+ IVersionedNode |
+getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version,
+ java.lang.String relPath)
+
++ Get an item from the repository based on the UUID and relative + path. |
+
+ java.util.SortedMap |
+getNodeList(ITicket ticket)
+
++ Get a complete list of all nodes in the workspace and their + version histories. |
+
+ java.util.List |
+getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Return a list of all the nodes for a package. |
+
+ java.util.SortedSet |
+getVersionHistory(ITicket ticket,
+ java.lang.Long uuid)
+
++ Get the history for a node. |
+
+ IWorkspaceDAO |
+getWorkspaceDAO()
+
++ |
+
+ boolean |
+isTicketOkay(ITicket ticket)
+
++ Is this ticket okay? |
+
+ ITicket |
+login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Login, creating a new ticket for the given credentials and specified + workspace. |
+
+ void |
+logout(ITicket ticket)
+
++ Finish using this ticket. |
+
+ void |
+setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
+
++ |
+
+ void |
+setCredentialDAO(ICredentialDAO credentialDAO)
+
++ |
+
+ void |
+setWorkspaceDAO(IWorkspaceDAO workspaceDAO)
+
++ |
+
+ void |
+updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ NodeKey |
+updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Update an existing file in the repository. |
+
+ NodeKey |
+updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public SimpleRepository()+
+Method Detail | +
+public ITicket login(ICredentials credentials, + java.lang.String workspaceName) + throws AccessDeniedException, + LoginException, + WorkspaceNotFoundException+
IRepository
+
login
in interface IRepository
credentials
- The credentials of the userworkspaceName
- the name of a workspace.
+ITicket
for the user to access the repository.
+LoginException
- Login authentication fails.
+WorkspaceNotFoundException
- Workspace name doesn't exist.
+AccessDeniedException
- User is not allowed to access this workspace.+public void addWorkspace(ICredentials credentials, + java.lang.String workspaceName) + throws AccessDeniedException, + LoginException, + ItemExistsException, + RepositoryCheckedException+
+
addWorkspace
in interface IRepository
credentials
- this user/password must already exist in the repository. Password will be checked.workspaceName
-
+LoginException
- if credentials are not authorised to add/access the new workspace.
+ItemExistsException
- if the workspace already exists.
+RepositoryCheckedException
- if parameters are missing.
+AccessDeniedException
+public void createCredential(ICredentials newCredential) + throws AccessDeniedException, + RepositoryCheckedException+
+
createCredential
in interface IRepository
newCredential
- this user/password will be added to the repository
+RepositoryCheckedException
- if parameters are missing.
+AccessDeniedException
+public void updateCredentials(ICredentials oldCredential, + ICredentials newCredential) + throws AccessDeniedException, + LoginException, + RepositoryCheckedException, + RepositoryRuntimeException+
+
updateCredentials
in interface IRepository
oldCredential
- the current user/passwordnewCredential
- the new user/password
+LoginException
- if the oldCredential fails login test (e.g. wrong password)
+RepositoryCheckedException
- if one of the credentials objects are missing
+RepositoryRuntimeException
- if an internal error occurs.
+AccessDeniedException
+public void assignCredentials(ICredentials credentials, + java.lang.String workspaceName) + throws AccessDeniedException, + RepositoryCheckedException, + WorkspaceNotFoundException, + LoginException+
+
assignCredentials
in interface IRepositoryAdmin
+public void logout(ITicket ticket) + throws AccessDeniedException+
IRepository
+
logout
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatory
+AccessDeniedException
+public boolean isTicketOkay(ITicket ticket)+
+
isTicketOkay
in interface IRepositoryAdmin
+public NodeKey addFileItem(ITicket ticket, + java.io.InputStream istream, + java.lang.String filename, + java.lang.String mimeType, + java.lang.String versionDescription) + throws FileException, + AccessDeniedException, + InvalidParameterException+
IRepository
+
addFileItem
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryistream
- new file, as an input stream - mandatorymimeType
- mime type of file - optionalversionDescription
- human readable comment about the version - optional
+FileException
- if unable to save node due to file error
+AccessDeniedException
- if ticket doesn't allow this action
+InvalidParameterException
- if a required parameter is missing+public NodeKey addPackageItem(ITicket ticket, + java.lang.String dirPath, + java.lang.String startFile, + java.lang.String versionDescription) + throws AccessDeniedException, + InvalidParameterException, + FileException+
IRepository
+
addPackageItem
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatorydirPath
- directory path containing files - mandatorystartFile
- relative path of initial file - optionalversionDescription
- human readable comment about the version - optional
+AccessDeniedException
- if ticket doesn't allow this action
+FileException
- if unable to save node due to file error
+InvalidParameterException
- if a required parameter is missing+public IVersionedNode getFileItem(ITicket ticket, + java.lang.Long uuid, + java.lang.Long version) + throws AccessDeniedException, + ItemNotFoundException, + FileException+
IRepository
+
getFileItem
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryuuid
- id of the file/package - mandatoryversion
- desired version - if null gets latest version
+AccessDeniedException
+ItemNotFoundException
+FileException
+public IVersionedNode getFileItem(ITicket ticket, + java.lang.Long uuid, + java.lang.Long version, + java.lang.String relPath) + throws AccessDeniedException, + ItemNotFoundException, + FileException+
IRepository
+
getFileItem
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryuuid
- id of the package - mandatoryversion
- desired version - if null gets latest version. This is the version
+ of the package node, not the related file.relPath
- relative path within the package - if null,
+ returns start file.
+FileException
- if unable to save node due to file error
+ItemNotFoundException
- if node with uuid cannot be found
+AccessDeniedException
- if ticket doesn't allow this action+public java.util.List getPackageNodes(ITicket ticket, + java.lang.Long uuid, + java.lang.Long version) + throws AccessDeniedException, + ItemNotFoundException, + FileException+
IRepository
+
getPackageNodes
in interface IRepository
ticket
- uuid
- uuid of the package nodeversion
- version of the package node
+ItemNotFoundException
+FileException
+AccessDeniedException
+public java.util.SortedMap getNodeList(ITicket ticket) + throws AccessDeniedException+
IRepository
+ Warning: Once a workspace gets a lot of nodes, this will be + a very very expensive call!!!!! +
++
getNodeList
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatory
+AccessDeniedException
+public java.util.SortedSet getVersionHistory(ITicket ticket, + java.lang.Long uuid) + throws ItemNotFoundException, + AccessDeniedException+
IRepository
+
getVersionHistory
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatory
+ItemNotFoundException
+AccessDeniedException
+public NodeKey updateFileItem(ITicket ticket, + java.lang.Long uuid, + java.lang.String filename, + java.io.InputStream istream, + java.lang.String mimeType, + java.lang.String versionDescription) + throws AccessDeniedException, + ItemNotFoundException, + FileException, + InvalidParameterException+
IRepository
+
updateFileItem
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryuuid
- unique id of the file - mandatoryistream
- new file, as an input stream - mandatoryversionDescription
- human readable comment about the version - optionalmimeType
- mime type of file - optional
+ItemNotFoundException
- if node with uuid cannot be found
+AccessDeniedException
- if ticket doesn't allow this action
+FileException
- if unable to save node due to file error
+InvalidParameterException
- if a required parameter is missing+public NodeKey updatePackageItem(ITicket ticket, + java.lang.Long uuid, + java.lang.String dirPath, + java.lang.String startFile, + java.lang.String versionDescription) + throws AccessDeniedException, + ItemNotFoundException, + FileException, + InvalidParameterException+
IRepository
+
updatePackageItem
in interface IRepository
ticket
- ticket issued on login. Identifies tool and workspace - mandatoryuuid
- unique id of the package - mandatorydirPath
- directory path containing files - mandatorystartFile
- relative path of initial file - optionalversionDescription
- human readable comment about the version - optional
+FileException
- if unable to save node due to file error
+AccessDeniedException
- if ticket doesn't allow this action
+InvalidParameterException
- if a required parameter is missing
+ItemNotFoundException
- if node with uuid cannot be found+public java.lang.String[] deleteNode(ITicket ticket, + java.lang.Long uuid) + throws AccessDeniedException, + InvalidParameterException, + ItemNotFoundException+
IRepository
+
deleteNode
in interface IRepository
ItemNotFoundException
- if node with uuid cannot be found
+AccessDeniedException
- if ticket doesn't allow this action
+InvalidParameterException
- if a required parameter is missing+public java.lang.String[] deleteVersion(ITicket ticket, + java.lang.Long uuid, + java.lang.Long version) + throws AccessDeniedException, + InvalidParameterException, + ItemNotFoundException+
IRepository
+
deleteVersion
in interface IRepository
AccessDeniedException
- if ticket doesn't allow this action
+ItemNotFoundException
- if node with uuid cannot be found
+InvalidParameterException
- if a required parameter is missing+public IWorkspaceDAO getWorkspaceDAO()+
+public void setWorkspaceDAO(IWorkspaceDAO workspaceDAO)+
workspaceDAO
- The workspaceDAO to set.+public ICredentialDAO getCredentialDAO()+
+public void setCredentialDAO(ICredentialDAO credentialDAO)+
credentialDAO
- The credentialDAO to set.+public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) + throws org.springframework.beans.BeansException+
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.SimpleTicket +
+SimpleTicket is a basic implementation of Ticket. +
+ +
+
+Method Summary | +|
+ void |
+clear()
+
++ Make this ticket unusable. |
+
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ java.lang.String |
+getTicketId()
+
++ |
+
+ java.lang.Long |
+getWorkspaceId()
+
++ Get the workspace associated with this ticket + Should only be accessed by the content repository package members. |
+
+ int |
+hashCode()
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Method Detail | +
+public java.lang.Long getWorkspaceId()+
+
getWorkspaceId
in interface ITicket
+public java.lang.String getTicketId()+
getTicketId
in interface ITicket
+public void clear()+
+
+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.SimpleVersionDetail +
+Describes the version details - for displaying a version + history. Thise is a transient object. +
+ +
+
+Method Summary | +|
+ int |
+compareTo(java.lang.Object o)
+
++ Compares this object with the specified object for order. |
+
+ boolean |
+equals(java.lang.Object other)
+
++ |
+
+ java.util.Date |
+getCreatedDateTime()
+
++ Get the date/time of when this version was created. |
+
+ java.lang.String |
+getDescription()
+
++ Get the general text string describing the version. |
+
+ java.lang.Long |
+getVersionId()
+
++ Get the version id. |
+
+ int |
+hashCode()
+
++ |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
getClass, notify, notifyAll, wait, wait, wait |
+
+Method Detail | +
+public java.util.Date getCreatedDateTime()+
IVersionDetail
+
getCreatedDateTime
in interface IVersionDetail
+public java.lang.String getDescription()+
IVersionDetail
+
getDescription
in interface IVersionDetail
+public java.lang.Long getVersionId()+
IVersionDetail
+
getVersionId
in interface IVersionDetail
+public java.lang.String toString()+
+public boolean equals(java.lang.Object other)+
+public int hashCode()+
+public int compareTo(java.lang.Object o) + throws java.lang.ClassCastException+
+
compareTo
in interface java.lang.Comparable
java.lang.ClassCastException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.SimpleVersionedNode +
+This is the default implementation for IVersionedNode. + All the properties in the database. One file can be attached. +
+ The object should be created as follows: +
+ Many methods in this class will throw a RepositoryRuntimeException + if the internal data is missing. This is not indicated + on the method signatures. + + TODO Should these be pooled, instead of creating a new prototype node + each time. Some comments on the web indicate that creating a Spring bean + and wiring it up may be expensive, so we don't want to do it. But looking + at the Spring reference manual, it appears the pooling may hand out + the instances on each method invocation. On other hand, other stuff I've + read suggest that Spring won't manage the lifecycle so destroy doesn't get + called. So, given these objects are being passed back to calling + programs and the difficulty of initialising the db data, its tempting + to make these POJOs not created by Spring. +
+ +
+
+Constructor Summary | +|
SimpleVersionedNode()
+
++ |
+
+Method Summary | +|
+ java.util.List |
+deleteNode()
+
++ Delete all versions of this node, returning the number of nodes + deleted. |
+
+ java.util.List |
+deleteVersion()
+
++ Delete the current version of this node, returning a list of the files + that could not be deleted properly. |
+
+ void |
+destroy()
+
++ Clean up any resources that will not be cleaned up by the garbage + collector after this object is destroyed. |
+
+ java.util.Set |
+getChildNodes()
+
++ If no nodes are found, returns an empty set. |
+
+ java.util.Date |
+getCreatedDateTime()
+
++ Get the date/time of when this node was created. |
+
+ java.io.InputStream |
+getFile()
+
++ Get the file, as an inputstream. |
+
+ IFileDAO |
+getFileDAO()
+
++ |
+
+ IVersionedNode |
+getNode(java.lang.String relPath)
+
++ Another case for the factory? |
+
+ INodeDAO |
+getNodeDAO()
+
++ |
+
+ NodeKey |
+getNodeKey()
+
++ Get the uuid and version of this node/version |
+
+ java.lang.String |
+getNodeType()
+
++ Gets the type of the current node. |
+
+ java.lang.String |
+getPath()
+
++ Get the path of this node |
+
+ java.util.Set |
+getProperties()
+
++ Returns a set of IValue objects - this method could cause a problem + when lazy initialised. |
+
+ IValue |
+getProperty(java.lang.String name)
+
++ Returns the property at relPath relative to this + node. |
+
+ ITicket |
+getTicket()
+
++ Get the ticket through which this node was accessed. |
+
+ java.lang.Long |
+getUUID()
+
++ Returns the UUID of this node as recorded in the node's jcr:UUID + property. |
+
+ java.lang.Long |
+getVersion()
+
++ Get the version of this node. |
+
+ java.util.SortedSet |
+getVersionHistory()
+
++ Get the history for this node. |
+
+ boolean |
+hasNode(java.lang.String relPath)
+
++ Indicates whether a node exists at relPath + Returns true if a node exists at relPath and + false otherwise. |
+
+ boolean |
+hasNodes()
+
++ Indicates whether this node has child nodes. |
+
+ boolean |
+hasParentNode()
+
++ Does this node have a parent node? |
+
+ boolean |
+hasProperties()
+
++ Indicates whether this node has properties. |
+
+ boolean |
+hasProperty(java.lang.String name)
+
++ Indicates whether a property exists for this name + Returns true if a property exists and false otherwise. |
+
+ boolean |
+isNodeType(java.lang.String nodeTypeName)
+
++ (non-Javadoc) |
+
+ void |
+setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
+
++ |
+
+ void |
+setFile(java.io.InputStream iStream,
+ java.lang.String filename,
+ java.lang.String mimeType)
+
++ Set the file, passed in as an inputstream. |
+
+ void |
+setFileDAO(IFileDAO fileDAO)
+
++ |
+
+ void |
+setNodeDAO(INodeDAO nodeDAO)
+
++ |
+
+ void |
+setProperty(java.lang.String name,
+ boolean value)
+
++ Sets the property to a BOOLEAN value. |
+
+ void |
+setProperty(java.lang.String name,
+ java.util.Calendar value)
+
++ Sets the property a CALENDAR value. |
+
+ void |
+setProperty(java.lang.String name,
+ double value)
+
++ Sets the property to a DOUBLE value. |
+
+ void |
+setProperty(java.lang.String name,
+ long value)
+
++ Sets the property to a LONG value. |
+
+ void |
+setProperty(java.lang.String name,
+ java.lang.String value)
+
++ Sets the property to a STRING value. |
+
+ void |
+setProperty(java.lang.String name,
+ java.lang.String value,
+ int type)
+
++ Sets the property to a value, based on the specified type, after converting + from the string. |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public SimpleVersionedNode()+
+Method Detail | +
+public NodeKey getNodeKey()+
IVersionedNode
+
getNodeKey
in interface IVersionedNode
+public void setProperty(java.lang.String name, + java.lang.String value, + int type)+
IVersionedNodeAdmin
+
setProperty
in interface IVersionedNodeAdmin
name
- The name of a property of this nodevalue
- The value to be assignedtype
- The type of the property+public void setProperty(java.lang.String name, + java.lang.String value) + throws RepositoryRuntimeException+
IVersionedNodeAdmin
+
setProperty
in interface IVersionedNodeAdmin
name
- The name of a property of this nodevalue
- The value to be assigned
+RepositoryRuntimeException
+public void setProperty(java.lang.String name, + boolean value)+
IVersionedNodeAdmin
+
setProperty
in interface IVersionedNodeAdmin
name
- The name of a property of this nodevalue
- The value to be assigned+public void setProperty(java.lang.String name, + double value)+
IVersionedNodeAdmin
+
setProperty
in interface IVersionedNodeAdmin
name
- The name of a property of this nodevalue
- The value to be assigned+public void setProperty(java.lang.String name, + long value)+
IVersionedNodeAdmin
+
setProperty
in interface IVersionedNodeAdmin
name
- The name of a property of this nodevalue
- The value to be assigned+public void setProperty(java.lang.String name, + java.util.Calendar value)+
IVersionedNodeAdmin
+
setProperty
in interface IVersionedNodeAdmin
name
- The name of a property of this nodevalue
- The value to be assigned+public IValue getProperty(java.lang.String name)+
IVersionedNode
+
getProperty
in interface IVersionedNode
name
-
+IVersionedNode.getProperty(java.lang.String)
+public java.util.Set getProperties()+
+
getProperties
in interface IVersionedNode
+public java.lang.Long getUUID()+
IVersionedNode
+
getUUID
in interface IVersionedNode
IVersionedNode.getUUID()
+public boolean hasProperty(java.lang.String name)+
IVersionedNode
+
hasProperty
in interface IVersionedNode
name
- The name of a (possible) property.
+IVersionedNode.hasProperty(java.lang.String)
+public boolean hasProperties()+
IVersionedNode
+
hasProperties
in interface IVersionedNode
IVersionedNode.hasProperties()
+public java.lang.String getNodeType()+
IVersionedNode
NodeType
for
+ possible node types. Note: the node type is shared across all
+ versions of a node
++
getNodeType
in interface IVersionedNode
IVersionedNode.getNodeType()
+public boolean isNodeType(java.lang.String nodeTypeName)+
+
isNodeType
in interface IVersionedNode
nodeTypeName
- the name of a node type.
+IVersionedNode.isNodeType(java.lang.String)
+public java.util.SortedSet getVersionHistory()+
+
getVersionHistory
in interface IVersionedNode
+public java.lang.String getPath()+
IVersionedNode
+
getPath
in interface IVersionedNode
IVersionedNode.getPath()
+public ITicket getTicket()+
IVersionedNode
+
getTicket
in interface IVersionedNode
IVersionedNode.getTicket()
+public java.lang.Long getVersion()+
IVersionedNode
+
getVersion
in interface IVersionedNode
IVersionedNode.getVersion()
+public java.util.Date getCreatedDateTime()+
IVersionedNode
+
getCreatedDateTime
in interface IVersionedNode
IVersionedNode.getCreatedDateTime()
+public java.io.InputStream getFile() + throws FileException+
+
getFile
in interface IVersionedNode
FileException
+public void setFile(java.io.InputStream iStream, + java.lang.String filename, + java.lang.String mimeType) + throws InvalidParameterException+
+
setFile
in interface IVersionedNodeAdmin
iStream
- mandatoryfilename
- mandatorymimeType
- optional
+InvalidParameterException
+public java.lang.String toString()+
+public IVersionedNode getNode(java.lang.String relPath) + throws ItemNotFoundException+
+
getNode
in interface IVersionedNode
relPath
- The relative path of the node to retrieve.
+ItemNotFoundException
- If no node exists at the
+ specified path.IVersionedNode.getNode(String relPath)
+public java.util.Set getChildNodes()+
+
getChildNodes
in interface IVersionedNode
IVersionedNode.getChildNodes()
+public boolean hasParentNode()+
IVersionedNode
+
hasParentNode
in interface IVersionedNode
IVersionedNode.hasParentNode()
+public boolean hasNode(java.lang.String relPath)+
IVersionedNode
+
hasNode
in interface IVersionedNode
relPath
- The path of a (possible) node.
+IVersionedNode.hasNode(String relPath)
+public boolean hasNodes()+
IVersionedNode
+
hasNodes
in interface IVersionedNode
IVersionedNode.hasNodes()
+public java.util.List deleteNode()+
+
deleteNode
in interface IVersionedNodeAdmin
IVersionedNodeAdmin.deleteNode()
+public java.util.List deleteVersion()+
IVersionedNodeAdmin
+
deleteVersion
in interface IVersionedNodeAdmin
IVersionedNodeAdmin.deleteVersion()
+public INodeDAO getNodeDAO()+
+public void setNodeDAO(INodeDAO nodeDAO)+
nodeDAO
- The nodeDAO to set.+public IFileDAO getFileDAO()+
+public void setFileDAO(IFileDAO fileDAO)+
fileDAO
- The fileDAO to set.+public void destroy()+
+
+public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) + throws org.springframework.beans.BeansException+
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++junit.framework.Assert +
junit.framework.TestCase +
org.lamsfoundation.lams.contentrepository.BaseTestCase +
org.lamsfoundation.lams.contentrepository.TestSimpleRepository +
+Test SimpleRepository and the Credentials code. +
+ +
+
+Constructor Summary | +|
TestSimpleRepository()
+
++ Constructor for SimpleRepositoryTest. |
+
+Method Summary | +|
+ void |
+testAddWorkspace()
+
++ |
+
+ void |
+testFileItemDeleteNode()
+
++ create a node with two versions and test deleting them using delete node |
+
+ void |
+testFileItemDeleteNodeFileProb()
+
++ create a node with two versions and test deleting them using delete node + but first rig the files so one of them is already gone and the other one is + read only. |
+
+ void |
+testFileItemDeleteVersion()
+
++ create a node with two versions and test deleting them using delete version |
+
+ void |
+testLoginFailWrongPassword()
+
++ |
+
+ void |
+testLoginFailWrongUser()
+
++ |
+
+ void |
+testLoginFailWrongWorkspaceDoesNotExist()
+
++ |
+
+ void |
+testLoginFailWrongWorkspaceExists()
+
++ |
+
+ void |
+testLoginPass()
+
++ |
+
+ void |
+testLogout()
+
++ |
+
+ void |
+testPackageItem()
+
++ |
+
+ void |
+testUserAdmin()
+
++ Tests adding a new user and changing a password |
+
+ void |
+testWrongWorkspaceAccess()
+
++ Checks that the system will give us an error if we get try to + get a node that belongs to a different workspace to our ticket. |
+
Methods inherited from class junit.framework.TestCase | +
countTestCases, getName, run, run, runBare, setName, toString |
+
Methods inherited from class junit.framework.Assert | +
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public TestSimpleRepository()+
+
+Method Detail | +
+public void testLoginPass()+
+public void testLoginFailWrongUser()+
+public void testLoginFailWrongPassword()+
+public void testLoginFailWrongWorkspaceExists()+
+public void testLoginFailWrongWorkspaceDoesNotExist()+
+public void testAddWorkspace()+
+public void testUserAdmin()+
+
+public void testFileItemDeleteVersion()+
+
+public void testFileItemDeleteNode()+
+
+public void testFileItemDeleteNodeFileProb()+
+
+public void testPackageItem()+
+public void testLogout()+
+public void testWrongWorkspaceAccess()+
+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++junit.framework.Assert +
junit.framework.TestCase +
org.lamsfoundation.lams.contentrepository.BaseTestCase +
org.lamsfoundation.lams.contentrepository.TestSimpleTicket +
+Test the SimpleTicket class. Tests the methods for + the ITicket interface. +
+ +
+
+Constructor Summary | +|
TestSimpleTicket()
+
++ Constructor for TestSimpleTicket. |
+
+Method Summary | +|
+ void |
+testGetTicketId()
+
++ |
+
+ void |
+testGetWorkspaceId()
+
++ |
+
Methods inherited from class junit.framework.TestCase | +
countTestCases, getName, run, run, runBare, setName, toString |
+
Methods inherited from class junit.framework.Assert | +
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public TestSimpleTicket() + throws LoginException, + AccessDeniedException, + WorkspaceNotFoundException+
+ +
WorkspaceNotFoundException
+AccessDeniedException
+LoginException
+Method Detail | +
+public void testGetWorkspaceId()+
+public void testGetTicketId()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++junit.framework.Assert +
junit.framework.TestCase +
org.lamsfoundation.lams.contentrepository.TestSimpleVersionDetail +
+Checks creation and ordering of SimpleVersionDetail objects, + using the IVersionDetail interface. + + Needs to be in the same package as SimpleVersionDetail + to access protected constructor. +
+ +
+
+Constructor Summary | +|
TestSimpleVersionDetail()
+
++ |
+
+Method Summary | +|
+ void |
+testCompareTo()
+
++ |
+
+ void |
+testEqualsObject()
+
++ |
+
+ void |
+testGetCreatedDateTime()
+
++ |
+
+ void |
+testGetDescription()
+
++ |
+
+ void |
+testGetVersionId()
+
++ |
+
Methods inherited from class junit.framework.TestCase | +
countTestCases, getName, run, run, runBare, setName, toString |
+
Methods inherited from class junit.framework.Assert | +
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public TestSimpleVersionDetail()+
+Method Detail | +
+public void testGetCreatedDateTime()+
+public void testGetDescription()+
+public void testGetVersionId()+
+public void testEqualsObject()+
+public void testCompareTo()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++junit.framework.Assert +
junit.framework.TestCase +
org.lamsfoundation.lams.contentrepository.BaseTestCase +
org.lamsfoundation.lams.contentrepository.TestSimpleVersionedNode +
+
+Constructor Summary | +|
TestSimpleVersionedNode()
+
++ Constructor for TestSimpleVersionedNode. |
+
+Method Summary | +|
+ void |
+testAddNode()
+
++ |
+
+ void |
+testAddNodeBadType()
+
++ |
+
+ void |
+testBinaryFileNode()
+
++ |
+
+ void |
+testClearPropertyStringIValue()
+
++ |
+
+ void |
+testGetCreatedDateTime()
+
++ |
+
+ void |
+testGetNodeType()
+
++ |
+
+ void |
+testGetPath()
+
++ |
+
+ void |
+testGetProperties()
+
++ |
+
+ void |
+testGetVersion()
+
++ |
+
+ void |
+testGetVersionHistory()
+
++ |
+
+ void |
+testHasProperties()
+
++ |
+
+ void |
+testHasProperty()
+
++ |
+
+ void |
+testIsNodeType()
+
++ |
+
+ void |
+testSetPropertySpecifiedType()
+
++ |
+
+ void |
+testSetPropertyStringboolean()
+
++ |
+
+ void |
+testSetPropertyStringCalendar()
+
++ |
+
+ void |
+testSetPropertyStringdouble()
+
++ |
+
+ void |
+testSetPropertyStringIValue()
+
++ |
+
+ void |
+testSetPropertyStringlong()
+
++ |
+
+ void |
+testSetPropertyStringString()
+
++ |
+
+ void |
+testTextFileNode()
+
++ |
+
Methods inherited from class junit.framework.TestCase | +
countTestCases, getName, run, run, runBare, setName, toString |
+
Methods inherited from class junit.framework.Assert | +
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public TestSimpleVersionedNode() + throws ItemExistsException, + NoSuchNodeTypeException, + RepositoryCheckedException+
+ +
RepositoryCheckedException
+NoSuchNodeTypeException
+ItemExistsException
+Method Detail | +
+public void testSetPropertyStringIValue()+
+public void testSetPropertySpecifiedType()+
+public void testSetPropertyStringString()+
+public void testSetPropertyStringboolean()+
+public void testSetPropertyStringdouble()+
+public void testSetPropertyStringlong()+
+public void testSetPropertyStringCalendar()+
+public void testClearPropertyStringIValue()+
+public void testGetProperties()+
+public void testHasProperty()+
+public void testHasProperties()+
+public void testGetNodeType()+
+public void testIsNodeType()+
+public void testGetVersionHistory()+
+public void testGetPath()+
+public void testGetVersion()+
+public void testGetCreatedDateTime()+
+public void testAddNode()+
+public void testTextFileNode()+
+public void testBinaryFileNode()+
+public void testAddNodeBadType()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.ValidationException +
+The node is invalid for some reason. The reason should be given in + the exception message. +
+ +
+
+Constructor Summary | +|
ValidationException()
+
++ Constructs a new instance of this class. |
+|
ValidationException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
ValidationException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
ValidationException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public ValidationException()+
+
+public ValidationException(java.lang.String s)+
+
s
- description+public ValidationException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public ValidationException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.ValueFormatException +
+Thrown when value is assigned to a propery of the wrong type, or some + other formatting type problem. +
+ +
+
+Constructor Summary | +|
ValueFormatException()
+
++ Constructs a new instance of this class. |
+|
ValueFormatException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
ValueFormatException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
ValueFormatException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public ValueFormatException()+
+
+public ValueFormatException(java.lang.String s)+
+
s
- description+public ValueFormatException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public ValueFormatException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.lamsfoundation.lams.contentrepository.RepositoryCheckedException +
org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException +
+Requested workspace not found. +
+ +
+
+Constructor Summary | +|
WorkspaceNotFoundException()
+
++ Constructs a new instance of this class. |
+|
WorkspaceNotFoundException(java.lang.String s)
+
++ Constructs a new instance of this class given a message describing the + failure cause. |
+|
WorkspaceNotFoundException(java.lang.String s,
+ java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a message describing the + failure and a root throwable. |
+|
WorkspaceNotFoundException(java.lang.Throwable cause)
+
++ Constructs a new instance of this class given a root throwable. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.RepositoryCheckedException | +
getMessage |
+
Methods inherited from class java.lang.Throwable | +
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public WorkspaceNotFoundException()+
+
+public WorkspaceNotFoundException(java.lang.String s)+
+
s
- description+public WorkspaceNotFoundException(java.lang.String s, + java.lang.Throwable cause)+
+
s
- descriptioncause
- root throwable cause+public WorkspaceNotFoundException(java.lang.Throwable cause)+
+
cause
- root failure cause
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +ICredentials + +IRepository + +IRepositoryAdmin + +ITicket + +IValue + +IVersionDetail + +IVersionedNode + +IVersionedNodeAdmin + +IWorkspace |
+
+Classes
+
+ +AllTests + +BaseTestCase + +CheckCredentialTicketBeforeAdvice + +CrCredential + +CrNode + +CrNodeVersion + +CrNodeVersionProperty + +CrWorkspace + +CrWorkspaceCredential + +NodeKey + +NodeTransactionTest + +NodeType + +PropertyName + +PropertyType + +SimpleCredentials + +SimpleRepository + +SimpleTicket + +SimpleVersionDetail + +SimpleVersionedNode + +TestSimpleRepository + +TestSimpleTicket + +TestSimpleVersionDetail + +TestSimpleVersionedNode |
+
+Exceptions
+
+ +AccessDeniedException + +FileException + +InvalidParameterException + +ItemExistsException + +ItemNotFoundException + +LoginException + +NoSuchNodeTypeException + +RepositoryCheckedException + +RepositoryRuntimeException + +ValidationException + +ValueFormatException + +WorkspaceNotFoundException |
+
+
+
|
++ + | +||||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
ICredentials | +Base interface for all credentials that may be passed to the + Repository.login() method. | +
IRepository | +Tool access to the repository | +
IRepositoryAdmin | +Administrative interface to the Repository. | +
ITicket | +Ticket represents the "authorisation" key to the repository. | +
IValue | +A value is an object which is explicitly marked with a type. | +
IVersionDetail | +Describes the version of a node. | +
IVersionedNode | +The IVersionedNode interface represents a particular version of a node + in the hierarchy that makes up the repository. | +
IVersionedNodeAdmin | +IVersionedNodeAdmin represents the full functionality for a versioned node. | +
IWorkspace | +A workspace is a grouping of content, which is accessed by a ticket. | +
+ +
+Class Summary | +|
AllTests | +Runs all the currently implemented tests for the Content Repository. | +
BaseTestCase | ++ |
CheckCredentialTicketBeforeAdvice | +Ticket checking functionality for implementers of IRepositoryAdmin. | +
CrCredential | ++ |
CrNode | ++ |
CrNodeVersion | ++ |
CrNodeVersionProperty | ++ |
CrWorkspace | ++ |
CrWorkspaceCredential | ++ |
NodeKey | +Represents the two part key - UUID and version. | +
NodeTransactionTest | +Test the node's transaction handling. | +
NodeType | +Defines the types of nodes. | +
PropertyName | ++ |
PropertyType | +LAMS property types. | +
SimpleCredentials | +Basic implementation of credentials. | +
SimpleRepository | +Many methods in this class will throw a RepositoryRuntimeException + if the internal data is missing. | +
SimpleTicket | +SimpleTicket is a basic implementation of Ticket. | +
SimpleVersionDetail | +Describes the version details - for displaying a version + history. | +
SimpleVersionedNode | +This is the default implementation for IVersionedNode. | +
TestSimpleRepository | +Test SimpleRepository and the Credentials code. | +
TestSimpleTicket | +Test the SimpleTicket class. | +
TestSimpleVersionDetail | +Checks creation and ordering of SimpleVersionDetail objects, + using the IVersionDetail interface. | +
TestSimpleVersionedNode | ++ |
+ +
+Exception Summary | +|
AccessDeniedException | +The current ticket doesn't have sufficient rights for the requested action. | +
FileException | +Some error was generated reading or writing the files + to disk. | +
InvalidParameterException | +Generic exception thrown whenever a parameter is missing. | +
ItemExistsException | +An item already exists with the given id or path. | +
ItemNotFoundException | +Item requested does not exist. | +
LoginException | +Login failed. | +
NoSuchNodeTypeException | +Tried to create a node with an unknown type. | +
RepositoryCheckedException | +Main exception thrown by content repository classes. | +
RepositoryRuntimeException | +Main runtime exception thrown by content repository classes. | +
ValidationException | +The node is invalid for some reason. | +
ValueFormatException | +Thrown when value is assigned to a propery of the wrong type, or some + other formatting type problem. | +
WorkspaceNotFoundException | +Requested workspace not found. | +
+
+This content repository is designed to store single files and +packages of files on disk in a relatively. It is not a full +blown repository as you would find behind a web development +package. +
++Each entry in the repository is represented as a "node", which +has a unique id or uuid. Each node belongs to a workspace, and +there may be many versions to the node. The files are stored on disk +and the information about the files is stored in the lams_cr_* tables +in the database. +
++A node may represent a single file (a FILENODE) or be a package node. A +package node has a set of child nodes which are file nodes. +
+The repository keeps a set of properties for each node. At the moment, +these are read only to tools. An additional parameter +containing arbitrary nodes could easily be added to the repository +calls and this would allow the repository to store arbitrary properties +on behalf of tools. +
+ +The classes of interest to tools are as follows. Apart from SimpleCredentials, tools should use the interfaces +and not the implemented classes to allow the implementation to be changed in the future. + +
ICredentials,SimpleCredentials | SimpleCredentials is an implementation of ICredentials. To log in, the +tool will create a SimpleCredentials object. |
IRepository | The interface used for access to the repository. This is the equivalent of a SLSB interface +to the repository. It is implemented by singleton SimpleRepository and accessed via the Spring context. |
ITicket | The Ticket represents the "authorisation" key to the repository. When the tool logs in, it +will be passed a SimpleTicket object, which implements the ITicket interface. This ticket must be supplied +back to the repository to access the tool's nodes. |
IValue | An object that allows the value of a property to be used as a String, Long, Double, Boolean +or Calendar. At present, only Strings have been used so other types (particularly Calendar) may not +function correctly. Implemented by CrNodeVersionProperty (a Hibernate based data object). |
IVersionDetail | Describes the versions of a node. Useful for displaying a version history if the +user needs to select a particular version. Implemented by SimpleVersionDetail. |
IVersionedNode | The IVersionedNode interface represents a particular version of a node. When +the tool asks for a file or package, it will be returned the node representing the files. This node +will allow the package to get not only the filestream but the original file name and mime type. |
NodeKey | The key to a node is made up of the UUID (Long) and a version (Long). This class +encapsulates both keys, and is used to return the keys when a node is created/updated. |
NodeType | Defines all the valid node types. Used for testing +whether something is a file node or a package node: e.g. isNodeType(NodeType.FILENODE). |
PropertyName | Defines all the current property names - such as MIMETYPE, FILENAME. +Used to get the appropriate property from a node. e.g. IValue value = node.getProperty(PropertyName.MIMETYPE). |
PropertyType | Defines what type a property really is - String, Long, Double, etc. |
Note: All interfaces with Admin in their name are only to be used within the repository and must not be used by tools. +It is intended to make these protected interfaces if possible - they are used by Spring so this may be difficult.
+ ++Sample usage of the repository can be seen in example webapp, built as lamscr.war. The struts classes +are in org.lamsfoundation.lams.contentrepository.struts (in the src hierarchy) +and the jsps are in the web hierarchy. +
+ +When a tool is installed, it should identify itself to the repository and create a new workspace
++ ApplicationContext context = new ClassPathXmlApplicationContext(IRepository.REPOSITORY_CONTEXT_PATH); + IRepository repository = (IRepository)context.getBean(IRepository.REPOSITORY_SERVICE_ID); + ICredentials cred = new SimpleCredentials(toolName, toolId); + repository.createCredential(cred); + repository.addWorkspace(cred, workspaceName); ++ +
Before accessing the repository, the tool will need to log in. +Once the tool has been given a ticket, it must use the same repository +object (ie a repository returned by the same context). If it gets a repository +from a different context, the ticket will not be recognised and access denied. +This is a shortcoming in the repository and needs to be fixed. +
+There is currently no timeout on a ticket (despite what the exception +says) so the tool may keep it for months if it wants. But if the tool +receives an access denied exception, then something has gone wrong and the +ticket is no longer valid so the tool should log in again and get a new +ticket.
++ ITicket ticket = repository.login(cred, workspaceName); ++ +
Using the ticket, the tool can now add, retrieve and delete nodes. Deleting a package +node deletes all the files in the package. Warning: deleting +removes the node completely - from both the database and the file system.
++ NodeKey fileNodeKeyV1 = repository.login.addFileItem(ticket, inputstream, filename, + mimeType, versionDescription); + IVersionedNode version1Node = repository.getFileItem(ticket,fileNodeKeyV1.getUuid(), fileNodeKeyV1.getVersion()); + + NodeKey fileNodeKeyV2 = getRepository().updateFileItem(ticket, fileNodeKeyV1.getUuid(), filename, + IVersionedNode version2Node = repository.getFileItem(ticket,fileNodeKeyV2.getUuid(), fileNodeKeyV2.getVersion()); + IVersionedNode latestFileVersionNode = repository.getFileItem(ticket,fileNodeKeyV2.getUuid(), null); + InputStream isForOutputToScreen1 = latestFileVersionNode.getFile(); + + String[] problemFiles = repository.deleteVersion(ticket,fileNodeKeyV1.getUuid(), fileNodeKeyV1.getVersion()); + + NodeKey packageNodeKeyV1 = repository.addPackageItem(ticket,directoryName, initialFile, versionDescription); + IVersionedNode package1Node = repository.getFileItem(packageNodeKeyV1.getUuid(), packageNodeKeyV1.getVersion()); + + NodeKey packageNodeKeyV2 = repository.updatePackageItem(ticket, packageNodeKeyV1.getUuid(), directoryName, initialFile, versionDescription); + IVersionedNode package2Node = repository.getFileItem(packageNodeKeyV2.getUuid(), packageNodeKeyV2.getVersion()); + IVersionedNode latestPackageVersionNode = repository.getFileItem(ticket,fileNodeKeyV2.getUuid(), null); + InputStream isForOutputToScreen2 = latestPackageVersionNode(); + + String[] problemFiles2 = getRepository().deleteNode(ticket,packageNodeKeyV1.getUuid()); ++ +
When the tool is complete, it should logout from the repository. This +invalidates the ticket.
++ repository.logout(ticket); ++
There are two sorts of exceptions - RepositoryCheckedException and +RepositoryRuntimeException.
+ +RepositoryRuntimeException may be thrown +by any call to the repository irrespective of whether it is defined +in the signature. It is used for internal errors, not errors caused +by bad input from a tool. The repository may also thrown other runtime +errors, such as the Spring runtime errors which wrap Hibernate errors. +
+ +RepositoryCheckedException is the superclass to 10 detailed +checked exceptions. Most calls throw more than one detailed exception. +Calling code can catch either the detailed exceptions or just +RepositoryCheckedException.
+ +All the calls on IRepository should be transactional, defined +in the Spring context file. If any are not defined in the context file, then +this is a bug and should be corrected!!!!!!!!!. All +of the transactions should roll back on both the RepositoryCheckedException +(as it is defined in the context file) and RepositoryRuntimeException +as the Spring trasactions will roll back on any RuntimeException. +However, all we can roll back are database changes. We cannot roll back +file system changes. For this reason, we try to do the database changes +first. But it isn't perfect.
+ +After configuring (see previous section) use the ANT Build script to build and deploy +the content repository code. +
+ +
+
+
+
|
++ + | +||||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use org.lamsfoundation.lams.contentrepository | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao | ++ |
org.lamsfoundation.lams.contentrepository.dao.file | ++ |
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
org.lamsfoundation.lams.contentrepository.struts.action | ++ |
+Classes in org.lamsfoundation.lams.contentrepository used by org.lamsfoundation.lams.contentrepository | +|
AccessDeniedException
+
+ + The current ticket doesn't have sufficient rights for the requested action. |
+|
BaseTestCase
+
+ + |
+|
CrCredential
+
+ + |
+|
CrNode
+
+ + |
+|
CrNodeVersion
+
+ + |
+|
CrNodeVersionProperty
+
+ + |
+|
CrWorkspace
+
+ + |
+|
FileException
+
+ + Some error was generated reading or writing the files + to disk. |
+|
ICredentials
+
+ + Base interface for all credentials that may be passed to the + Repository.login() method. |
+|
InvalidParameterException
+
+ + Generic exception thrown whenever a parameter is missing. |
+|
IRepository
+
+ + Tool access to the repository |
+|
IRepositoryAdmin
+
+ + Administrative interface to the Repository. |
+|
ItemExistsException
+
+ + An item already exists with the given id or path. |
+|
ItemNotFoundException
+
+ + Item requested does not exist. |
+|
ITicket
+
+ + Ticket represents the "authorisation" key to the repository. |
+|
IValue
+
+ + A value is an object which is explicitly marked with a type. |
+|
IVersionDetail
+
+ + Describes the version of a node. |
+|
IVersionedNode
+
+ + The IVersionedNode interface represents a particular version of a node + in the hierarchy that makes up the repository. |
+|
IVersionedNodeAdmin
+
+ + IVersionedNodeAdmin represents the full functionality for a versioned node. |
+|
IWorkspace
+
+ + A workspace is a grouping of content, which is accessed by a ticket. |
+|
LoginException
+
+ + Login failed. |
+|
NodeKey
+
+ + Represents the two part key - UUID and version. |
+|
NoSuchNodeTypeException
+
+ + Tried to create a node with an unknown type. |
+|
RepositoryCheckedException
+
+ + Main exception thrown by content repository classes. |
+|
RepositoryRuntimeException
+
+ + Main runtime exception thrown by content repository classes. |
+|
ValueFormatException
+
+ + Thrown when value is assigned to a propery of the wrong type, or some + other formatting type problem. |
+|
WorkspaceNotFoundException
+
+ + Requested workspace not found. |
+
+Classes in org.lamsfoundation.lams.contentrepository used by org.lamsfoundation.lams.contentrepository.dao | +|
CrCredential
+
+ + |
+|
CrWorkspace
+
+ + |
+|
FileException
+
+ + Some error was generated reading or writing the files + to disk. |
+|
ICredentials
+
+ + Base interface for all credentials that may be passed to the + Repository.login() method. |
+|
IWorkspace
+
+ + A workspace is a grouping of content, which is accessed by a ticket. |
+|
RepositoryRuntimeException
+
+ + Main runtime exception thrown by content repository classes. |
+
+Classes in org.lamsfoundation.lams.contentrepository used by org.lamsfoundation.lams.contentrepository.dao.file | +|
BaseTestCase
+
+ + |
+|
FileException
+
+ + Some error was generated reading or writing the files + to disk. |
+
+Classes in org.lamsfoundation.lams.contentrepository used by org.lamsfoundation.lams.contentrepository.dao.hibernate | +|
CrCredential
+
+ + |
+|
CrWorkspace
+
+ + |
+|
ICredentials
+
+ + Base interface for all credentials that may be passed to the + Repository.login() method. |
+|
IWorkspace
+
+ + A workspace is a grouping of content, which is accessed by a ticket. |
+|
RepositoryCheckedException
+
+ + Main exception thrown by content repository classes. |
+|
RepositoryRuntimeException
+
+ + Main runtime exception thrown by content repository classes. |
+
+Classes in org.lamsfoundation.lams.contentrepository used by org.lamsfoundation.lams.contentrepository.struts.action | +|
AccessDeniedException
+
+ + The current ticket doesn't have sufficient rights for the requested action. |
+|
FileException
+
+ + Some error was generated reading or writing the files + to disk. |
+|
InvalidParameterException
+
+ + Generic exception thrown whenever a parameter is missing. |
+|
IRepository
+
+ + Tool access to the repository |
+|
ItemNotFoundException
+
+ + Item requested does not exist. |
+|
RepositoryCheckedException
+
+ + Main exception thrown by content repository classes. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use AccessDeniedException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.struts.action | ++ |
+Uses of AccessDeniedException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw AccessDeniedException | +|
+ void |
+CheckCredentialTicketBeforeAdvice.before(java.lang.reflect.Method m,
+ java.lang.Object[] args,
+ java.lang.Object target)
+
++ |
+
+ ITicket |
+SimpleRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ void |
+SimpleRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Add a workspace, giving the credentials as the user of this workspace. |
+
+ void |
+SimpleRepository.createCredential(ICredentials newCredential)
+
++ Create a new repository "user" - usually a tool. |
+
+ void |
+SimpleRepository.updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ void |
+SimpleRepository.assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Assign credentials to a workspace. |
+
+ void |
+SimpleRepository.logout(ITicket ticket)
+
++ |
+
+ NodeKey |
+SimpleRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version,
+ java.lang.String relPath)
+
++ |
+
+ java.util.List |
+SimpleRepository.getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ java.util.SortedMap |
+SimpleRepository.getNodeList(ITicket ticket)
+
++ |
+
+ java.util.SortedSet |
+SimpleRepository.getVersionHistory(ITicket ticket,
+ java.lang.Long uuid)
+
++ |
+
+ NodeKey |
+SimpleRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ java.lang.String[] |
+SimpleRepository.deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ |
+
+ java.lang.String[] |
+SimpleRepository.deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ ITicket |
+IRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Login, creating a new ticket for the given credentials and specified + workspace. |
+
+ void |
+IRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Create a new workspace, with the tool identified in the creditials + as the owner. |
+
+ void |
+IRepository.createCredential(ICredentials newCredential)
+
++ Create a new repository "user" - usually a tool. |
+
+ void |
+IRepository.updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ NodeKey |
+IRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Add a new file to the repository. |
+
+ NodeKey |
+IRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ NodeKey |
+IRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Update an existing file in the repository. |
+
+ NodeKey |
+IRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Get an item from the repository based on the UUID. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.lang.String relPath)
+
++ Get an item from the repository based on the UUID and relative + path. |
+
+ java.util.List |
+IRepository.getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Return a list of all the nodes for a package. |
+
+ java.util.SortedSet |
+IRepository.getVersionHistory(ITicket ticket,
+ java.lang.Long uuid)
+
++ Get the history for a node. |
+
+ java.lang.String[] |
+IRepository.deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Delete the current version of a node, returning a list of the files + that could not be deleted properly. |
+
+ java.lang.String[] |
+IRepository.deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ Delete a node and all its versions, returning a list of the files + that could not be deleted properly. |
+
+ void |
+IRepository.logout(ITicket ticket)
+
++ Finish using this ticket. |
+
+ java.util.SortedMap |
+IRepository.getNodeList(ITicket ticket)
+
++ Get a complete list of all nodes in the workspace and their + version histories. |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository that throw AccessDeniedException | +|
TestSimpleTicket()
+
++ Constructor for TestSimpleTicket. |
+
+Uses of AccessDeniedException in org.lamsfoundation.lams.contentrepository.struts.action | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.struts.action that throw AccessDeniedException | +|
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.getList(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Get the list of nodes in the workspace. |
+
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.viewPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Get the list of nodes in the workspace. |
+
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.deleteNode(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Delete a version of a node, or the whole node. |
+
+ org.apache.struts.action.ActionForward |
+AddFileContentAction.uploadFile(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a single file. |
+
+ org.apache.struts.action.ActionForward |
+AddFileContentAction.uploadPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a package |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use BaseTestCase | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao.file | ++ |
+Uses of BaseTestCase in org.lamsfoundation.lams.contentrepository | +
+ +
Subclasses of BaseTestCase in org.lamsfoundation.lams.contentrepository | +|
+ class |
+TestSimpleRepository
+
++ Test SimpleRepository and the Credentials code. |
+
+ class |
+TestSimpleTicket
+
++ Test the SimpleTicket class. |
+
+ class |
+TestSimpleVersionedNode
+
++ |
+
+Uses of BaseTestCase in org.lamsfoundation.lams.contentrepository.dao.file | +
+ +
Subclasses of BaseTestCase in org.lamsfoundation.lams.contentrepository.dao.file | +|
+ class |
+TestFileDAO
+
++ |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use CrCredential | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao | ++ |
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Uses of CrCredential in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return CrCredential | +|
+ CrCredential |
+CrWorkspaceCredential.getCrCredential()
+
++ |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type CrCredential | +|
+ void |
+CrWorkspaceCredential.setCrCredential(CrCredential crCredential)
+
++ |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository with parameters of type CrCredential | +|
CrWorkspaceCredential(CrWorkspace crWorkspace,
+ CrCredential crCredential)
+
++ full constructor |
+
+Uses of CrCredential in org.lamsfoundation.lams.contentrepository.dao | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao that return CrCredential | +|
+ CrCredential |
+ICredentialDAO.findByName(java.lang.String name)
+
++ |
+
+Uses of CrCredential in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao.hibernate that return CrCredential | +|
+ CrCredential |
+CredentialDAO.findByName(java.lang.String name)
+
++ |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use CrNode | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of CrNode in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return CrNode | +|
+ CrNode |
+CrNodeVersion.getNode()
+
++ |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type CrNode | +|
+ void |
+CrNodeVersion.setNode(CrNode node)
+
++ |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository with parameters of type CrNode | +|
CrNodeVersion(java.lang.Long versionId,
+ java.util.Date createdDateTime,
+ CrNode node,
+ CrNodeVersion parentNodeVersion,
+ java.util.Set crNodeVersionProperties,
+ java.util.Set childNodeVersions)
+
++ full constructor |
+|
CrNodeVersion(java.lang.Long versionId,
+ CrNode node,
+ CrNodeVersion parentNodeVersion,
+ java.util.Set crNodeVersionProperties,
+ java.util.Set childNodeVersions)
+
++ minimal constructor |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use CrNodeVersion | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of CrNodeVersion in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return CrNodeVersion | +|
+ CrNodeVersion |
+CrNodeVersionProperty.getCrNodeVersion()
+
++ |
+
+ CrNodeVersion |
+CrNodeVersion.getParentNodeVersion()
+
++ |
+
+ CrNodeVersion |
+CrNodeVersion.getChildNodeVersion(java.lang.String relPath)
+
++ Remove a child node to the childNodeVersions collection. |
+
+ CrNodeVersion |
+CrNode.getNodeVersion(java.lang.Long versionId)
+
++ Get a particular version of this node |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type CrNodeVersion | +|
+ void |
+CrNodeVersionProperty.setCrNodeVersion(CrNodeVersion crNodeVersion)
+
++ |
+
+ void |
+CrNodeVersion.setParentNodeVersion(CrNodeVersion parentNodeVersion)
+
++ |
+
+ void |
+CrNodeVersion.addChildNodeVersion(CrNodeVersion childNode)
+
++ Add a child node to the childNodeVersions collection. |
+
+ void |
+CrNodeVersion.removeChildNodeVersion(CrNodeVersion childNode)
+
++ Remove a child node to the childNodeVersions collection. |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository with parameters of type CrNodeVersion | +|
CrNodeVersionProperty(java.lang.String name,
+ java.lang.String value,
+ int type,
+ CrNodeVersion crNodeVersion)
+
++ full constructor |
+|
CrNodeVersion(java.lang.Long versionId,
+ java.util.Date createdDateTime,
+ CrNode node,
+ CrNodeVersion parentNodeVersion,
+ java.util.Set crNodeVersionProperties,
+ java.util.Set childNodeVersions)
+
++ full constructor |
+|
CrNodeVersion(java.lang.Long versionId,
+ CrNode node,
+ CrNodeVersion parentNodeVersion,
+ java.util.Set crNodeVersionProperties,
+ java.util.Set childNodeVersions)
+
++ minimal constructor |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use CrNodeVersionProperty | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of CrNodeVersionProperty in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return CrNodeVersionProperty | +|
+ CrNodeVersionProperty |
+CrNodeVersion.getProperty(java.lang.String name)
+
++ Get a property value |
+
+ CrNodeVersionProperty |
+CrNodeVersion.setProperty(java.lang.String name,
+ java.lang.Object value,
+ int valueType)
+
++ Set a property value. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use CrWorkspace | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao | ++ |
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Uses of CrWorkspace in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return CrWorkspace | +|
+ CrWorkspace |
+CrWorkspaceCredential.getCrWorkspace()
+
++ |
+
+ CrWorkspace |
+CrNode.getCrWorkspace()
+
++ |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type CrWorkspace | +|
+ void |
+CrWorkspaceCredential.setCrWorkspace(CrWorkspace crWorkspace)
+
++ |
+
+ void |
+CrNode.setCrWorkspace(CrWorkspace crWorkspace)
+
++ |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository with parameters of type CrWorkspace | +|
CrWorkspaceCredential(CrWorkspace crWorkspace,
+ CrCredential crCredential)
+
++ full constructor |
+|
CrNode(java.lang.String path,
+ java.lang.String type,
+ java.util.Date createdDateTime,
+ java.lang.Long nextVersionId,
+ CrWorkspace crWorkspace,
+ java.util.Set crNodeVersions)
+
++ full constructor |
+|
CrNode(java.lang.String type,
+ java.lang.Long nextVersionId,
+ CrWorkspace crWorkspace,
+ java.util.Set crNodeVersions)
+
++ minimal constructor |
+
+Uses of CrWorkspace in org.lamsfoundation.lams.contentrepository.dao | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao that return CrWorkspace | +|
+ CrWorkspace |
+IWorkspaceDAO.findByName(java.lang.String workspaceName)
+
++ Get a workspace. |
+
+Uses of CrWorkspace in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao.hibernate that return CrWorkspace | +|
+ CrWorkspace |
+WorkspaceDAO.findByName(java.lang.String workspaceName)
+
++ Get a workspace. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use FileException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao | ++ |
org.lamsfoundation.lams.contentrepository.dao.file | ++ |
org.lamsfoundation.lams.contentrepository.struts.action | ++ |
+Uses of FileException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw FileException | +|
+ java.io.InputStream |
+IVersionedNode.getFile()
+
++ Get the file, as an inputstream. |
+
+ NodeKey |
+SimpleRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version,
+ java.lang.String relPath)
+
++ |
+
+ java.util.List |
+SimpleRepository.getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ NodeKey |
+SimpleRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ java.io.InputStream |
+SimpleVersionedNode.getFile()
+
++ Get the file, as an inputstream. |
+
+ NodeKey |
+IRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Add a new file to the repository. |
+
+ NodeKey |
+IRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ NodeKey |
+IRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Update an existing file in the repository. |
+
+ NodeKey |
+IRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Get an item from the repository based on the UUID. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.lang.String relPath)
+
++ Get an item from the repository based on the UUID and relative + path. |
+
+ java.util.List |
+IRepository.getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Return a list of all the nodes for a package. |
+
+Uses of FileException in org.lamsfoundation.lams.contentrepository.dao | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao that throw FileException | +|
+ java.lang.String |
+IFileDAO.writeFile(java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.io.InputStream is)
+
++ Write out a file to the repository. |
+
+ java.io.InputStream |
+IFileDAO.getFile(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Gets a file from the repository. |
+
+ int |
+IFileDAO.delete(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Delete a file from the repository. |
+
+ java.lang.String |
+IFileDAO.getFilePath(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Get the actual path of the file ie the path on disk |
+
+Uses of FileException in org.lamsfoundation.lams.contentrepository.dao.file | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao.file that throw FileException | +|
+ java.lang.String |
+FileDAO.writeFile(java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.io.InputStream is)
+
++ Write out a file to the repository. |
+
+ java.io.InputStream |
+FileDAO.getFile(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Gets a file from the repository. |
+
+ int |
+FileDAO.delete(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Delete a file from the repository. |
+
+ java.lang.String |
+FileDAO.getFilePath(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Get the actual path of the file ie the path on disk |
+
+Uses of FileException in org.lamsfoundation.lams.contentrepository.struts.action | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.struts.action that throw FileException | +|
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.getList(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Get the list of nodes in the workspace. |
+
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.viewPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Get the list of nodes in the workspace. |
+
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.deleteNode(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Delete a version of a node, or the whole node. |
+
+ org.apache.struts.action.ActionForward |
+AddFileContentAction.uploadFile(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a single file. |
+
+ org.apache.struts.action.ActionForward |
+AddFileContentAction.uploadPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a package |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use ICredentials | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao | ++ |
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Uses of ICredentials in org.lamsfoundation.lams.contentrepository | +
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement ICredentials | +|
+ class |
+SimpleCredentials
+
++ Basic implementation of credentials. |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type ICredentials | +|
+ ITicket |
+SimpleRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ void |
+SimpleRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Add a workspace, giving the credentials as the user of this workspace. |
+
+ void |
+SimpleRepository.createCredential(ICredentials newCredential)
+
++ Create a new repository "user" - usually a tool. |
+
+ void |
+SimpleRepository.updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ void |
+SimpleRepository.assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Assign credentials to a workspace. |
+
+ void |
+IRepositoryAdmin.assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ ITicket |
+IRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Login, creating a new ticket for the given credentials and specified + workspace. |
+
+ void |
+IRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Create a new workspace, with the tool identified in the creditials + as the owner. |
+
+ void |
+IRepository.createCredential(ICredentials newCredential)
+
++ Create a new repository "user" - usually a tool. |
+
+ void |
+IRepository.updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+Uses of ICredentials in org.lamsfoundation.lams.contentrepository.dao | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao with parameters of type ICredentials | +|
+ boolean |
+ICredentialDAO.checkCredential(ICredentials credential,
+ IWorkspace workspace)
+
++ Check the supplied credential to the workspace. |
+
+ boolean |
+ICredentialDAO.checkCredential(ICredentials credential)
+
++ Check the supplied credential to the repository + By doing the check at this level, the password does + not need to be read from the database. |
+
+Uses of ICredentials in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao.hibernate with parameters of type ICredentials | +|
+ boolean |
+CredentialDAO.checkCredential(ICredentials credential,
+ IWorkspace workspace)
+
++ Checks whether a user can login to this workspace. |
+
+ boolean |
+CredentialDAO.checkCredential(ICredentials credential)
+
++ Checks whether a user can login to the repository. |
+
+ boolean |
+CredentialDAO.checkCredentialInternal(ICredentials credential,
+ IWorkspace workspace)
+
++ Checks whether a user can login to the repository. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IRepository | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.struts.action | ++ |
+Uses of IRepository in org.lamsfoundation.lams.contentrepository | +
+ +
Subinterfaces of IRepository in org.lamsfoundation.lams.contentrepository | +|
+ interface |
+IRepositoryAdmin
+
++ Administrative interface to the Repository. |
+
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement IRepository | +|
+ class |
+SimpleRepository
+
++ Many methods in this class will throw a RepositoryRuntimeException + if the internal data is missing. |
+
+Uses of IRepository in org.lamsfoundation.lams.contentrepository.struts.action | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.struts.action that return IRepository | +|
+static IRepository |
+Download.getRepository()
+
++ |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IRepositoryAdmin | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of IRepositoryAdmin in org.lamsfoundation.lams.contentrepository | +
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement IRepositoryAdmin | +|
+ class |
+SimpleRepository
+
++ Many methods in this class will throw a RepositoryRuntimeException + if the internal data is missing. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use ITicket | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of ITicket in org.lamsfoundation.lams.contentrepository | +
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement ITicket | +|
+ class |
+SimpleTicket
+
++ SimpleTicket is a basic implementation of Ticket. |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository that return ITicket | +|
+ ITicket |
+IVersionedNode.getTicket()
+
++ Get the ticket through which this node was accessed. |
+
+ ITicket |
+SimpleRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ ITicket |
+SimpleVersionedNode.getTicket()
+
++ |
+
+ ITicket |
+IRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Login, creating a new ticket for the given credentials and specified + workspace. |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type ITicket | +|
+ void |
+SimpleRepository.logout(ITicket ticket)
+
++ |
+
+ boolean |
+SimpleRepository.isTicketOkay(ITicket ticket)
+
++ Is this ticket okay? |
+
+ NodeKey |
+SimpleRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version,
+ java.lang.String relPath)
+
++ |
+
+ java.util.List |
+SimpleRepository.getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ java.util.SortedMap |
+SimpleRepository.getNodeList(ITicket ticket)
+
++ |
+
+ java.util.SortedSet |
+SimpleRepository.getVersionHistory(ITicket ticket,
+ java.lang.Long uuid)
+
++ |
+
+ NodeKey |
+SimpleRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ java.lang.String[] |
+SimpleRepository.deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ |
+
+ java.lang.String[] |
+SimpleRepository.deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ boolean |
+IRepositoryAdmin.isTicketOkay(ITicket ticket)
+
++ Is this ticket acceptable to the repository? + Only the interceptor for an IRepositoryAdmin should call this!!!!!! + + Do NOT declare this method as a transaction otherwise we will + end up with an endless loop of forever trying to check if + the ticket is okay as this method would end up getting + checked itself. |
+
+ NodeKey |
+IRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Add a new file to the repository. |
+
+ NodeKey |
+IRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ NodeKey |
+IRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Update an existing file in the repository. |
+
+ NodeKey |
+IRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Get an item from the repository based on the UUID. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.lang.String relPath)
+
++ Get an item from the repository based on the UUID and relative + path. |
+
+ java.util.List |
+IRepository.getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Return a list of all the nodes for a package. |
+
+ java.util.SortedSet |
+IRepository.getVersionHistory(ITicket ticket,
+ java.lang.Long uuid)
+
++ Get the history for a node. |
+
+ java.lang.String[] |
+IRepository.deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Delete the current version of a node, returning a list of the files + that could not be deleted properly. |
+
+ java.lang.String[] |
+IRepository.deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ Delete a node and all its versions, returning a list of the files + that could not be deleted properly. |
+
+ void |
+IRepository.logout(ITicket ticket)
+
++ Finish using this ticket. |
+
+ java.util.SortedMap |
+IRepository.getNodeList(ITicket ticket)
+
++ Get a complete list of all nodes in the workspace and their + version histories. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IValue | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of IValue in org.lamsfoundation.lams.contentrepository | +
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement IValue | +|
+ class |
+CrNodeVersionProperty
+
++ |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository that return IValue | +|
+ IValue |
+IVersionedNode.getProperty(java.lang.String name)
+
++ Returns the property at relPath relative to this + node. |
+
+ IValue |
+SimpleVersionedNode.getProperty(java.lang.String name)
+
++ |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IVersionDetail | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of IVersionDetail in org.lamsfoundation.lams.contentrepository | +
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement IVersionDetail | +|
+ class |
+SimpleVersionDetail
+
++ Describes the version details - for displaying a version + history. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IVersionedNode | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of IVersionedNode in org.lamsfoundation.lams.contentrepository | +
+ +
Subinterfaces of IVersionedNode in org.lamsfoundation.lams.contentrepository | +|
+ interface |
+IVersionedNodeAdmin
+
++ IVersionedNodeAdmin represents the full functionality for a versioned node. |
+
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement IVersionedNode | +|
+ class |
+SimpleVersionedNode
+
++ This is the default implementation for IVersionedNode. |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository that return IVersionedNode | +|
+ IVersionedNode |
+IVersionedNode.getNode(java.lang.String relPath)
+
++ Returns the node at relPath, which is a child of this node. |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version,
+ java.lang.String relPath)
+
++ |
+
+ IVersionedNode |
+SimpleVersionedNode.getNode(java.lang.String relPath)
+
++ Another case for the factory? |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Get an item from the repository based on the UUID. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.lang.String relPath)
+
++ Get an item from the repository based on the UUID and relative + path. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IVersionedNodeAdmin | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of IVersionedNodeAdmin in org.lamsfoundation.lams.contentrepository | +
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement IVersionedNodeAdmin | +|
+ class |
+SimpleVersionedNode
+
++ This is the default implementation for IVersionedNode. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IWorkspace | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao | ++ |
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Uses of IWorkspace in org.lamsfoundation.lams.contentrepository | +
+ +
Classes in org.lamsfoundation.lams.contentrepository that implement IWorkspace | +|
+ class |
+CrWorkspace
+
++ |
+
+Uses of IWorkspace in org.lamsfoundation.lams.contentrepository.dao | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao with parameters of type IWorkspace | +|
+ boolean |
+ICredentialDAO.checkCredential(ICredentials credential,
+ IWorkspace workspace)
+
++ Check the supplied credential to the workspace. |
+
+Uses of IWorkspace in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao.hibernate with parameters of type IWorkspace | +|
+ boolean |
+CredentialDAO.checkCredential(ICredentials credential,
+ IWorkspace workspace)
+
++ Checks whether a user can login to this workspace. |
+
+ boolean |
+CredentialDAO.checkCredentialInternal(ICredentials credential,
+ IWorkspace workspace)
+
++ Checks whether a user can login to the repository. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use InvalidParameterException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.struts.action | ++ |
+Uses of InvalidParameterException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw InvalidParameterException | +|
+ void |
+IVersionedNodeAdmin.setFile(java.io.InputStream iStream,
+ java.lang.String filename,
+ java.lang.String mimeType)
+
++ Set the file, passed in as an inputstream. |
+
+ NodeKey |
+SimpleRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ java.lang.String[] |
+SimpleRepository.deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ |
+
+ java.lang.String[] |
+SimpleRepository.deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ void |
+SimpleVersionedNode.setFile(java.io.InputStream iStream,
+ java.lang.String filename,
+ java.lang.String mimeType)
+
++ Set the file, passed in as an inputstream. |
+
+ NodeKey |
+IRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Add a new file to the repository. |
+
+ NodeKey |
+IRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ NodeKey |
+IRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Update an existing file in the repository. |
+
+ NodeKey |
+IRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ java.lang.String[] |
+IRepository.deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Delete the current version of a node, returning a list of the files + that could not be deleted properly. |
+
+ java.lang.String[] |
+IRepository.deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ Delete a node and all its versions, returning a list of the files + that could not be deleted properly. |
+
+Uses of InvalidParameterException in org.lamsfoundation.lams.contentrepository.struts.action | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.struts.action that throw InvalidParameterException | +|
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.deleteNode(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Delete a version of a node, or the whole node. |
+
+ org.apache.struts.action.ActionForward |
+AddFileContentAction.uploadFile(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a single file. |
+
+ org.apache.struts.action.ActionForward |
+AddFileContentAction.uploadPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a package |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use ItemExistsException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of ItemExistsException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw ItemExistsException | +|
+ void |
+SimpleRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Add a workspace, giving the credentials as the user of this workspace. |
+
+ void |
+IRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Create a new workspace, with the tool identified in the creditials + as the owner. |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository that throw ItemExistsException | +|
TestSimpleVersionedNode()
+
++ Constructor for TestSimpleVersionedNode. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use ItemNotFoundException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.struts.action | ++ |
+Uses of ItemNotFoundException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw ItemNotFoundException | +|
+ IVersionedNode |
+IVersionedNode.getNode(java.lang.String relPath)
+
++ Returns the node at relPath, which is a child of this node. |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ IVersionedNode |
+SimpleRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version,
+ java.lang.String relPath)
+
++ |
+
+ java.util.List |
+SimpleRepository.getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ java.util.SortedSet |
+SimpleRepository.getVersionHistory(ITicket ticket,
+ java.lang.Long uuid)
+
++ |
+
+ NodeKey |
+SimpleRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ java.lang.String[] |
+SimpleRepository.deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ |
+
+ java.lang.String[] |
+SimpleRepository.deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ |
+
+ IVersionedNode |
+SimpleVersionedNode.getNode(java.lang.String relPath)
+
++ Another case for the factory? |
+
+ NodeKey |
+IRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Update an existing file in the repository. |
+
+ NodeKey |
+IRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Get an item from the repository based on the UUID. |
+
+ IVersionedNode |
+IRepository.getFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.lang.String relPath)
+
++ Get an item from the repository based on the UUID and relative + path. |
+
+ java.util.List |
+IRepository.getPackageNodes(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Return a list of all the nodes for a package. |
+
+ java.util.SortedSet |
+IRepository.getVersionHistory(ITicket ticket,
+ java.lang.Long uuid)
+
++ Get the history for a node. |
+
+ java.lang.String[] |
+IRepository.deleteVersion(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.Long version)
+
++ Delete the current version of a node, returning a list of the files + that could not be deleted properly. |
+
+ java.lang.String[] |
+IRepository.deleteNode(ITicket ticket,
+ java.lang.Long uuid)
+
++ Delete a node and all its versions, returning a list of the files + that could not be deleted properly. |
+
+Uses of ItemNotFoundException in org.lamsfoundation.lams.contentrepository.struts.action | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.struts.action that throw ItemNotFoundException | +|
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.getList(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Get the list of nodes in the workspace. |
+
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.viewPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Get the list of nodes in the workspace. |
+
+ org.apache.struts.action.ActionForward |
+NodeSelectionAction.deleteNode(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Delete a version of a node, or the whole node. |
+
+ org.apache.struts.action.ActionForward |
+AddFileContentAction.uploadFile(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a single file. |
+
+ org.apache.struts.action.ActionForward |
+AddFileContentAction.uploadPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a package |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use LoginException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of LoginException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw LoginException | +|
+ ITicket |
+SimpleRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ void |
+SimpleRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Add a workspace, giving the credentials as the user of this workspace. |
+
+ void |
+SimpleRepository.updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ void |
+SimpleRepository.assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Assign credentials to a workspace. |
+
+ ITicket |
+IRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Login, creating a new ticket for the given credentials and specified + workspace. |
+
+ void |
+IRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Create a new workspace, with the tool identified in the creditials + as the owner. |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository that throw LoginException | +|
TestSimpleTicket()
+
++ Constructor for TestSimpleTicket. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use NoSuchNodeTypeException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of NoSuchNodeTypeException in org.lamsfoundation.lams.contentrepository | +
+ +
Constructors in org.lamsfoundation.lams.contentrepository that throw NoSuchNodeTypeException | +|
TestSimpleVersionedNode()
+
++ Constructor for TestSimpleVersionedNode. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use NodeKey | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of NodeKey in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return NodeKey | +|
+ NodeKey |
+IVersionedNode.getNodeKey()
+
++ Get the uuid and version of this node/version |
+
+ NodeKey |
+SimpleRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ |
+
+ NodeKey |
+SimpleVersionedNode.getNodeKey()
+
++ |
+
+ NodeKey |
+IRepository.addFileItem(ITicket ticket,
+ java.io.InputStream istream,
+ java.lang.String filename,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Add a new file to the repository. |
+
+ NodeKey |
+IRepository.addPackageItem(ITicket ticket,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+ NodeKey |
+IRepository.updateFileItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String filename,
+ java.io.InputStream istream,
+ java.lang.String mimeType,
+ java.lang.String versionDescription)
+
++ Update an existing file in the repository. |
+
+ NodeKey |
+IRepository.updatePackageItem(ITicket ticket,
+ java.lang.Long uuid,
+ java.lang.String dirPath,
+ java.lang.String startFile,
+ java.lang.String versionDescription)
+
++ Add a new package of files to the repository. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use RepositoryCheckedException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
org.lamsfoundation.lams.contentrepository.struts.action | ++ |
+Uses of RepositoryCheckedException in org.lamsfoundation.lams.contentrepository | +
+ +
Subclasses of RepositoryCheckedException in org.lamsfoundation.lams.contentrepository | +|
+ class |
+AccessDeniedException
+
++ The current ticket doesn't have sufficient rights for the requested action. |
+
+ class |
+FileException
+
++ Some error was generated reading or writing the files + to disk. |
+
+ class |
+InvalidParameterException
+
++ Generic exception thrown whenever a parameter is missing. |
+
+ class |
+ItemExistsException
+
++ An item already exists with the given id or path. |
+
+ class |
+ItemNotFoundException
+
++ Item requested does not exist. |
+
+ class |
+LoginException
+
++ Login failed. |
+
+ class |
+NoSuchNodeTypeException
+
++ Tried to create a node with an unknown type. |
+
+ class |
+ValidationException
+
++ The node is invalid for some reason. |
+
+ class |
+ValueFormatException
+
++ Thrown when value is assigned to a propery of the wrong type, or some + other formatting type problem. |
+
+ class |
+WorkspaceNotFoundException
+
++ Requested workspace not found. |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw RepositoryCheckedException | +|
+ void |
+IVersionedNodeAdmin.setProperty(java.lang.String name,
+ java.lang.String value,
+ int type)
+
++ Sets the property to a value, based on the specified type, after converting + from the string. |
+
+ void |
+IVersionedNodeAdmin.setProperty(java.lang.String name,
+ java.lang.String value)
+
++ Sets the property to a STRING value. |
+
+ void |
+IVersionedNodeAdmin.setProperty(java.lang.String name,
+ boolean value)
+
++ Sets the property to a BOOLEAN value. |
+
+ void |
+IVersionedNodeAdmin.setProperty(java.lang.String name,
+ double value)
+
++ Sets the property to a DOUBLE value. |
+
+ void |
+IVersionedNodeAdmin.setProperty(java.lang.String name,
+ long value)
+
++ Sets the property to a LONG value. |
+
+ void |
+IVersionedNodeAdmin.setProperty(java.lang.String name,
+ java.util.Calendar value)
+
++ Sets the property a CALENDAR value. |
+
+static java.lang.String |
+PropertyType.nameFromValue(int type)
+
++ Returns the name of the specified type. |
+
+static int |
+PropertyType.valueFromName(java.lang.String name)
+
++ Returns the numeric constant value of the type with the specified name. |
+
+ void |
+SimpleRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Add a workspace, giving the credentials as the user of this workspace. |
+
+ void |
+SimpleRepository.createCredential(ICredentials newCredential)
+
++ Create a new repository "user" - usually a tool. |
+
+ void |
+SimpleRepository.updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ void |
+SimpleRepository.assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Assign credentials to a workspace. |
+
+ void |
+IRepositoryAdmin.assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ void |
+IRepository.addWorkspace(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Create a new workspace, with the tool identified in the creditials + as the owner. |
+
+ void |
+IRepository.createCredential(ICredentials newCredential)
+
++ Create a new repository "user" - usually a tool. |
+
+ void |
+IRepository.updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository that throw RepositoryCheckedException | +|
TestSimpleVersionedNode()
+
++ Constructor for TestSimpleVersionedNode. |
+
+Uses of RepositoryCheckedException in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao.hibernate that throw RepositoryCheckedException | +|
+ void |
+WorkspaceDAO.flushSession()
+
++ |
+
+Uses of RepositoryCheckedException in org.lamsfoundation.lams.contentrepository.struts.action | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.struts.action that throw RepositoryCheckedException | +|
+ org.apache.struts.action.ActionForward |
+RepositoryDispatchAction.logout(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Logout of the workspace. |
+
+ org.apache.struts.action.ActionForward |
+LoginRepositoryAction.loginToWorkspace(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Login to the repository |
+
+ org.apache.struts.action.ActionForward |
+LoginRepositoryAction.createNewWorkspace(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Create and login to a new workspace |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use RepositoryRuntimeException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao | ++ |
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Uses of RepositoryRuntimeException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw RepositoryRuntimeException | +|
+ void |
+CheckCredentialTicketBeforeAdvice.before(java.lang.reflect.Method m,
+ java.lang.Object[] args,
+ java.lang.Object target)
+
++ |
+
+ void |
+SimpleRepository.updateCredentials(ICredentials oldCredential,
+ ICredentials newCredential)
+
++ Update a credential. |
+
+ void |
+SimpleVersionedNode.setProperty(java.lang.String name,
+ java.lang.String value)
+
++ |
+
+ CrNodeVersionProperty |
+CrNodeVersion.setProperty(java.lang.String name,
+ java.lang.Object value,
+ int valueType)
+
++ Set a property value. |
+
+Uses of RepositoryRuntimeException in org.lamsfoundation.lams.contentrepository.dao | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao that throw RepositoryRuntimeException | +|
+ boolean |
+ICredentialDAO.checkCredential(ICredentials credential,
+ IWorkspace workspace)
+
++ Check the supplied credential to the workspace. |
+
+ boolean |
+ICredentialDAO.checkCredential(ICredentials credential)
+
++ Check the supplied credential to the repository + By doing the check at this level, the password does + not need to be read from the database. |
+
+Uses of RepositoryRuntimeException in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Methods in org.lamsfoundation.lams.contentrepository.dao.hibernate that throw RepositoryRuntimeException | +|
+ boolean |
+CredentialDAO.checkCredential(ICredentials credential,
+ IWorkspace workspace)
+
++ Checks whether a user can login to this workspace. |
+
+ boolean |
+CredentialDAO.checkCredential(ICredentials credential)
+
++ Checks whether a user can login to the repository. |
+
+ boolean |
+CredentialDAO.checkCredentialInternal(ICredentials credential,
+ IWorkspace workspace)
+
++ Checks whether a user can login to the repository. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use ValueFormatException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of ValueFormatException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw ValueFormatException | +|
+ double |
+CrNodeVersionProperty.getDouble()
+
++ Returns a double representation of the value. |
+
+ java.util.Calendar |
+CrNodeVersionProperty.getDate()
+
++ Returns a Calendar representation of the value. |
+
+ long |
+CrNodeVersionProperty.getLong()
+
++ Returns a long representation of the value. |
+
+ boolean |
+CrNodeVersionProperty.getBoolean()
+
++ Returns a boolean representation of the value. |
+
+ java.lang.String |
+IValue.getString()
+
++ Returns a string representation of the value. |
+
+ double |
+IValue.getDouble()
+
++ Returns a double representation of the value. |
+
+ java.util.Calendar |
+IValue.getDate()
+
++ Returns a Calendar representation of the value. |
+
+ long |
+IValue.getLong()
+
++ Returns a long representation of the value. |
+
+ boolean |
+IValue.getBoolean()
+
++ Returns a boolean representation of the value. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use WorkspaceNotFoundException | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
+Uses of WorkspaceNotFoundException in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that throw WorkspaceNotFoundException | +|
+ ITicket |
+SimpleRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ void |
+SimpleRepository.assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Assign credentials to a workspace. |
+
+ void |
+IRepositoryAdmin.assignCredentials(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ |
+
+ ITicket |
+IRepository.login(ICredentials credentials,
+ java.lang.String workspaceName)
+
++ Login, creating a new ticket for the given credentials and specified + workspace. |
+
+ +
Constructors in org.lamsfoundation.lams.contentrepository that throw WorkspaceNotFoundException | +|
TestSimpleTicket()
+
++ Constructor for TestSimpleTicket. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+Method Summary | +|
+ boolean |
+checkCredential(ICredentials credential)
+
++ Check the supplied credential to the repository + By doing the check at this level, the password does + not need to be read from the database. |
+
+ boolean |
+checkCredential(ICredentials credential,
+ IWorkspace workspace)
+
++ Check the supplied credential to the workspace. |
+
+ void |
+delete(java.lang.Object object)
+
++ |
+
+ CrCredential |
+findByName(java.lang.String name)
+
++ |
+
+ void |
+insert(java.lang.Object object)
+
++ |
+
+ void |
+update(java.lang.Object object)
+
++ |
+
+Method Detail | +
+public boolean checkCredential(ICredentials credential, + IWorkspace workspace) + throws RepositoryRuntimeException+
+
repository
- exception if an internal (db) error occurs
+RepositoryRuntimeException
+public boolean checkCredential(ICredentials credential) + throws RepositoryRuntimeException+
+
repository
- exception if an internal (db) error occurs
+RepositoryRuntimeException
+public void insert(java.lang.Object object)+
+public void update(java.lang.Object object)+
+public void delete(java.lang.Object object)+
+public CrCredential findByName(java.lang.String name)+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Manages the reading and writing of files to the repository directories. +
+ +
+
+Method Summary | +|
+ int |
+delete(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Delete a file from the repository. |
+
+ java.io.InputStream |
+getFile(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Gets a file from the repository. |
+
+ java.lang.String |
+getFilePath(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Get the actual path of the file ie the path on disk |
+
+ java.lang.String |
+writeFile(java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.io.InputStream is)
+
++ Write out a file to the repository. |
+
+Method Detail | +
+public java.lang.String writeFile(java.lang.Long uuid, + java.lang.Long versionId, + java.io.InputStream is) + throws FileException+
+
FileException
+public java.io.InputStream getFile(java.lang.Long uuid, + java.lang.Long versionId) + throws FileException+
+
FileException
+public int delete(java.lang.Long uuid, + java.lang.Long versionId) + throws FileException+
+
FileException
+public java.lang.String getFilePath(java.lang.Long uuid, + java.lang.Long versionId) + throws FileException+
+
FileException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Data access routines for Nodes, versions and properties +
+ +
+
+Method Summary | +|
+ void |
+delete(java.lang.Object object)
+
++ |
+
+ java.lang.Object |
+find(java.lang.Class objClass,
+ java.io.Serializable id)
+
++ Finds an object. |
+
+ java.util.List |
+findAll(java.lang.Class objClass)
+
++ |
+
+ void |
+insert(java.lang.Object object)
+
++ |
+
+ void |
+update(java.lang.Object object)
+
++ |
+
+Method Detail | +
+public java.lang.Object find(java.lang.Class objClass, + java.io.Serializable id)+
+
+public void insert(java.lang.Object object)+
+public void update(java.lang.Object object)+
+public void delete(java.lang.Object object)+
+public java.util.List findAll(java.lang.Class objClass)+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Data access routines for Workspaces. +
+ +
+
+Method Summary | +|
+ void |
+delete(java.lang.Object object)
+
++ |
+
+ java.lang.Object |
+find(java.lang.Class objClass,
+ java.io.Serializable id)
+
++ Finds an object. |
+
+ java.util.List |
+findAll(java.lang.Class objClass)
+
++ |
+
+ CrWorkspace |
+findByName(java.lang.String workspaceName)
+
++ Get a workspace. |
+
+ java.util.List |
+findWorkspaceNodes(java.lang.Long workspaceId)
+
++ Get all the nodes for a workspace. |
+
+ void |
+insert(java.lang.Object object)
+
++ |
+
+ void |
+update(java.lang.Object object)
+
++ |
+
+Method Detail | +
+public CrWorkspace findByName(java.lang.String workspaceName)+
+
workspaceName
-
++public java.util.List findWorkspaceNodes(java.lang.Long workspaceId)+
+
workspaceId
-
++public java.lang.Object find(java.lang.Class objClass, + java.io.Serializable id)+
+
objClass
- id
-
++public void insert(java.lang.Object object)+
+public void update(java.lang.Object object)+
+public void delete(java.lang.Object object)+
+public java.util.List findAll(java.lang.Class objClass)+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +ICredentialDAO + +IFileDAO + +INodeDAO + +IWorkspaceDAO |
+
+
+
|
++ + | +||||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + | +
+Interface Summary | +|
ICredentialDAO | ++ |
IFileDAO | +Manages the reading and writing of files to the repository directories. | +
INodeDAO | +Data access routines for Nodes, versions and properties | +
IWorkspaceDAO | +Data access routines for Workspaces. | +
+
+
+
|
++ + | +||||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use org.lamsfoundation.lams.contentrepository.dao | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao.file | ++ |
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Classes in org.lamsfoundation.lams.contentrepository.dao used by org.lamsfoundation.lams.contentrepository | +|
ICredentialDAO
+
+ + |
+|
IFileDAO
+
+ + Manages the reading and writing of files to the repository directories. |
+|
INodeDAO
+
+ + Data access routines for Nodes, versions and properties |
+|
IWorkspaceDAO
+
+ + Data access routines for Workspaces. |
+
+Classes in org.lamsfoundation.lams.contentrepository.dao used by org.lamsfoundation.lams.contentrepository.dao.file | +|
IFileDAO
+
+ + Manages the reading and writing of files to the repository directories. |
+
+Classes in org.lamsfoundation.lams.contentrepository.dao used by org.lamsfoundation.lams.contentrepository.dao.hibernate | +|
ICredentialDAO
+
+ + |
+|
INodeDAO
+
+ + Data access routines for Nodes, versions and properties |
+|
IWorkspaceDAO
+
+ + Data access routines for Workspaces. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use ICredentialDAO | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Uses of ICredentialDAO in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return ICredentialDAO | +|
+ ICredentialDAO |
+SimpleRepository.getCredentialDAO()
+
++ |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type ICredentialDAO | +|
+ void |
+SimpleRepository.setCredentialDAO(ICredentialDAO credentialDAO)
+
++ |
+
+Uses of ICredentialDAO in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Classes in org.lamsfoundation.lams.contentrepository.dao.hibernate that implement ICredentialDAO | +|
+ class |
+CredentialDAO
+
++ Implements the credentials lookup using Hibernate. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IFileDAO | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao.file | ++ |
+Uses of IFileDAO in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return IFileDAO | +|
+ IFileDAO |
+SimpleVersionedNode.getFileDAO()
+
++ |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type IFileDAO | +|
+ void |
+SimpleVersionedNode.setFileDAO(IFileDAO fileDAO)
+
++ |
+
+Uses of IFileDAO in org.lamsfoundation.lams.contentrepository.dao.file | +
+ +
Classes in org.lamsfoundation.lams.contentrepository.dao.file that implement IFileDAO | +|
+ class |
+FileDAO
+
++ Manages the reading and writing of files to the repository directories. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use INodeDAO | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Uses of INodeDAO in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return INodeDAO | +|
+ INodeDAO |
+SimpleVersionedNode.getNodeDAO()
+
++ |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type INodeDAO | +|
+ void |
+SimpleVersionedNode.setNodeDAO(INodeDAO nodeDAO)
+
++ |
+
+Uses of INodeDAO in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Classes in org.lamsfoundation.lams.contentrepository.dao.hibernate that implement INodeDAO | +|
+ class |
+NodeDAO
+
++ Data access routines for Nodes |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+Packages that use IWorkspaceDAO | +|
org.lamsfoundation.lams.contentrepository | ++This content repository is designed to store single files and +packages of files on disk in a relatively. | +
org.lamsfoundation.lams.contentrepository.dao.hibernate | ++ |
+Uses of IWorkspaceDAO in org.lamsfoundation.lams.contentrepository | +
+ +
Methods in org.lamsfoundation.lams.contentrepository that return IWorkspaceDAO | +|
+ IWorkspaceDAO |
+SimpleRepository.getWorkspaceDAO()
+
++ |
+
+ +
Methods in org.lamsfoundation.lams.contentrepository with parameters of type IWorkspaceDAO | +|
+ void |
+SimpleRepository.setWorkspaceDAO(IWorkspaceDAO workspaceDAO)
+
++ |
+
+Uses of IWorkspaceDAO in org.lamsfoundation.lams.contentrepository.dao.hibernate | +
+ +
Classes in org.lamsfoundation.lams.contentrepository.dao.hibernate that implement IWorkspaceDAO | +|
+ class |
+WorkspaceDAO
+
++ Data access routines for Workspaces. |
+
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.lamsfoundation.lams.contentrepository.dao.file.FileDAO +
+Manages the reading and writing of files to the repository directories. + Note: this does not involve the database - so no Hibernate! +
+ +
+
+Constructor Summary | +|
FileDAO()
+
++ |
+
+Method Summary | +|
+ int |
+delete(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Delete a file from the repository. |
+
+ java.io.InputStream |
+getFile(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Gets a file from the repository. |
+
+ java.lang.String |
+getFilePath(java.lang.Long uuid,
+ java.lang.Long versionId)
+
++ Get the actual path of the file ie the path on disk |
+
+ java.lang.String |
+getRepositoryLocation()
+
++ |
+
+ void |
+setRepositoryLocation(java.lang.String repositoryLocation)
+
++ |
+
+ java.lang.String |
+writeFile(java.lang.Long uuid,
+ java.lang.Long versionId,
+ java.io.InputStream is)
+
++ Write out a file to the repository. |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public FileDAO()+
+Method Detail | +
+public java.lang.String writeFile(java.lang.Long uuid, + java.lang.Long versionId, + java.io.InputStream is) + throws FileException+
+
FileException
+public java.io.InputStream getFile(java.lang.Long uuid, + java.lang.Long versionId) + throws FileException+
+
uuid
- node idversionId
- version id
+FileException
+public int delete(java.lang.Long uuid, + java.lang.Long versionId) + throws FileException+
+
FileException
+public java.lang.String getFilePath(java.lang.Long uuid, + java.lang.Long versionId) + throws FileException+
+
getFilePath
in interface IFileDAO
FileException
+public java.lang.String getRepositoryLocation()+
+public void setRepositoryLocation(java.lang.String repositoryLocation)+
repositoryLocation
- The repositoryLocation to set.
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++junit.framework.Assert +
junit.framework.TestCase +
org.lamsfoundation.lams.contentrepository.BaseTestCase +
org.lamsfoundation.lams.contentrepository.dao.file.TestFileDAO +
+
+Constructor Summary | +|
TestFileDAO()
+
++ |
+
+Method Summary | +|
+ void |
+setUp()
+
++ |
+
+ void |
+testGenerateFilePathEven1()
+
++ |
+
+ void |
+testGenerateFilePathEven101()
+
++ |
+
+ void |
+testGenerateFilePathOdd1()
+
++ |
+
+ void |
+testGenerateFilePathOdd101()
+
++ |
+
Methods inherited from class junit.framework.TestCase | +
countTestCases, getName, run, run, runBare, setName, toString |
+
Methods inherited from class junit.framework.Assert | +
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
+public TestFileDAO()+
+Method Detail | +
+public void setUp()+
+public void testGenerateFilePathEven1()+
+public void testGenerateFilePathEven101()+
+public void testGenerateFilePathOdd1()+
+public void testGenerateFilePathOdd101()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +FileDAO + +TestFileDAO |
+
+
+
|
++ + | +||||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + | +
+Class Summary | +|
FileDAO | +Manages the reading and writing of files to the repository directories. | +
TestFileDAO | ++ |
+
+
+
|
++ + | +||||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.springframework.orm.hibernate.support.HibernateDaoSupport +
org.lamsfoundation.lams.contentrepository.dao.hibernate.CredentialDAO +
+Implements the credentials lookup using Hibernate. +
+ +
+
+Constructor Summary | +|
CredentialDAO()
+
++ |
+
+Method Summary | +|
+ boolean |
+checkCredential(ICredentials credential)
+
++ Checks whether a user can login to the repository. |
+
+ boolean |
+checkCredential(ICredentials credential,
+ IWorkspace workspace)
+
++ Checks whether a user can login to this workspace. |
+
+ boolean |
+checkCredentialInternal(ICredentials credential,
+ IWorkspace workspace)
+
++ Checks whether a user can login to the repository. |
+
+ void |
+delete(java.lang.Object object)
+
++ |
+
+ java.util.List |
+findAll(java.lang.Class objClass)
+
++ |
+
+ CrCredential |
+findByName(java.lang.String name)
+
++ |
+
+ void |
+insert(java.lang.Object object)
+
++ |
+
+ void |
+update(java.lang.Object object)
+
++ |
+
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport | +
afterPropertiesSet, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public CredentialDAO()+
+Method Detail | +
+public boolean checkCredential(ICredentials credential, + IWorkspace workspace) + throws RepositoryRuntimeException+
+
checkCredential
in interface ICredentialDAO
RepositoryRuntimeException
+public boolean checkCredential(ICredentials credential) + throws RepositoryRuntimeException+
+
checkCredential
in interface ICredentialDAO
RepositoryRuntimeException
+public boolean checkCredentialInternal(ICredentials credential, + IWorkspace workspace) + throws RepositoryRuntimeException+
+
RepositoryRuntimeException
+public void insert(java.lang.Object object)+
insert
in interface ICredentialDAO
+public void update(java.lang.Object object)+
update
in interface ICredentialDAO
+public void delete(java.lang.Object object)+
delete
in interface ICredentialDAO
+public CrCredential findByName(java.lang.String name)+
findByName
in interface ICredentialDAO
+public java.util.List findAll(java.lang.Class objClass)+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.springframework.orm.hibernate.support.HibernateDaoSupport +
org.lamsfoundation.lams.contentrepository.dao.hibernate.NodeDAO +
+Data access routines for Nodes +
+ +
+
+Constructor Summary | +|
NodeDAO()
+
++ |
+
+Method Summary | +|
+ void |
+delete(java.lang.Object object)
+
++ |
+
+ java.lang.Object |
+find(java.lang.Class objClass,
+ java.io.Serializable id)
+
++ Finds an object. |
+
+ java.util.List |
+findAll(java.lang.Class objClass)
+
++ |
+
+ void |
+insert(java.lang.Object object)
+
++ |
+
+ void |
+update(java.lang.Object object)
+
++ |
+
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport | +
afterPropertiesSet, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public NodeDAO()+
+Method Detail | +
+public java.lang.Object find(java.lang.Class objClass, + java.io.Serializable id)+
INodeDAO
+
+public void insert(java.lang.Object object)+ +
+public void update(java.lang.Object object)+ +
+public void delete(java.lang.Object object)+ +
+public java.util.List findAll(java.lang.Class objClass)+ + +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.springframework.orm.hibernate.support.HibernateDaoSupport +
org.lamsfoundation.lams.contentrepository.dao.hibernate.WorkspaceDAO +
+Data access routines for Workspaces. +
+ +
+
+Constructor Summary | +|
WorkspaceDAO()
+
++ |
+
+Method Summary | +|
+ void |
+delete(java.lang.Object object)
+
++ |
+
+ java.lang.Object |
+find(java.lang.Class objClass,
+ java.io.Serializable id)
+
++ Finds an object. |
+
+ java.util.List |
+findAll(java.lang.Class objClass)
+
++ |
+
+ CrWorkspace |
+findByName(java.lang.String workspaceName)
+
++ Get a workspace. |
+
+ java.util.List |
+findWorkspaceNodes(java.lang.Long workspaceId)
+
++ Get all the nodes for a workspace. |
+
+ void |
+flushSession()
+
++ |
+
+ void |
+insert(java.lang.Object object)
+
++ |
+
+ void |
+update(java.lang.Object object)
+
++ |
+
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport | +
afterPropertiesSet, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public WorkspaceDAO()+
+Method Detail | +
+public CrWorkspace findByName(java.lang.String workspaceName)+
+
findByName
in interface IWorkspaceDAO
workspaceName
-
++public java.util.List findWorkspaceNodes(java.lang.Long workspaceId)+
+
findWorkspaceNodes
in interface IWorkspaceDAO
workspaceId
-
++public java.lang.Object find(java.lang.Class objClass, + java.io.Serializable id)+
IWorkspaceDAO
+
find
in interface IWorkspaceDAO
objClass
- id
-
++public void insert(java.lang.Object object)+
insert
in interface IWorkspaceDAO
+public void update(java.lang.Object object)+
update
in interface IWorkspaceDAO
+public void delete(java.lang.Object object)+
delete
in interface IWorkspaceDAO
+public java.util.List findAll(java.lang.Class objClass)+
findAll
in interface IWorkspaceDAO
+public void flushSession() + throws RepositoryCheckedException+
RepositoryCheckedException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +CredentialDAO + +NodeDAO + +WorkspaceDAO |
+
+
+
|
++ + | +||||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + | +
+Class Summary | +|
CredentialDAO | +Implements the credentials lookup using Hibernate. | +
NodeDAO | +Data access routines for Nodes | +
WorkspaceDAO | +Data access routines for Workspaces. | +
+
+
+
|
++ + | +||||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
+
|
++ + | +||||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.apache.struts.action.Action +
org.apache.struts.actions.DispatchAction +
org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction +
org.lamsfoundation.lams.contentrepository.struts.action.AddFileContentAction +
+MyEclipse Struts + Creation date: 11-30-2004 + + XDoclet definition: +
+ +
+
+Field Summary | +
Fields inherited from class org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction | +
ERROR_PATH, LOGOUT_PATH, NODE_LIST_NAME, PACKAGE_LIST, SUCCESS_PATH, TICKET_NAME, UUID_NAME, VERSION_NAME |
+
Fields inherited from class org.apache.struts.action.Action | +
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, SERVLET_KEY, TRANSACTION_TOKEN_KEY |
+
+Constructor Summary | +|
AddFileContentAction()
+
++ |
+
+Method Summary | +|
+ org.apache.struts.action.ActionForward |
+uploadFile(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a single file. |
+
+ org.apache.struts.action.ActionForward |
+uploadPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Uploads a package |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction | +
logout |
+
Methods inherited from class org.apache.struts.actions.DispatchAction | +
execute |
+
Methods inherited from class org.apache.struts.action.Action | +
execute, getServlet, perform, perform, setServlet |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public AddFileContentAction()+
+Method Detail | +
+public org.apache.struts.action.ActionForward uploadFile(org.apache.struts.action.ActionMapping mapping, + org.apache.struts.action.ActionForm form, + javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws FileException, + AccessDeniedException, + InvalidParameterException, + ItemNotFoundException+
+
mapping
- form
- request
- response
-
+FileException
+AccessDeniedException
+InvalidParameterException
+ItemNotFoundException
+public org.apache.struts.action.ActionForward uploadPackage(org.apache.struts.action.ActionMapping mapping, + org.apache.struts.action.ActionForm form, + javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws FileException, + AccessDeniedException, + InvalidParameterException, + ItemNotFoundException+
+
mapping
- form
- request
- response
-
+FileException
+AccessDeniedException
+InvalidParameterException
+ItemNotFoundException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++javax.servlet.GenericServlet +
javax.servlet.http.HttpServlet +
org.lamsfoundation.lams.contentrepository.struts.action.Download +
+This servlet must load on startup as it contains the link + to the repository required for the other servlets. + + Specialised servlet that supports the rendering of packages. + It has a rather odd format - you can call it initially with + the package id and uuid (and optional version) using + download?uuid=<uuid>&version=<version> + but then it redirects to download/<uuid>/<version>/relPath + where the <uuid> and <version> are the uuid and version + of the package node. + + The download/<uuid>/<version>/relPath should only be used + internally - the servlet should be called with the parameter + version initially. + + It also supports the fetching of ordinary file nodes - in + this case it doesn't need to do the mucking around with + redirecting. + + This / format allows the relative pathed links + within an html file to work properly. +
+ +
+
+Constructor Summary | +|
Download()
+
++ Constructor of the object. |
+
+Method Summary | +|
+ void |
+destroy()
+
++ Destruction of the servlet. |
+
+ void |
+doGet(javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ The doGet method of the servlet. |
+
+ void |
+doPost(javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ The doPost method of the servlet. |
+
+static IRepository |
+getRepository()
+
++ |
+
+ void |
+init()
+
++ Gets the application context and gets the repository object. |
+
Methods inherited from class javax.servlet.http.HttpServlet | +
service |
+
Methods inherited from class javax.servlet.GenericServlet | +
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public Download()+
+
+Method Detail | +
+public void destroy()+
+
+public void doGet(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws javax.servlet.ServletException, + java.io.IOException+
+
request
- the request send by the client to the serverresponse
- the response send by the server to the client
+javax.servlet.ServletException
- if an error occurred
+java.io.IOException
- if an error occurred+public void doPost(javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws javax.servlet.ServletException, + java.io.IOException+
+
request
- the request send by the client to the serverresponse
- the response send by the server to the client
+javax.servlet.ServletException
- if an error occurred
+java.io.IOException
- if an error occurred+public void init() + throws javax.servlet.ServletException+
+
javax.servlet.ServletException
- if an error occure+public static IRepository getRepository()+
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.apache.struts.action.Action +
org.apache.struts.actions.DispatchAction +
org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction +
org.lamsfoundation.lams.contentrepository.struts.action.LoginRepositoryAction +
+MyEclipse Struts + Creation date: 01-13-2005 + + The exceptions will be handled by struts but are listed explicitly + here so (1) I can log them and (2) you can see what exceptions are thrown. + + XDoclet definition: +
+ +
+
+Field Summary | +
Fields inherited from class org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction | +
ERROR_PATH, LOGOUT_PATH, NODE_LIST_NAME, PACKAGE_LIST, SUCCESS_PATH, TICKET_NAME, UUID_NAME, VERSION_NAME |
+
Fields inherited from class org.apache.struts.action.Action | +
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, SERVLET_KEY, TRANSACTION_TOKEN_KEY |
+
+Constructor Summary | +|
LoginRepositoryAction()
+
++ |
+
+Method Summary | +|
+ org.apache.struts.action.ActionForward |
+createNewWorkspace(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Create and login to a new workspace |
+
+ org.apache.struts.action.ActionForward |
+loginToWorkspace(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Login to the repository |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction | +
logout |
+
Methods inherited from class org.apache.struts.actions.DispatchAction | +
execute |
+
Methods inherited from class org.apache.struts.action.Action | +
execute, getServlet, perform, perform, setServlet |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public LoginRepositoryAction()+
+Method Detail | +
+public org.apache.struts.action.ActionForward loginToWorkspace(org.apache.struts.action.ActionMapping mapping, + org.apache.struts.action.ActionForm form, + javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws RepositoryCheckedException+
+
mapping
- form
- request
- response
-
+RepositoryCheckedException
+public org.apache.struts.action.ActionForward createNewWorkspace(org.apache.struts.action.ActionMapping mapping, + org.apache.struts.action.ActionForm form, + javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws RepositoryCheckedException+
+
mapping
- form
- request
- response
-
+RepositoryCheckedException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.apache.struts.action.Action +
org.apache.struts.actions.DispatchAction +
org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction +
org.lamsfoundation.lams.contentrepository.struts.action.NodeSelectionAction +
+MyEclipse Struts + Creation date: 01-13-2005 + + The exceptions will be handled by struts but are listed explicitly + here so (1) I can log them and (2) you can see what exceptions are thrown. + + XDoclet definition: +
+ +
+
+Field Summary | +
Fields inherited from class org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction | +
ERROR_PATH, LOGOUT_PATH, NODE_LIST_NAME, PACKAGE_LIST, SUCCESS_PATH, TICKET_NAME, UUID_NAME, VERSION_NAME |
+
Fields inherited from class org.apache.struts.action.Action | +
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, SERVLET_KEY, TRANSACTION_TOKEN_KEY |
+
+Constructor Summary | +|
NodeSelectionAction()
+
++ |
+
+Method Summary | +|
+ org.apache.struts.action.ActionForward |
+deleteNode(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Delete a version of a node, or the whole node. |
+
+ org.apache.struts.action.ActionForward |
+getList(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Get the list of nodes in the workspace. |
+
+ org.apache.struts.action.ActionForward |
+viewPackage(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Get the list of nodes in the workspace. |
+
Methods inherited from class org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction | +
logout |
+
Methods inherited from class org.apache.struts.actions.DispatchAction | +
execute |
+
Methods inherited from class org.apache.struts.action.Action | +
execute, getServlet, perform, perform, setServlet |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
+public NodeSelectionAction()+
+Method Detail | +
+public org.apache.struts.action.ActionForward getList(org.apache.struts.action.ActionMapping mapping, + org.apache.struts.action.ActionForm form, + javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws AccessDeniedException, + ItemNotFoundException, + FileException+
+
mapping
- form
- request
- response
-
+AccessDeniedException
+ItemNotFoundException
+FileException
+public org.apache.struts.action.ActionForward viewPackage(org.apache.struts.action.ActionMapping mapping, + org.apache.struts.action.ActionForm form, + javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws AccessDeniedException, + ItemNotFoundException, + FileException+
+
mapping
- form
- request
- response
-
+AccessDeniedException
+ItemNotFoundException
+FileException
+public org.apache.struts.action.ActionForward deleteNode(org.apache.struts.action.ActionMapping mapping, + org.apache.struts.action.ActionForm form, + javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws ItemNotFoundException, + InvalidParameterException, + AccessDeniedException, + FileException+
+
mapping
- form
- request
- response
-
+ItemNotFoundException
+InvalidParameterException
+AccessDeniedException
+java.lang.Exception
+FileException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.apache.struts.action.Action +
org.apache.struts.actions.DispatchAction +
org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction +
+Base class for the dispatch actions used in the repository tests. + Shares functionality such as checking ticket. +
+ +
+
+Field Summary | +|
+static java.lang.String |
+ERROR_PATH
+
++ |
+
+static java.lang.String |
+LOGOUT_PATH
+
++ |
+
+static java.lang.String |
+NODE_LIST_NAME
+
++ |
+
+static java.lang.String |
+PACKAGE_LIST
+
++ |
+
+static java.lang.String |
+SUCCESS_PATH
+
++ |
+
+static java.lang.String |
+TICKET_NAME
+
++ |
+
+static java.lang.String |
+UUID_NAME
+
++ |
+
+static java.lang.String |
+VERSION_NAME
+
++ |
+
Fields inherited from class org.apache.struts.action.Action | +
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, SERVLET_KEY, TRANSACTION_TOKEN_KEY |
+
+Constructor Summary | +|
RepositoryDispatchAction()
+
++ |
+
+Method Summary | +|
+ org.apache.struts.action.ActionForward |
+logout(org.apache.struts.action.ActionMapping mapping,
+ org.apache.struts.action.ActionForm form,
+ javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
++ Logout of the workspace. |
+
Methods inherited from class org.apache.struts.actions.DispatchAction | +
execute |
+
Methods inherited from class org.apache.struts.action.Action | +
execute, getServlet, perform, perform, setServlet |
+
Methods inherited from class java.lang.Object | +
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
+public static final java.lang.String TICKET_NAME+
+public static final java.lang.String NODE_LIST_NAME+
+public static final java.lang.String UUID_NAME+
+public static final java.lang.String VERSION_NAME+
+public static final java.lang.String SUCCESS_PATH+
+public static final java.lang.String ERROR_PATH+
+public static final java.lang.String LOGOUT_PATH+
+public static final java.lang.String PACKAGE_LIST+
+Constructor Detail | +
+public RepositoryDispatchAction()+
+Method Detail | +
+public org.apache.struts.action.ActionForward logout(org.apache.struts.action.ActionMapping mapping, + org.apache.struts.action.ActionForm form, + javax.servlet.http.HttpServletRequest request, + javax.servlet.http.HttpServletResponse response) + throws RepositoryCheckedException+
+
mapping
- form
- request
- response
-
+RepositoryCheckedException
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +||||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + | +||||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++javax.servlet.GenericServlet +
javax.servlet.http.HttpServlet +
org.lamsfoundation.lams.contentrepository.struts.action.TestLogin +
+This standalone servlet is for performance testing. It acts
+ as an "interface" between JMeter and the Repository jar file.
+
+ All it does is logs in and puts the ticket in the session.
+ It is designed to be as bare bones as possible, so that the
+ performance of the servlet doesn't affect the testing too much.
+
+ The user and the workspace must already exist.
+
+ Parameters w=
+
+
+
+
+
+
+
+
+
+
+
+
+
+MyEclipse Struts
+ Creation date: 11-30-2004
+
+ XDoclet definition:
+
+
+
+
+
+
+
+
+MyEclipse Struts
+ Creation date: 01-13-2005
+
+ XDoclet definition:
+
+
+
+
+
+
+
+
+
+
+
+
+Didn't want to create this class, but I keep getting "Cannot retrieve definition for form bean null"
+ exception so it was just easier to write it and ignore it...
+ XDoclet definition:
+
+
+
+
+
+
+
+
+
+
+
+ * Note that this method returns a reference to the password.
+ * The password is set when the creditionals are passed in to get a ticket,
+ * and then removed.
+ *
+ * @return the password.
+ */
+ public char[] getPassword();
+
+ /**
+ * Clear the current password - important not to leave this lying around.
+ *
+ * After the credential is used, it should be cleared to ensure the
+ * identification string isn't held in memory.
+ */
+ public void clearPassword();
+
+ /* Implement in the future
+ *
+ * Stores an attribute in this credentials instance.
+ *
+ * @param name a String specifying the name of the attribute
+ * @param value the String value of the attribute to be stored
+ public void setAttribute(String name, String value);
+ */
+
+ /* Implement in the future
+ *
+ * Removes an attribute from this credentials instance.
+ *
+ * @param name a String specifying the name of the attribute
+ * to remove
+ public void removeAttribute(String name);
+ */
+
+ /* Implement in the future
+ *
+ * Returns the value of the named attribute as a String,
+ * or null if no attribute of the given name exists.
+ *
+ * @param name a String specifying the name of
+ * the attribute
+ * @return an String containing the value of the attribute,
+ * or null if the attribute does not exist
+ public String getAttribute(String name);
+ */
+
+ /* Implement in the future
+ *
+ * Returns the names of the attributes available to this
+ * credentials instance. This method returns an empty array
+ * if the credentials instance has no attributes available to it.
+ *
+ * @return a string array containing the names of the stored attributes
+ public String[] getAttributeNames();
+ */
+}
\ No newline at end of file
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/IRepository.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/Attic/IRepository.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/IRepository.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,283 @@
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.SortedMap;
+import java.util.SortedSet;
+
+/**
+ * Tool access to the repository
+ */
+public interface IRepository {
+
+ /** String used to define service in Spring context */
+ public static final String REPOSITORY_SERVICE_ID = "repositoryService";
+ /** String used to define the path to the context file */
+ public static final String REPOSITORY_CONTEXT_PATH =
+ "/org/lamsfoundation/lams/contentrepository/contentRepositoryApplicationContext.xml";
+
+ /**
+ * Login, creating a new ticket for the given credentials and specified
+ * workspace. If login fails, a LoginException is thrown and
+ * no valid ticket is generated. The credentials object in the ticket
+ * does not contain the password.
+ *
+ * It does not clear the password in the input credentials object.
+ *
+ * @param credentials The credentials of the user
+ * @param workspaceName the name of a workspace.
+ * @return a valid {@link ITicket} for the user to access the repository.
+ * @throws LoginException Login authentication fails.
+ * @throws AccessDeniedException User is not allowed to access this workspace.
+ * @throws WorkspaceNotFoundException Workspace name doesn't exist.
+ */
+ public ITicket login(ICredentials credentials, String workspaceName)
+ throws LoginException, AccessDeniedException, WorkspaceNotFoundException;
+
+ /**
+ * Create a new workspace, with the tool identified in the creditials
+ * as the owner.
+ * It does not clear the password in the credentials
+ * @param credentials this user/password must already exist in the repository. Password will be checked.
+ * @param workspaceName
+ * @param credentials The credentials of the user/tool
+ * @throws LoginException if credentials are not authorised to add/access the new workspace.
+ * @throws ItemExistsException if the workspace already exists.
+ * @throws RepositoryCheckedException if parameters are missing.
+ */
+ public void addWorkspace(ICredentials credentials, String workspaceName)
+ throws LoginException, AccessDeniedException, ItemExistsException, RepositoryCheckedException;
+
+ /**
+ * Create a new repository "user" - usually a tool.
+ *
+ * The password must be at least 6 chars.
+ *
+ * This method will not wipe out the password in the newCredential object.
+ *
+ * At this stage it is publically accessable - may need to move
+ * it to a private management tool if considered to insecure.
+ *
+ * @param newCredential this user/password will be added to the repository
+ * @throws RepositoryCheckedException if parameters are missing.
+ */
+ public void createCredential(ICredentials newCredential)
+ throws AccessDeniedException, RepositoryCheckedException;
+
+ /**
+ * Update a credential. Name cannot change, so really only the password changes
+ *
+ * The password must be at least 6 chars.
+ *
+ * @param oldCredential the current user/password
+ * @param newCredential the new user/password
+ * @throws LoginException if the oldCredential fails login test (e.g. wrong password)
+ * @throws RepositoryCheckedException if one of the credentials objects are missing
+ */
+ public void updateCredentials(ICredentials oldCredential, ICredentials newCredential)
+ throws AccessDeniedException, RepositoryCheckedException;
+
+ /**
+ * Add a new file to the repository. This will create
+ * a completely new entry (node) in the repository, starting
+ * with version 1.
+ * @param ticket ticket issued on login. Identifies tool and workspace - mandatory
+ * @param istream new file, as an input stream - mandatory
+ * @param mimeType mime type of file - optional
+ * @param versionDescription human readable comment about the version - optional
+ * @return nodeKey (uuid and version)
+ * @throws AccessDeniedException if ticket doesn't allow this action
+ * @throws FileException if unable to save node due to file error
+ * @throws InvalidParameterException if a required parameter is missing
+ * @throws RepositoryRuntimeException if any internal errors have occured
+ */
+ public abstract NodeKey addFileItem(ITicket ticket, InputStream istream, String filename,
+ String mimeType, String versionDescription)
+ throws FileException, AccessDeniedException, InvalidParameterException;
+
+ /**
+ * Add a new package of files to the repository. If startFile
+ * is not supplied, then it is assumed to be index.html.
+ *
+ * The directory separator character in the paths of the files in the package
+ * will be converted to "/" so that a web style path can be used to
+ * access the file.
+ *
+ * @param ticket ticket issued on login. Identifies tool and workspace - mandatory
+ * @param dirPath directory path containing files - mandatory
+ * @param startFile relative path of initial file - optional
+ * @param versionDescription human readable comment about the version - optional
+ * @return nodeKey (uuid and version)
+ * @throws AccessDeniedException if ticket doesn't allow this action
+ * @throws FileException if unable to save node due to file error
+ * @throws InvalidParameterException if a required parameter is missing
+ * @throws RepositoryRuntimeException if any internal errors have occured
+ */
+ public abstract NodeKey addPackageItem(ITicket ticket, String dirPath, String startFile,
+ String versionDescription)
+ throws AccessDeniedException, InvalidParameterException, FileException;
+
+ /**
+ * Update an existing file in the repository. This will create
+ * a new version of this file.
+ * @param ticket ticket issued on login. Identifies tool and workspace - mandatory
+ * @param uuid unique id of the file - mandatory
+ * @param istream new file, as an input stream - mandatory
+ * @param versionDescription human readable comment about the version - optional
+ * @param mimeType mime type of file - optional
+ * @throws AccessDeniedException if ticket doesn't allow this action
+ * @throws ItemNotFoundException if node with uuid cannot be found
+ * @throws FileException if unable to save node due to file error
+ * @throws InvalidParameterException if a required parameter is missing
+ * @throws RepositoryRuntimeException if any internal errors have occured
+ */
+ public NodeKey updateFileItem(ITicket ticket, Long uuid, String filename,
+ InputStream istream, String mimeType,
+ String versionDescription)
+ throws AccessDeniedException, ItemNotFoundException,
+ FileException, InvalidParameterException;
+
+ /**
+ * Add a new package of files to the repository. If startFile
+ * is not supplied, then it is assumed to be index.html.
+ *
+ * The directory separator character in the paths of the files in the package
+ * will be converted to "/" so that a web style path can be used to
+ * access the file.
+ *
+ * @param ticket ticket issued on login. Identifies tool and workspace - mandatory
+ * @param uuid unique id of the package - mandatory
+ * @param dirPath directory path containing files - mandatory
+ * @param startFile relative path of initial file - optional
+ * @param versionDescription human readable comment about the version - optional
+ * @return nodeKey (uuid and version)
+ * @throws AccessDeniedException if ticket doesn't allow this action
+ * @throws ItemNotFoundException if node with uuid cannot be found
+ * @throws FileException if unable to save node due to file error
+ * @throws InvalidParameterException if a required parameter is missing
+ * @throws RepositoryRuntimeException if any internal errors have occured
+ */
+ public abstract NodeKey updatePackageItem(ITicket ticket, Long uuid, String dirPath,
+ String startFile, String versionDescription)
+ throws AccessDeniedException, ItemNotFoundException,
+ FileException, InvalidParameterException ;
+
+ /**
+ * Get an item from the repository based on the UUID. This
+ * may be either a file or package node.
+ *
+ * @param ticket ticket issued on login. Identifies tool and workspace - mandatory
+ * @param uuid id of the file/package - mandatory
+ * @param version desired version - if null gets latest version
+ * @return node.
+ */
+ public abstract IVersionedNode getFileItem(ITicket ticket, Long uuid, Long version)
+ throws AccessDeniedException, ItemNotFoundException, FileException;
+
+
+ /**
+ * Get an item from the repository based on the UUID and relative
+ * path. Only used to get the content from a package. The
+ * UUID is the id of the package, and relPath is the relative
+ * path within the package.
+ *
+ * If the item is a package and relPath is null, return the package node.
+ *
+ * The relPath must be specified in web format ie use a separator
+ * of "/" not "\".
+ *
+ * @param ticket ticket issued on login. Identifies tool and workspace - mandatory
+ * @param uuid id of the package - mandatory
+ * @param versionId desired version - if null gets latest version. This is the version
+ * of the package node, not the related file.
+ * @param relPath relative path within the package - if null,
+ * returns start file.
+ * @throws AccessDeniedException if ticket doesn't allow this action
+ * @throws ItemNotFoundException if node with uuid cannot be found
+ * @throws FileException if unable to save node due to file error
+ * @throws RepositoryRuntimeException if any internal errors have occured
+ * @return node.
+ */
+ public abstract IVersionedNode getFileItem(ITicket ticket, Long uuid, Long versionId, String relPath)
+ throws AccessDeniedException, ItemNotFoundException, FileException;
+
+ /**
+ * Return a list of all the nodes for a package. The first in the list
+ * is the package node. The others are in arbitrary order.
+ *
+ * @param ticket
+ * @param uuid uuid of the package node
+ * @param version version of the package node
+ * @return list of all nodes for package.
+ * @throws AccessDeniedException
+ * @throws ItemNotFoundException
+ * @throws FileException
+ */
+ public List getPackageNodes(ITicket ticket, Long uuid, Long version) throws AccessDeniedException,
+ ItemNotFoundException, FileException;
+
+ /** Get the history for a node. Quite intensive operation the
+ * first time it is run on a node as it has to build all the
+ * data structures.
+ * @param ticket ticket issued on login. Identifies tool and workspace - mandatory
+ * @return SortedSet of IVersionDetail objects, ordered by version
+ */
+ public SortedSet getVersionHistory(ITicket ticket, Long uuid)
+ throws ItemNotFoundException,AccessDeniedException ;
+
+ /** Delete the current version of a node, returning a list of the files
+ * that could not be deleted properly. If it is a package node, the child
+ * nodes will be deleted.
+ *
+ * You cannot delete the child of a package node - you have to delete the
+ * whole package.
+ *
+ * If after deleting the version, we find that there a no other versions
+ * for a node, then delete the node.
+ *
+ * A file missing from the disk is ignored, allowing nodes with lost files
+ * to be deleted.
+ *
+ * @throws AccessDeniedException if ticket doesn't allow this action
+ * @throws ItemNotFoundException if node with uuid cannot be found
+ * @throws InvalidParameterException if a required parameter is missing
+ * @throws RepositoryRuntimeException if any internal errors have occured
+ * @return the list of file(paths) that could not be deleted. The db entries
+ * will have been deleted but these files could not be deleted. */
+ public String[] deleteVersion(ITicket ticket, Long uuid, Long version)
+ throws AccessDeniedException, InvalidParameterException, ItemNotFoundException;
+
+ /** Delete a node and all its versions, returning a list of the files
+ * that could not be deleted properly. If it is a package node, the child
+ * nodes will be deleted.
+ *
+ * A file missing from the disk is ignored, allowing nodes with lost files
+ * to be deleted.
+ *
+ * @throws AccessDeniedException if ticket doesn't allow this action
+ * @throws ItemNotFoundException if node with uuid cannot be found
+ * @throws InvalidParameterException if a required parameter is missing
+ * @throws RepositoryRuntimeException if any internal errors have occured
+ * @return the list of file(paths) that could not be deleted. The db entries
+ * will have been deleted but these files could not be deleted. */
+ public String[] deleteNode(ITicket ticket, Long uuid)
+ throws AccessDeniedException, InvalidParameterException, ItemNotFoundException;
+
+ /**
+ * Finish using this ticket. No more updates may be used with this ticket
+ * after logout(). Allows any resources to be freed.
+ * @param ticket ticket issued on login. Identifies tool and workspace - mandatory
+ */
+ public void logout(ITicket ticket) throws AccessDeniedException;
+
+ /** Get a complete list of all nodes in the workspace and their
+ * version histories.
+ *
+ * Warning: Once a workspace gets a lot of nodes, this will be
+ * a very very expensive call!!!!!
+ *
+ * When a tool logs into the repository, it will pass in a simple credentials
+ * object which has just the userid and password set.
+ *
+ * The repository then attaches credential to the ticket.
+ * The new credential doesn't have the password and it
+ * is never connected from the database.
+ *
+ * The credential comparison is done using the DAO class - it
+ * does not load the data from the database but gets the
+ * password to the db for checking.
+ *
+ * The original credentials contains attributes. This will be useful
+ * for the future, but has not yet been implemented.
+ *
+ * @see org.lamsfoundation.lams.contentrepository.ICredentials
+ * @author Fiona Malikoff
+*/
+public class SimpleCredentials implements ICredentials {
+
+ private String name = null;
+ private char[] password = null;
+
+ /**
+ * Should only be used by hibernate or package calls.
+ * @param name
+ * @param password
+ */
+ public SimpleCredentials(String name, char[] password ) {
+ this.name = name;
+ this.password = (char[]) password.clone();
+ }
+
+ /**
+ * Returns the name of the tool.
+ *
+ * @return the tool name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the password.
+ *
+ * Note that this method returns a reference to the password.
+ * The password is set when the creditionals are passed in to get a ticket,
+ * and then removed.
+ *
+ * @return the password.
+ */
+ public char[] getPassword() {
+ return password;
+ }
+
+ /**
+ * Clear the current password. Clear it after use to
+ * ensure that it is not left in memory as security hole.
+ */
+ public void clearPassword() {
+ password = new char[0];
+ }
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/SimpleRepository.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/Attic/SimpleRepository.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/SimpleRepository.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,747 @@
+/*
+ * Created on Dec 20, 2004
+ */
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.lamsfoundation.lams.contentrepository.dao.ICredentialDAO;
+import org.lamsfoundation.lams.contentrepository.dao.IWorkspaceDAO;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.BeanFactoryAware;
+
+
+/**
+ * Many methods in this class will throw a RepositoryRuntimeException
+ * if the internal data is missing. This is not indicated
+ * on the method signatures.
+ *
+ * The methods in this class do not explicitly check that a credential
+ * or ticket has been supplied. This is checked by the
+ * checkCredentialTicketBeforeAdvice advisor, for all transactioned
+ * calls (see the application context file). Therefore this
+ * class must be used in the Spring framework - if it is ever
+ * run separately and without suitable AOP support then
+ * each transaction method must check that the credential is okay
+ * or that the ticket is a known ticket (isTicketOkay() method).
+ *
+ * This class also depends on the transactions defined in the
+ * application context for the hibernate sessions to work properly.
+ * If the method isn't transactioned, then there won't be a proper
+ * hibernate session in the DAO and all sorts of errors will occur
+ * on lazy loading (even lazy loading withing the DAO) and when we
+ * write out nodes.
+ *
+ * So while the only footprint you see here of Spring is the beanfactory,
+ * the use of this as a singleton (generated by Spring) affects
+ * more than just how the object is created.
+ *
+ * @author Fiona Malikoff
+ */
+public class SimpleRepository implements IRepositoryAdmin, BeanFactoryAware {
+
+ protected Logger log = Logger.getLogger(SimpleRepository.class);
+
+ private ICredentialDAO credentialDAO = null;
+ private IWorkspaceDAO workspaceDAO = null;
+
+ private BeanFactory beanFactory = null;
+
+ private Set ticketIdSet = new HashSet(); // set of currently known tickets.
+
+ public SimpleRepository () {
+ log.info("Repository singleton being created.");
+ }
+
+ /* ********** Whole of repository methods - login, logout, addWorkspace, etc ****/
+
+ /**
+ * @param workspaceName
+ * @return
+ * @throws WorkspaceNotFoundException
+ */
+ private CrWorkspace getWorkspace(String workspaceName) throws WorkspaceNotFoundException {
+ // call workspace dao to get the workspace
+ CrWorkspace workspace = workspaceDAO.findByName(workspaceName);
+ if ( workspace == null ) {
+ throw new WorkspaceNotFoundException("Workspace "+workspaceName+" does not exist.");
+ }
+ return workspace;
+ }
+
+ /**
+ * @param workspaceId
+ * @return
+ * @throws WorkspaceNotFoundException
+ */
+ private CrWorkspace getWorkspace(Long workspaceId) throws WorkspaceNotFoundException {
+ // call workspace dao to get the workspace
+ CrWorkspace workspace = (CrWorkspace) workspaceDAO.find(CrWorkspace.class, workspaceId);
+ if ( workspace == null ) {
+ throw new WorkspaceNotFoundException("Workspace id="+workspaceId+" does not exist.");
+ }
+ return workspace;
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IRepository#login(org.lamsfoundation.lams.contentrepository.ICredentials, java.lang.String)
+ */
+ public ITicket login(ICredentials credentials, String workspaceName)
+ throws AccessDeniedException, LoginException, WorkspaceNotFoundException {
+
+ if ( workspaceDAO == null || credentialDAO == null )
+ throw new RepositoryRuntimeException("Workspace or Credential DAO object missing. Unable to process login.");
+
+ CrWorkspace workspace = getWorkspace(workspaceName);
+
+ if ( ! credentialDAO.checkCredential(credentials, workspace) ) {
+ throw new LoginException("Login failed. Password incorrect or not authorised to access this workspace.");
+ }
+
+ // okay, we should now be able to create a ticket
+ // make ticket, create new credentials without the password
+ ITicket ticket = new SimpleTicket(workspace.getWorkspaceId());
+ ticketIdSet.add(ticket.getTicketId());
+ return (ITicket) ticket;
+ }
+
+
+ /** Add a workspace, giving the credentials as the user of this workspace.
+ * It does not clear the password in the credentials
+ * @param credentials this user/password must already exist in the repository. Password will be checked.
+ * @param workspaceName
+ * @throws LoginException if credentials are not authorised to add/access the new workspace.
+ * @throws ItemExistsException if the workspace already exists.
+ * @throws RepositoryCheckedException if parameters are missing.
+ */
+ public void addWorkspace(ICredentials credentials, String workspaceName)
+ throws AccessDeniedException, LoginException, ItemExistsException, RepositoryCheckedException {
+
+ // call workspace dao to check the login and get the workspace
+ if ( workspaceDAO == null || credentialDAO == null || beanFactory == null )
+ throw new RepositoryRuntimeException("Workspace, Credential DAO or Bean Factory object missing. Unable to process login.");
+
+ CrWorkspace workspace = workspaceDAO.findByName(workspaceName);
+ if ( workspace != null ) {
+ throw new ItemExistsException("Workspace "+workspaceName+" already exists, cannot add workspace.");
+ }
+
+ // check the credentials
+ if ( ! credentialDAO.checkCredential(credentials ) ) {
+ throw new LoginException("User not authorised to access the repository.");
+ }
+
+ // try to create the workspace - this should be done via the Spring bean factory.
+ CrWorkspace crWorkspace = new CrWorkspace();
+ crWorkspace.setName(workspaceName);
+ workspaceDAO.insert(crWorkspace);
+ assignCredentials(credentials, crWorkspace);
+ }
+
+ /**
+ * Create a new repository "user" - usually a tool.
+ * The password must be at least 6 chars.
+ * This method will not wipe out the password in the newCredential object.
+ * Possibly this should only be available to an internal management tool
+ * *** Security Risk - I'm converting two passwords to a string... ***
+ */
+ public void createCredential(ICredentials newCredential)
+ throws AccessDeniedException, RepositoryCheckedException {
+ if ( newCredential == null || newCredential.getName() == null || newCredential.getPassword() == null)
+ throw new RepositoryCheckedException("Credential is null or name/password is missing - cannot create credential.");
+
+ verifyNewPassword(newCredential.getPassword());
+
+ // check that the user doesn't already exist
+ CrCredential cred = credentialDAO.findByName(newCredential.getName());
+ if ( cred != null )
+ throw new RepositoryCheckedException("Credential name "+newCredential.getName()+" already exists - cannot create credential.");
+
+ // try to create the credential - this should be done via the Spring bean factory.
+ cred = new CrCredential();
+ cred.setName(newCredential.getName());
+ cred.setPassword(new String(newCredential.getPassword()));
+ credentialDAO.insert(cred);
+ }
+
+ /**
+ * Update a credential. Name cannot change, so really only the password changes
+ * The password must be at least 6 chars.
+ * Possibly this should only be available to an internal management tool
+ * *** Security Risk - I'm converting the password to a string... ***
+ * @throws LoginException if the oldCredential fails login test (e.g. wrong password)
+ * @throws RepositoryCheckedException if one of the credentials objects are missing
+ * @throws RepositoryRuntimeException if an internal error occurs.
+ */
+ public void updateCredentials(ICredentials oldCredential, ICredentials newCredential)
+ throws AccessDeniedException, LoginException, RepositoryCheckedException, RepositoryRuntimeException
+ {
+ ///throws RepositoryCheckedException {
+ if ( workspaceDAO == null || credentialDAO == null )
+ throw new RepositoryRuntimeException("Workspace or Credential DAO object missing. Cannot update credentials.");
+
+ if ( oldCredential == null || newCredential == null )
+ throw new RepositoryCheckedException("Credentials missing. Cannot update credentials.");
+
+ if ( ! credentialDAO.checkCredential(oldCredential) )
+ throw new LoginException("Old password wrong. Cannot update credentials.");
+
+ char[] newPassword = newCredential.getPassword();
+ if ( newPassword != null ) {
+ // if there isn't a new password then there isn't anything to change...
+ verifyNewPassword(newPassword);
+ CrCredential cred = credentialDAO.findByName(oldCredential.getName());
+ cred.setPassword(new String(newPassword));
+ credentialDAO.update(cred);
+ }
+ }
+
+ /**
+ * Checks that a password meets our password criteria. This could be implemented
+ * as a Strategy, but that's overkill!
+ *
+ * Checks that the password is six or more characters.
+ * @param password
+ * @throws RepositoryCheckedException if
+ */
+ private void verifyNewPassword(char[] password ) throws RepositoryCheckedException {
+ if ( password != null && password.length < 6 )
+ throw new RepositoryCheckedException("Password invalid - must be 6 or more characters. Cannot create credential.");
+ }
+
+ /**
+ * Assign credentials to a workspace.
+ * Will check the credentials to ensure they are in the database.
+ * Possibly this should only be available to an internal management tool
+ */
+ public void assignCredentials(ICredentials credentials, String workspaceName)
+ throws AccessDeniedException, RepositoryCheckedException, WorkspaceNotFoundException, LoginException {
+
+ if ( workspaceDAO == null)
+ throw new RepositoryRuntimeException("Workspace DAO object missing. Cannot assign credentials.");
+
+ if ( credentials == null || workspaceName == null )
+ throw new RepositoryCheckedException("Credentials or workspace is missing. Cannot assign credentials.");
+
+ if ( ! credentialDAO.checkCredential(credentials) )
+ throw new LoginException("Credentials are not authorised to have access to the repository/workspace.");
+
+ // call workspace dao to get the workspace
+ CrWorkspace workspace = getWorkspace(workspaceName);
+ if ( workspace == null ) {
+ throw new WorkspaceNotFoundException("Workspace "+workspaceName+" does not exist.");
+ }
+
+ assignCredentials(credentials, workspace);
+ }
+
+ /**
+ * Assign credentials to a workspace. Assume credentials are already checked.
+ * Possibly this should only be available to an internal management tool. Workspace
+ * is expected to be attached to a session.
+ * *** Security Risk - I'm converting the password to a string by reading it in from the database... ***
+ */
+ private void assignCredentials(ICredentials credentials, CrWorkspace workspace)
+ throws RepositoryCheckedException {
+
+ if ( workspaceDAO == null || credentialDAO == null )
+ throw new RepositoryRuntimeException("Workspace or Credential DAO object missing. Cannot assign credentials.");
+
+ if ( credentials == null || workspace == null )
+ throw new RepositoryCheckedException("Credentials or workspace is missing. Cannot assign credentials.");
+
+ CrCredential crCredential = credentialDAO.findByName(credentials.getName());
+ if ( crCredential == null )
+ throw new RepositoryCheckedException("Credential object cannot be found in database. Cannot assign credentials.");
+
+ CrWorkspaceCredential wc = new CrWorkspaceCredential();
+ wc.setCrCredential(crCredential);
+ wc.setCrWorkspace(workspace);
+
+ Set wcSet = workspace.getCrWorkspaceCredentials();
+ if ( wcSet == null ) {
+ log.debug("Creating new wc set for workspace "+workspace.getName());
+ wcSet = new HashSet();
+ wcSet.add(wc);
+ workspace.setCrWorkspaceCredentials(wcSet);
+ } else {
+ Iterator iter = wcSet.iterator();
+ CrWorkspaceCredential found = null;
+ while ( iter.hasNext() && found == null ) {
+ CrWorkspaceCredential item = (CrWorkspaceCredential) iter.next();
+ if ( item.getCrCredential() != null &&
+ item.getCrCredential().getCredentialId().equals(crCredential.getCredentialId()) &&
+ item.getCrWorkspace() != null &&
+ item.getCrWorkspace().getWorkspaceId().equals(workspace.getWorkspaceId()) ) {
+ found = item;
+ }
+ }
+ if ( found == null ) {
+ // not already in the set, so we can add!
+ wcSet.add(wc);
+ }
+ }
+
+ workspaceDAO.insert(wc);
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IRepository#logout(org.lamsfoundation.lams.contentrepository.ITicket)
+ */
+ public void logout(ITicket ticket) throws AccessDeniedException {
+ ticketIdSet.remove(ticket.getTicketId());
+ ticket.clear();
+ }
+
+ /* ********** Node related methods, requiring ticket for access ****/
+
+ /** Is this ticket okay?
+ * @see org.lamsfoundation.lams.contentrepository.IRepository#addFileItem(org.lamsfoundation.lams.contentrepository.ITicket, java.io.InputStream, java.lang.String, java.lang.String, java.lang.String)
+ */
+ public boolean isTicketOkay(ITicket ticket) {
+ return ( ticket != null && ticketIdSet.contains(ticket.getTicketId()) );
+ }
+
+ /** Get an existing SimpleVersionedNode. Reads the node from the database.
+ * Does not cache the node. If versionId is null, then gets the latest version.
+ * @throws ItemNotFoundException*/
+ private SimpleVersionedNode getNode(Long workspaceId, Long uuid, Long versionId) throws ItemNotFoundException {
+ SimpleVersionedNode dbNode = (SimpleVersionedNode) beanFactory.getBean("node", SimpleVersionedNode.class);
+ dbNode.loadData(workspaceId, uuid,versionId);
+ return dbNode;
+ }
+
+ /**
+ * Create a file node. Does not save the node.
+ */
+ private SimpleVersionedNode createFileNode(CrWorkspace workspace, InputStream istream, String filename,
+ String mimeType, String versionDescription,
+ String relPath, SimpleVersionedNode packageNode)
+ throws InvalidParameterException, FileException, ValidationException {
+ try {
+
+ SimpleVersionedNode initialNodeVersion = (SimpleVersionedNode) beanFactory.getBean("node",
+ SimpleVersionedNode.class);
+ initialNodeVersion.initialiseNode(relPath, NodeType.FILENODE, (CrWorkspace) workspace, packageNode);
+ initialNodeVersion.setFile(istream, filename, mimeType);
+ return initialNodeVersion;
+
+ } catch ( NoSuchNodeTypeException e) {
+ // if this is thrown, then it is bug - nothing external should cause it.
+ throw new RepositoryRuntimeException("Internal error: unable to add file. "
+ +e.getMessage(), e);
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IRepository#addFileItem(org.lamsfoundation.lams.contentrepository.ITicket, java.io.InputStream, java.lang.String, java.lang.String, java.lang.String)
+ */
+ public NodeKey addFileItem(ITicket ticket, InputStream istream,
+ String filename, String mimeType, String versionDescription)
+ throws FileException, AccessDeniedException,
+ InvalidParameterException {
+
+ try {
+ CrWorkspace workspace = getWorkspace(ticket.getWorkspaceId());
+ SimpleVersionedNode initialNodeVersion = createFileNode(workspace, istream, filename, mimeType, versionDescription, null, null);
+ initialNodeVersion.save(versionDescription, null);
+ return initialNodeVersion.getNodeKey();
+ } catch ( ValidationException e) {
+ // if this is thrown, then it is bug - nothing external should cause it.
+ throw new RepositoryRuntimeException("Internal error: unable to add file. "
+ +e.getMessage(), e);
+ } catch ( WorkspaceNotFoundException e ) {
+ // if this is thrown, then it is bug - ticket shouldn't contain a workspace that doesn't exist.
+ throw new RepositoryRuntimeException("Internal error: unable to add file. "
+ +e.getMessage(), e);
+ }
+ }
+
+ /**
+ * Process files in the package.
+ *
+ * @param dirPath: the directory from which to get files. Mandatory.
+ * @param packageNode: node representing the package. Mandatory.
+ * @return nodeSet: set of child nodes for the package node
+ * @throws InvalidParameterException
+ * @throws FileException
+ */
+ private List processPackageFilesSaveNode(CrWorkspace workspace, String dirPath, SimpleVersionedNode packageNode, String versionDescription)
+ throws InvalidParameterException, FileException, ValidationException {
+
+ File directory = new File(dirPath);
+ if ( ! directory.exists() || ! directory.isDirectory() || ! directory.canRead() ) {
+ throw new FileException("Directory "+dirPath+" does not exist, is not a directory or cannot be read.");
+ }
+
+ // set up the path to be removed from file paths, to make a relative path.
+ // this is a directory but we may need to add the directory separator on the end
+ String removePathToMakeRelPath = directory.getAbsolutePath();
+ if ( removePathToMakeRelPath.charAt(removePathToMakeRelPath.length()-1) != File.separatorChar )
+ removePathToMakeRelPath += File.separatorChar;
+
+ List nodeList = new ArrayList();
+ processDirectory(workspace, removePathToMakeRelPath, directory, packageNode, versionDescription, nodeList);
+ return nodeList;
+ }
+
+ /**
+ * Process Directory of files. This method is called recursively to process
+ * files in the initial directory and in all subdirectories of this directory.
+ *
+ * @param removePathToMakeRelPath: string to remove from a files absolute
+ * path to create relPath, the path relative to the package node. This is
+ * the absolute path to the directory that contains all the files for the package.
+ * This value stays the same across all recursive calls. Mandatory.
+ * @param dirFile: the directory from which to get files. Initially this will
+ * be the directory that contains the package but as recursive calls are made,
+ * this value will change. Mandatory.
+ * @param packageNode: node representing the package. Mandatory.
+ * @param versionDescription: version description for node. Optional.
+ * This value stays the same across all recursive calls.
+ * @param nodeSet: set of nodes to update with the new nodes. Passed in through
+ * the recursion for efficiency (rather than keep creating new collections). Must
+ * not be null.
+ * @throws FileException
+ */
+ private void processDirectory(CrWorkspace workspace, String removePathToMakeRelPath, File dirFile, SimpleVersionedNode packageNode, String versionDescription, List nodeList)
+ throws InvalidParameterException, FileException, ValidationException {
+
+ if ( ! dirFile.exists() || ! dirFile.isDirectory() || ! dirFile.canRead() ) {
+ throw new FileException("Directory "+dirFile.getAbsolutePath()+" does not exist, is not a directory or cannot be read.");
+ }
+
+ File file = null; // declare outside try so available in catch
+ try {
+
+ File[] files = dirFile.listFiles();
+ for ( int i=0; i
+ * Many methods in this class will throw a RepositoryRuntimeException
+ * if the internal data is missing. This is not indicated
+ * on the method signatures.
+ *
+ * TODO Should these be pooled, instead of creating a new prototype node
+ * each time. Some comments on the web indicate that creating a Spring bean
+ * and wiring it up may be expensive, so we don't want to do it. But looking
+ * at the Spring reference manual, it appears the pooling may hand out
+ * the instances on each method invocation. On other hand, other stuff I've
+ * read suggest that Spring won't manage the lifecycle so destroy doesn't get
+ * called. So, given these objects are being passed back to calling
+ * programs and the difficulty of initialising the db data, its tempting
+ * to make these POJOs not created by Spring.
+ *
+ * @author Fiona Malikoff
+ */
+public class SimpleVersionedNode implements BeanFactoryAware, IVersionedNodeAdmin {
+
+ private BeanFactory beanFactory = null;
+
+ protected Logger log = Logger.getLogger(SimpleVersionedNode.class);
+
+ private INodeDAO nodeDAO = null;
+ private IFileDAO fileDAO = null;
+
+ private CrNode node = null;
+ private CrNodeVersion nodeVersion = null;
+ private InputStream newIStream = null;
+ private String filePath = null; // transient data - set when the input stream is written out.
+ private ITicket ticket = null; // transient data - using for grouping nodes in a session
+
+ // TODO This is a case for AOP!
+ /** Check that all the necessary objects exists - node, nodeVersion, nodeDAO and fileDAO
+ * If one of them is missing, will throw an exception, appending the specialisedMessage
+ * on the end. e.g specialisedMessage = "Unable to set property". */
+ private void nodeObjectInitilised(String specialisedMessage) throws RepositoryRuntimeException {
+ if ( node == null )
+ throw new RepositoryRuntimeException("Node details missing (node=null). "+specialisedMessage);
+
+ if ( nodeVersion == null )
+ throw new RepositoryRuntimeException("Node details missing (nodeVersion=null). "+specialisedMessage);
+
+ if ( nodeDAO == null )
+ throw new RepositoryRuntimeException("Node details missing (nodeDAO=null). "+specialisedMessage);
+
+ if ( fileDAO == null )
+ throw new RepositoryRuntimeException("Node details missing (fileDAO=null). "+specialisedMessage);
+ }
+
+ /**
+ * Initialise the current node (which is assumed to be a newly created Spring
+ * bean) with relPath and node type.
+ *
+ * If nodeTypeName is not recognized, then NoSuchNodeTypeException is thrown.
+ * See {@link NodeType} for possible node types.
+ *
+ * This method belongs in a factory that creates nodes...
+ *
+ * @param relPath The path of the new Node that is to be created,
+ * the last item of this path will be the name of the new Node.
+ * @param primaryNodeTypeName The name of the primary node type of the new node.
+ * @return new node
+ * @throws NoSuchNodeTypeException if the node type is unknown.
+ * @throws RepositoryRuntimeException if an internal error occurs.
+ */
+ protected void initialiseNode(String relPath, String nodeTypeName, CrWorkspace workspace, SimpleVersionedNode parentNode)
+ throws NoSuchNodeTypeException {
+
+ if ( ! NodeType.isValidNodeType(nodeTypeName) ) {
+ throw new NoSuchNodeTypeException("Node type "+nodeTypeName+" is not a valid node type. ");
+ }
+
+ CrNodeVersion parentNodeVersion = parentNode != null ? parentNode.nodeVersion : null;
+ createCrNode(relPath, nodeTypeName, workspace, parentNodeVersion);
+ if ( parentNode != null ) {
+ parentNode.nodeVersion.addChildNodeVersion(this.nodeVersion);
+ }
+
+ }
+
+ /** Load the data from the database (or other datastore).
+ * Creates the CrNode and CrNodeVersion objects.
+ * Equivalent of initialiseNode for existing nodes
+ * Checks that the workspace found in the database is the
+ * expected workspace.
+ *
+ * If this node object is returned to a web app, then the
+ * crNode and crNodeVersion objects will be disconnected
+ * from the session, as the session will have been ended
+ * with the Spring transaction.
+ */
+ protected void loadData(Long workspaceId, Long uuid, Long versionId) throws ItemNotFoundException {
+
+ if ( uuid == null ) {
+ throw new ItemNotFoundException("UUID is null, unable to find node.");
+ }
+
+ if ( workspaceId == null ) {
+ throw new ItemNotFoundException("Workspace Id is null, unable to find node.");
+ }
+
+ // If version id is null, then get latest version!
+ node = null;
+ nodeVersion = null;
+
+ try {
+ node = (CrNode) nodeDAO.find(CrNode.class, uuid);
+ } catch (HibernateObjectRetrievalFailureException e ) {
+ }
+
+ if ( node == null ) {
+
+ throw new ItemNotFoundException("Node "+uuid+" not found.");
+
+ } else if ( ! workspaceId.equals(node.getCrWorkspace().getWorkspaceId()) ) {
+
+ log.error("Security warning. User of workspace "+workspaceId
+ +" is trying to access node "+uuid+" which is in workspace "
+ +node.getCrWorkspace().getWorkspaceId()
+ +" Request for node will be rejected.");
+ throw new ItemNotFoundException("Node "+uuid+" does not exist in workspace "+workspaceId);
+ }
+
+ /* TODO The node codes will trigger all the versions to be loaded
+ * (ie counteract lazy loading but we probably don't need this!
+ * Would it be better to restructure database to allow a map
+ * to be created?
+ */
+ nodeVersion = node.getNodeVersion(versionId);
+ if ( nodeVersion == null ) {
+ throw new ItemNotFoundException("No version "
+ + ( versionId != null ? "#"+versionId.toString() : "")
+ + "found for node");
+ }
+
+ }
+
+
+ /**
+ * Make the current node a new version of the given node.
+ *
+ * This method does not work well here as it should be on a node
+ * only object, not a node version object. But having a node object
+ * requires another interface - some methods in this class are
+ * really node methods, some are version methods. So live with
+ * this for the moment.
+ *
+ * If we ever pass the node back to the calling program, rather
+ * than working with the restricted ticket calls, then this
+ * method should be revisited and a new node object will be
+ * required - otherwise next version id could be wrong.
+ *
+ * Maybe put this method belongs in a factory that creates nodes...
+ *
+ * @throws RepositoryRuntimeException if an internal error occurs.
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#createNewVersion(java.lang.String, java.lang.String)
+ */
+ protected void initialiseNewVersionOfNode(SimpleVersionedNode existingNode) {
+
+ this.node = existingNode.node;
+
+ // get next version id
+ Long nextVersionId = this.node.incrementNextVersionId();
+
+ nodeVersion = createCrNodeVersion(node.getType(),
+ new Date(System.currentTimeMillis()), nextVersionId,
+ existingNode.nodeVersion.getParentNodeVersion());
+ node.getCrNodeVersions().add(nodeVersion);
+ }
+
+ public NodeKey getNodeKey() {
+ return new NodeKey(getUUID(), getVersion());
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#setProperty(java.lang.String, java.lang.String, int)
+ */
+ public void setProperty(String name, String value, int type) {
+ nodeObjectInitilised("Unable to set property "+name+" to value "+value);
+ nodeVersion.setProperty(name, value, type);
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#setProperty(java.lang.String, java.lang.String)
+ */
+ public void setProperty(String name, String value)
+ throws RepositoryRuntimeException {
+ nodeObjectInitilised("Unable to set property "+name+" to value "+value);
+ nodeVersion.setProperty(name, value, PropertyType.STRING);
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#setProperty(java.lang.String, boolean)
+ */
+ public void setProperty(String name, boolean value) {
+ nodeObjectInitilised("Unable to set property "+name+" to value "+value);
+ nodeVersion.setProperty(name, Boolean.toString(value), PropertyType.BOOLEAN);
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#setProperty(java.lang.String, double)
+ */
+ public void setProperty(String name, double value) {
+ nodeObjectInitilised("Unable to set property "+name+" to value "+value);
+ nodeVersion.setProperty(name, Double.toString(value), PropertyType.DOUBLE);
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#setProperty(java.lang.String, long)
+ */
+ public void setProperty(String name, long value) {
+ nodeObjectInitilised("Unable to set property "+name+" to value "+value);
+ nodeVersion.setProperty(name, Long.toString(value), PropertyType.LONG);
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#setProperty(java.lang.String, java.util.Calendar)
+ */
+ public void setProperty(String name, Calendar value) {
+ nodeObjectInitilised("Unable to set property "+name+" to value "+value);
+ nodeVersion.setProperty(name, value.toString(), PropertyType.DATE);
+ }
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#getProperty(java.lang.String)
+ */
+ public IValue getProperty(String name) {
+ nodeObjectInitilised("Unable to get property "+name);
+
+ return nodeVersion.getProperty(name);
+ }
+
+
+ /** Returns a set of IValue objects - this method could cause a problem
+ * when lazy initialised.
+ */
+ public Set getProperties(){
+ nodeObjectInitilised("Unable to get properties.");
+ return nodeVersion.getCrNodeVersionProperties();
+ }
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#getUUID()
+ */
+ public Long getUUID() {
+ nodeObjectInitilised("Unable to get uuid.");
+ return node.getNodeId();
+ }
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#hasProperty(java.lang.String)
+ */
+ public boolean hasProperty(String name) {
+ nodeObjectInitilised("Unable to check properties.");
+ return nodeVersion.hasProperty(name);
+ }
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#hasProperties()
+ */
+ public boolean hasProperties() {
+ nodeObjectInitilised("Unable to check properties.");
+ return nodeVersion.hasProperties();
+ }
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#getNodeType()
+ */
+ public String getNodeType() {
+ nodeObjectInitilised("Unable to get node type.");
+ return node.getType();
+ }
+
+ /** (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#isNodeType(java.lang.String)
+ */
+ public boolean isNodeType(String nodeTypeName) {
+ nodeObjectInitilised("Unable to get check node type.");
+ return node.isNodeType(nodeTypeName);
+ }
+
+ /** Get the history for this node. Quite intensive operation the
+ * first time it is run on a node as it has to build all the
+ * data structures.
+ * @return SortedSet of IVersionDetail objects, ordered by version
+ */
+ public SortedSet getVersionHistory() {
+ nodeObjectInitilised("Unable to get version history.");
+ return node.getVersionHistory();
+ }
+
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#getPath()
+ */
+ public String getPath() {
+ nodeObjectInitilised("Unable to get path.");
+ return node.getPath();
+ }
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#getTicket()
+ */
+ public ITicket getTicket() {
+ return ticket;
+ }
+
+ /**
+ * Set the ticket. Should be called when the versioned node is added to
+ * the ticket. Not part of the IVersionedNode interface as is is only
+ * set by the repository.
+ */
+ protected void setTicket(ITicket ticket) {
+ this.ticket=ticket;
+ }
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#getVersion()
+ */
+ public Long getVersion() {
+ nodeObjectInitilised("Unable to get version.");
+ return nodeVersion.getVersionId();
+ }
+
+ /**
+ * @see org.lamsfoundation.lams.contentrepository.IVersionedNode#getCreatedDateTime()
+ */
+ public Date getCreatedDateTime() {
+ nodeObjectInitilised("Unable to get version.");
+ return nodeVersion.getCreatedDateTime();
+
+ }
+
+ /** Get the file, as an inputstream. It is the responsibility
+ * of the caller to close the stream. Note: this should only be
+ * called once the node is saved - do not call it directly after
+ * setting the file stream
+ *
+ * If the node is a package node, it will get the input stream
+ * of the first file.
+ */
+ public InputStream getFile() throws FileException {
+ nodeObjectInitilised("Unable to get file");
+
+ if ( isNodeType(NodeType.FILENODE) ) {
+
+ return fileDAO.getFile(node.getNodeId(), nodeVersion.getVersionId());
+
+ } else if ( isNodeType(NodeType.PACKAGENODE) ) {
+
+ try {
+ IValue value = getProperty(PropertyName.INITIALPATH);
+ String lookupPath = value != null ? value.getString() : null;
+ IVersionedNode startNode = getNode(lookupPath);
+ return startNode.getFile();
+
+ } catch ( ValueFormatException vfe ) {
+ // if this is thrown, then it is bug - nothing external should cause it.
+ throw new RepositoryRuntimeException("Internal error: unable to get file."
+ +vfe.getMessage(), vfe);
+ } catch ( ItemNotFoundException e ) {
+ throw new FileException("Unable to find initial page for package. Initial path indicated "+PropertyName.INITIALPATH);
+ }
+
+ } else {
+ throw new FileException("Node is not a file or a package. No stream to return.");
+ }
+ }
+
+ /** Set the file, passed in as an inputstream. The stream will be closed
+ * when the file is saved. Only nodes of type FILENODE can have a file!
+ * @param iStream mandatory
+ * @param filename mandatory
+ * @param mimeType optional */
+ public void setFile(InputStream iStream, String filename, String mimeType)
+ throws InvalidParameterException {
+
+ nodeObjectInitilised("Unable to set the file stream.");
+
+ /* Perform basic validation */
+ if ( ! NodeType.FILENODE.equals(node.getType()) )
+ throw new InvalidParameterException("Node must be of type FILE_NODE for a file to be added to the node. Unable to set the file stream.");
+
+ if ( iStream == null )
+ throw new InvalidParameterException("InputStream is required.");
+
+ String trimmedFilename = filename != null ? filename.trim() : null;
+ if ( trimmedFilename == null || trimmedFilename.length() == 0)
+ throw new InvalidParameterException("Filename is required.");
+
+ /* Validation passed, set up the file details */
+ this.filePath = null; // will be set when the stream is written out
+ this.newIStream = iStream;
+ setProperty(PropertyName.FILENAME, trimmedFilename);
+
+ if ( mimeType != null && mimeType.length() > 0 ) {
+ setProperty(PropertyName.MIMETYPE, mimeType);
+ } else {
+ setProperty(PropertyName.MIMETYPE, (String) null);
+ }
+ }
+
+ public String toString() {
+ return new ToStringBuilder(this)
+ .append("node", node)
+ .append("nodeVersion", nodeVersion)
+ .append("newIStream", newIStream)
+ .append("ticket", ticket)
+ .toString();
+ }
+
+ /* **********************************************************
+ * Handles the actual persistence of nodes to the database
+ * **********************************************************
+ */
+
+
+ /** Create the CrNode, CrNodeVersion.
+ */
+ private void createCrNode(String relPath, String nodeTypeName, CrWorkspace workspace, CrNodeVersion parentNode) {
+
+ Date createdDate = new Date(System.currentTimeMillis());
+
+ // start the next version id at 1, which is used straight away by incrementNextVersionId()
+ node = new CrNode(relPath, nodeTypeName, createdDate, new Long(1), workspace, null);
+ nodeVersion = createCrNodeVersion(nodeTypeName, createdDate, node.incrementNextVersionId(), parentNode);
+
+ HashSet versions = new HashSet();
+ versions.add(nodeVersion);
+ node.setCrNodeVersions(versions);
+
+ }
+
+ /** Create a version part of a node.
+ */
+ protected CrNodeVersion createCrNodeVersion(String nodeTypeName,
+ Date createdDate, Long versionId, CrNodeVersion parentNode) {
+
+ nodeVersion = new CrNodeVersion();
+ nodeVersion.setCreatedDateTime(createdDate);
+ nodeVersion.setNode(node);
+ nodeVersion.setVersionId(versionId);
+ nodeVersion.setParentNodeVersion(parentNode);
+ // nvId is set automatically on save.
+ // ??nodeId is set automatically on save
+ return nodeVersion;
+
+ }
+
+
+ /** Validate that this node is in a state that may be saved.
+ * Rules:
+ *
+ * We expect that deleting the version node will delete all the properties.
+ */
+ private void deleteVersionFromDB( ArrayList nodeKeysDeleted ) {
+
+ Set childNodes = getChildNodes();
+ if ( childNodes != null ) {
+ // First delete the child nodes
+ Iterator iter = childNodes.iterator();
+ while (iter.hasNext()) {
+ SimpleVersionedNode element = (SimpleVersionedNode) iter.next();
+ element.deleteVersionFromDB( nodeKeysDeleted );
+ }
+ }
+
+ NodeKey nk = getNodeKey();
+
+ // remove the node version by removing it from the set - the
+ // cascade delete on the hibernate classes will take care of it.
+ Set versions = node.getCrNodeVersions();
+ if ( versions != null )
+ versions.remove(nodeVersion);
+ else
+ nodeDAO.delete(nodeVersion);
+
+ // if this was the last version for the node, delete the node
+ if ( versions == null || versions.size() == 0 )
+ nodeDAO.delete(node);
+
+ nodeKeysDeleted.add(nk);
+ }
+
+ /* **********************************************************
+ * Following methods are required for Spring framework to set up
+ * the DAO object(s) and to trigger a cleanup of the filestream
+ * if the object is destroyed.
+ * **********************************************************
+ */
+
+ /**
+ * @return Returns the nodeDAO.
+ */
+ public INodeDAO getNodeDAO() {
+ return nodeDAO;
+ }
+ /**
+ * @param nodeDAO The nodeDAO to set.
+ */
+ public void setNodeDAO(INodeDAO nodeDAO) {
+ this.nodeDAO = nodeDAO;
+ }
+
+ /**
+ * @return Returns the fileDAO.
+ */
+ public IFileDAO getFileDAO() {
+ return fileDAO;
+ }
+ /**
+ * @param fileDAO The fileDAO to set.
+ */
+ public void setFileDAO(IFileDAO fileDAO) {
+ this.fileDAO = fileDAO;
+ }
+
+ /**
+ * Clean up any resources that will not be cleaned up by the garbage
+ * collector after this object is destroyed. At present, all it does is
+ * close the filestream if needed
+ */
+ public void destroy() {
+ System.out.println("SimpleVersionedNode destroy called!");
+ try {
+ if ( newIStream != null ) {
+ newIStream.close();
+ }
+ } catch ( IOException e ) {
+ log.debug("Unable to close stream - was it already closed perhaps?",e);
+ }
+ }
+
+ /* **** Method for BeanFactoryAware interface *****************/
+ public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
+ this.beanFactory = beanFactory;
+ }
+
+
+}
+
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ValidationException.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ValidationException.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ValidationException.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,47 @@
+package org.lamsfoundation.lams.contentrepository;
+/**
+ * The node is invalid for some reason. The reason should be given in
+ * the exception message.
+ */
+public class ValidationException extends RepositoryCheckedException {
+ /**
+ * Constructs a new instance of this class.
+ */
+ public ValidationException() {
+ this("The node is invalid.");
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure cause.
+ *
+ * @param s description
+ */
+ public ValidationException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure and a root throwable.
+ *
+ * @param s description
+ * @param cause root throwable cause
+ */
+ public ValidationException(String s, Throwable cause) {
+ super(s,cause);
+
+ }
+
+ /**
+ * Constructs a new instance of this class given a root throwable.
+ *
+ * @param cause root failure cause
+ */
+ public ValidationException(Throwable cause) {
+ this("The node is invalid.", cause);
+ }
+
+
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ValueFormatException.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ValueFormatException.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ValueFormatException.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,46 @@
+package org.lamsfoundation.lams.contentrepository;
+/**
+ * Thrown when value is assigned to a propery of the wrong type, or some
+ * other formatting type problem.
+ */
+public class ValueFormatException extends RepositoryCheckedException {
+ /**
+ * Constructs a new instance of this class.
+ */
+ public ValueFormatException() {
+ this("Value assigned to wrong type or other formatting error.");
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure cause.
+ *
+ * @param s description
+ */
+ public ValueFormatException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure and a root throwable.
+ *
+ * @param s description
+ * @param cause root throwable cause
+ */
+ public ValueFormatException(String s, Throwable cause) {
+ super(s,cause);
+
+ }
+
+ /**
+ * Constructs a new instance of this class given a root throwable.
+ *
+ * @param cause root failure cause
+ */
+ public ValueFormatException(Throwable cause) {
+ this("Value assigned to wrong type or other formatting error.", cause);
+ }
+
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/WorkspaceNotFoundException.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/WorkspaceNotFoundException.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/WorkspaceNotFoundException.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,45 @@
+package org.lamsfoundation.lams.contentrepository;
+/**
+ * Requested workspace not found.
+ */
+public class WorkspaceNotFoundException extends RepositoryCheckedException {
+
+ /**
+ * Constructs a new instance of this class.
+ */
+ public WorkspaceNotFoundException() {
+ this("Requested workspace not found.");
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure cause.
+ *
+ * @param s description
+ */
+ public WorkspaceNotFoundException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure and a root throwable.
+ *
+ * @param s description
+ * @param cause root throwable cause
+ */
+ public WorkspaceNotFoundException(String s, Throwable cause) {
+ super(s,cause);
+
+ }
+
+ /**
+ * Constructs a new instance of this class given a root throwable.
+ *
+ * @param cause root failure cause
+ */
+ public WorkspaceNotFoundException(Throwable cause) {
+ this("Requested workspace not found.", cause);
+ }
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/contentRepositoryApplicationContext.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/Attic/contentRepositoryApplicationContext.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/contentRepositoryApplicationContext.xml 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,166 @@
+
+
+
+
+
+This content repository is designed to store single files and
+packages of files on disk in a relatively. It is not a full
+blown repository as you would find behind a web development
+package.
+
+Each entry in the repository is represented as a "node", which
+has a unique id or uuid. Each node belongs to a workspace, and
+there may be many versions to the node. The files are stored on disk
+and the information about the files is stored in the lams_cr_* tables
+in the database.
+
+A node may represent a single file (a FILENODE) or be a package node. A
+package node has a set of child nodes which are file nodes.
+ The repository keeps a set of properties for each node. At the moment,
+these are read only to tools. An additional parameter
+containing arbitrary nodes could easily be added to the repository
+calls and this would allow the repository to store arbitrary properties
+on behalf of tools.
+ The classes of interest to tools are as follows. Apart from SimpleCredentials, tools should use the interfaces
+and not the implemented classes to allow the implementation to be changed in the future.
+
+ Note: All interfaces with Admin in their name are only to be used within the repository and must not be used by tools.
+It is intended to make these protected interfaces if possible - they are used by Spring so this may be difficult.
+Sample usage of the repository can be seen in example webapp, built as lamscr.war. The struts classes
+are in org.lamsfoundation.lams.contentrepository.struts (in the src hierarchy)
+and the jsps are in the web hierarchy.
+ When a tool is installed, it should identify itself to the repository and create a new workspace Before accessing the repository, the tool will need to log in.
+Once the tool has been given a ticket, it must use the same repository
+object (ie a repository returned by the same context). If it gets a repository
+from a different context, the ticket will not be recognised and access denied.
+This is a shortcoming in the repository and needs to be fixed.
+ There is currently no timeout on a ticket (despite what the exception
+says) so the tool may keep it for months if it wants. But if the tool
+receives an access denied exception, then something has gone wrong and the
+ticket is no longer valid so the tool should log in again and get a new
+ticket. Using the ticket, the tool can now add, retrieve and delete nodes. Deleting a package
+node deletes all the files in the package. Warning: deleting
+removes the node completely - from both the database and the file system. When the tool is complete, it should logout from the repository. This
+invalidates the ticket. There are two sorts of exceptions - RepositoryCheckedException and
+RepositoryRuntimeException. RepositoryRuntimeException may be thrown
+by any call to the repository irrespective of whether it is defined
+in the signature. It is used for internal errors, not errors caused
+by bad input from a tool. The repository may also thrown other runtime
+errors, such as the Spring runtime errors which wrap Hibernate errors.
+ RepositoryCheckedException is the superclass to 10 detailed
+checked exceptions. Most calls throw more than one detailed exception.
+Calling code can catch either the detailed exceptions or just
+RepositoryCheckedException. All the calls on IRepository should be transactional, defined
+in the Spring context file. If any are not defined in the context file, then
+this is a bug and should be corrected!!!!!!!!!. All
+of the transactions should roll back on both the RepositoryCheckedException
+(as it is defined in the context file) and RepositoryRuntimeException
+as the Spring trasactions will roll back on any RuntimeException.
+However, all we can roll back are database changes. We cannot roll back
+file system changes. For this reason, we try to do the database changes
+first. But it isn't perfect. After configuring (see previous section) use the ANT Build script to build and deploy
+the content repository code.
+ An error occurred: "+errMsg+" "+e.getMessage()+" Path details: We have logged in. An error occurred: "+e.getMessage()+"
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+TestLogin()
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+ void
+doGet(javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
+
+
+
+
+
+ void
+doPost(javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+
+
+
+
+
+
+
+Methods inherited from class javax.servlet.http.HttpServlet
+
+
+
+service
+
+
+
+
+Methods inherited from class javax.servlet.GenericServlet
+
+
+
+destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
+
+
+
+
+Methods inherited from class java.lang.Object
+
+
+
+equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+Constructor Detail
+
+TestLogin
+
+public TestLogin()
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+doGet
+
+public void doGet(javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+ throws javax.servlet.ServletException,
+ java.io.IOException
+
+
+
+
+
+javax.servlet.ServletException
+java.io.IOException
+
+
+doPost
+
+public void doPost(javax.servlet.http.HttpServletRequest request,
+ javax.servlet.http.HttpServletResponse response)
+ throws javax.servlet.ServletException,
+ java.io.IOException
+
+
+
+
+
+
+javax.servlet.ServletException
+java.io.IOException
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-frame.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-frame.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-frame.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-summary.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-summary.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-summary.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+Classes
+
+
+
+AddFileContentAction
+
+Download
+
+LoginRepositoryAction
+
+NodeSelectionAction
+
+RepositoryDispatchAction
+
+TestLogin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV PACKAGE
+ NEXT PACKAGE
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Package org.lamsfoundation.lams.contentrepository.struts.action
+
+
+
+
+
+
+
+
+
+Class Summary
+
+
+AddFileContentAction
+MyEclipse Struts
+ Creation date: 11-30-2004
+
+ XDoclet definition:
+
+
+Download
+This servlet must load on startup as it contains the link
+ to the repository required for the other servlets.
+
+
+LoginRepositoryAction
+MyEclipse Struts
+ Creation date: 01-13-2005
+
+ The exceptions will be handled by struts but are listed explicitly
+ here so (1) I can log them and (2) you can see what exceptions are thrown.
+
+
+NodeSelectionAction
+MyEclipse Struts
+ Creation date: 01-13-2005
+
+ The exceptions will be handled by struts but are listed explicitly
+ here so (1) I can log them and (2) you can see what exceptions are thrown.
+
+
+RepositoryDispatchAction
+Base class for the dispatch actions used in the repository tests.
+
+
+TestLogin
+This standalone servlet is for performance testing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV PACKAGE
+ NEXT PACKAGE
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-tree.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-tree.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-tree.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Hierarchy For Package org.lamsfoundation.lams.contentrepository.struts.action
+
+
+
+
+
+Class Hierarchy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-use.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-use.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/package-use.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Package
+
org.lamsfoundation.lams.contentrepository.struts.action
+
+
+
+
+
+Packages that use org.lamsfoundation.lams.contentrepository.struts.action
+
+
+org.lamsfoundation.lams.contentrepository.struts.action
+
+
+
+
+
+
+
+Classes in org.lamsfoundation.lams.contentrepository.struts.action used by org.lamsfoundation.lams.contentrepository.struts.action
+
+
+RepositoryDispatchAction
+
+
+
+ Base class for the dispatch actions used in the repository tests.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/AddFileContentAction.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/AddFileContentAction.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/AddFileContentAction.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.action.AddFileContentAction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/Download.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/Download.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/Download.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.action.Download
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/LoginRepositoryAction.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/LoginRepositoryAction.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/LoginRepositoryAction.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.action.LoginRepositoryAction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/NodeSelectionAction.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/NodeSelectionAction.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/NodeSelectionAction.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.action.NodeSelectionAction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/RepositoryDispatchAction.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/RepositoryDispatchAction.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/RepositoryDispatchAction.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.action.RepositoryDispatchAction
+
+
+
+
+
+Packages that use RepositoryDispatchAction
+
+
+org.lamsfoundation.lams.contentrepository.struts.action
+
+
+
+
+
+
+
+Uses of RepositoryDispatchAction in org.lamsfoundation.lams.contentrepository.struts.action
+
+
+
+
+
+Subclasses of RepositoryDispatchAction in org.lamsfoundation.lams.contentrepository.struts.action
+
+
+
+
+ class
+AddFileContentAction
+
+
+ MyEclipse Struts
+ Creation date: 11-30-2004
+
+ XDoclet definition:
+
+
+
+ class
+LoginRepositoryAction
+
+
+ MyEclipse Struts
+ Creation date: 01-13-2005
+
+ The exceptions will be handled by struts but are listed explicitly
+ here so (1) I can log them and (2) you can see what exceptions are thrown.
+
+
+
+ class
+NodeSelectionAction
+
+
+ MyEclipse Struts
+ Creation date: 01-13-2005
+
+ The exceptions will be handled by struts but are listed explicitly
+ here so (1) I can log them and (2) you can see what exceptions are thrown.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/TestLogin.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/TestLogin.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/action/class-use/TestLogin.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.action.TestLogin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/AddFileContentForm.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/AddFileContentForm.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/AddFileContentForm.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,540 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
+org.lamsfoundation.lams.contentrepository.struts.form
+
+
+Class AddFileContentForm
+java.lang.Object
+
+org.apache.struts.action.ActionForm
+
org.lamsfoundation.lams.contentrepository.struts.form.AddFileContentForm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+AddFileContentForm()
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+ java.lang.String
+getDescription()
+
+
+
+
+
+
+ java.lang.String
+getDirName()
+
+
+
+
+
+
+ java.lang.String
+getEntryString()
+
+
+
+
+
+
+ java.lang.String
+getMethod()
+
+
+
+
+
+
+ org.apache.struts.upload.FormFile
+getTheFile()
+
+
+ Returns the theFile.
+
+
+
+ java.lang.Long
+getUuid()
+
+
+
+
+
+
+ void
+reset(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+ Method reset
+
+
+
+ void
+setDescription(java.lang.String description)
+
+
+
+
+
+
+ void
+setDirName(java.lang.String dirName)
+
+
+
+
+
+
+ void
+setEntryString(java.lang.String entryString)
+
+
+
+
+
+
+ void
+setMethod(java.lang.String method)
+
+
+
+
+
+
+ void
+setTheFile(org.apache.struts.upload.FormFile theFile)
+
+
+ Set the theFile.
+
+
+
+ void
+setUuid(java.lang.Long uuid)
+
+
+
+
+
+
+ org.apache.struts.action.ActionErrors
+validate(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+ Method validate
+
+
+
+
+Methods inherited from class org.apache.struts.action.ActionForm
+
+
+
+getMultipartRequestHandler, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
+
+
+
+
+Methods inherited from class java.lang.Object
+
+
+
+equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+Constructor Detail
+
+AddFileContentForm
+
+public AddFileContentForm()
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+validate
+
+public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+
+
+mapping
- request
-
+
+
+
+reset
+
+public void reset(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+
+
+mapping
- request
-
+
+
+getTheFile
+
+public org.apache.struts.upload.FormFile getTheFile()
+
+
+
+
+
+
+
+
+setTheFile
+
+public void setTheFile(org.apache.struts.upload.FormFile theFile)
+
+
+
+
+theFile
- The theFile to set
+
+
+getDirName
+
+public java.lang.String getDirName()
+
+
+
+
+
+
+
+
+setDirName
+
+public void setDirName(java.lang.String dirName)
+
+
+
+
+dirName
- Sets dirName
+
+
+getUuid
+
+public java.lang.Long getUuid()
+
+
+
+
+
+
+
+
+setUuid
+
+public void setUuid(java.lang.Long uuid)
+
+
+
+
+uuid
- The uuid to set.
+
+
+getEntryString
+
+public java.lang.String getEntryString()
+
+
+
+
+
+
+
+
+setEntryString
+
+public void setEntryString(java.lang.String entryString)
+
+
+
+
+entryString
- The entryString to set.
+
+
+getMethod
+
+public java.lang.String getMethod()
+
+
+
+
+
+
+
+
+setMethod
+
+public void setMethod(java.lang.String method)
+
+
+
+
+method
- The method to set.
+
+
+getDescription
+
+public java.lang.String getDescription()
+
+
+
+
+
+
+
+
+setDescription
+
+public void setDescription(java.lang.String description)
+
+
+
+
+
+description
- The description to set.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/LoginRepositoryForm.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/LoginRepositoryForm.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/LoginRepositoryForm.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,431 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
+org.lamsfoundation.lams.contentrepository.struts.form
+
+
+Class LoginRepositoryForm
+java.lang.Object
+
+org.apache.struts.action.ActionForm
+
org.lamsfoundation.lams.contentrepository.struts.form.LoginRepositoryForm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+LoginRepositoryForm()
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+ java.lang.String
+getIndentificationString()
+
+
+ Returns the indentificationString.
+
+
+
+ java.lang.String
+getToolName()
+
+
+ Returns the toolName.
+
+
+
+ java.lang.String
+getWorkspaceName()
+
+
+ Returns the workspaceName.
+
+
+
+ void
+reset(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+ Method reset
+
+
+
+ void
+setIndentificationString(java.lang.String indentificationString)
+
+
+ Set the indentificationString.
+
+
+
+ void
+setToolName(java.lang.String toolName)
+
+
+ Set the toolName.
+
+
+
+ void
+setWorkspaceName(java.lang.String workspaceName)
+
+
+ Set the workspaceName.
+
+
+
+ org.apache.struts.action.ActionErrors
+validate(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+ Method validate
+
+
+
+
+Methods inherited from class org.apache.struts.action.ActionForm
+
+
+
+getMultipartRequestHandler, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
+
+
+
+
+Methods inherited from class java.lang.Object
+
+
+
+equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+Constructor Detail
+
+LoginRepositoryForm
+
+public LoginRepositoryForm()
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+validate
+
+public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+
+
+mapping
- request
-
+
+
+
+reset
+
+public void reset(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+
+
+mapping
- request
-
+
+
+getToolName
+
+public java.lang.String getToolName()
+
+
+
+
+
+
+
+
+setToolName
+
+public void setToolName(java.lang.String toolName)
+
+
+
+
+toolName
- The toolName to set
+
+
+getWorkspaceName
+
+public java.lang.String getWorkspaceName()
+
+
+
+
+
+
+
+
+setWorkspaceName
+
+public void setWorkspaceName(java.lang.String workspaceName)
+
+
+
+
+workspaceName
- The workspaceName to set
+
+
+getIndentificationString
+
+public java.lang.String getIndentificationString()
+
+
+
+
+
+
+
+
+setIndentificationString
+
+public void setIndentificationString(java.lang.String indentificationString)
+
+
+
+
+
+indentificationString
- The indentificationString to set
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/NodeSelectionForm.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/NodeSelectionForm.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/NodeSelectionForm.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,340 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
+org.lamsfoundation.lams.contentrepository.struts.form
+
+
+Class NodeSelectionForm
+java.lang.Object
+
+org.apache.struts.action.ActionForm
+
org.lamsfoundation.lams.contentrepository.struts.form.NodeSelectionForm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Constructor Summary
+
+
+
+NodeSelectionForm()
+
+
+
+
+
+
+
+
+Method Summary
+
+
+
+
+ java.util.Map
+getNodeMap()
+
+
+
+
+
+
+ void
+reset(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+ Method reset
+
+
+
+ void
+setNodeMap(java.util.Map nodeMap)
+
+
+
+
+
+
+ org.apache.struts.action.ActionErrors
+validate(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+ Method validate
+
+
+
+
+Methods inherited from class org.apache.struts.action.ActionForm
+
+
+
+getMultipartRequestHandler, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
+
+
+
+
+Methods inherited from class java.lang.Object
+
+
+
+equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+
+
+
+
+
+Constructor Detail
+
+NodeSelectionForm
+
+public NodeSelectionForm()
+
+
+
+
+
+
+
+
+
+
+
+
+Method Detail
+
+validate
+
+public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+
+
+mapping
- request
-
+
+
+
+reset
+
+public void reset(org.apache.struts.action.ActionMapping mapping,
+ javax.servlet.http.HttpServletRequest request)
+
+
+
+
+mapping
- request
-
+
+
+getNodeMap
+
+public java.util.Map getNodeMap()
+
+
+
+
+
+
+
+
+setNodeMap
+
+public void setNodeMap(java.util.Map nodeMap)
+
+
+
+
+
+nodeMap
- The nodeMap to set.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV CLASS
+ NEXT CLASS
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD
+
+DETAIL: FIELD | CONSTR | METHOD
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-frame.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-frame.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-frame.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-summary.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-summary.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-summary.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+Classes
+
+
+
+AddFileContentForm
+
+LoginRepositoryForm
+
+NodeSelectionForm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV PACKAGE
+ NEXT PACKAGE
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Package org.lamsfoundation.lams.contentrepository.struts.form
+
+
+
+
+
+
+
+
+
+Class Summary
+
+
+AddFileContentForm
+MyEclipse Struts
+ Creation date: 11-30-2004
+
+ XDoclet definition:
+
+
+LoginRepositoryForm
+MyEclipse Struts
+ Creation date: 01-13-2005
+
+ XDoclet definition:
+
+
+NodeSelectionForm
+Didn't want to create this class, but I keep getting "Cannot retrieve definition for form bean null"
+ exception so it was just easier to write it and ignore it...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV PACKAGE
+ NEXT PACKAGE
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-tree.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-tree.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-tree.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Hierarchy For Package org.lamsfoundation.lams.contentrepository.struts.form
+
+
+
+
+
+Class Hierarchy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-use.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-use.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/package-use.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Package
+
org.lamsfoundation.lams.contentrepository.struts.form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/AddFileContentForm.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/AddFileContentForm.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/AddFileContentForm.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.form.AddFileContentForm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/LoginRepositoryForm.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/LoginRepositoryForm.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/LoginRepositoryForm.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.form.LoginRepositoryForm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/NodeSelectionForm.html
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/NodeSelectionForm.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/doc/org/lamsfoundation/lams/contentrepository/struts/form/class-use/NodeSelectionForm.html 28 Jan 2005 02:24:40 -0000 1.1
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+Uses of Class
+
org.lamsfoundation.lams.contentrepository.struts.form.NodeSelectionForm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+ Package
+ Class
+ Use
+ Tree
+ Deprecated
+ Index
+ Help
+
+
+
+
+
+
+ PREV
+ NEXT
+
+ FRAMES
+ NO FRAMES
+
+
+
+
+
+
+
+
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/AccessDeniedException.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/AccessDeniedException.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/AccessDeniedException.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,45 @@
+package org.lamsfoundation.lams.contentrepository;
+/**
+ * The current ticket doesn't have sufficient rights for the requested action.
+ */
+public class AccessDeniedException extends RepositoryCheckedException {
+ /**
+ * Constructs a new instance of this class.
+ */
+ public AccessDeniedException() {
+ this("The current ticket doesn't have sufficient rights for the requested action.");
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure cause.
+ *
+ * @param s description
+ */
+ public AccessDeniedException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure and a root throwable.
+ *
+ * @param s description
+ * @param cause root throwable cause
+ */
+ public AccessDeniedException(String s, Throwable cause) {
+ super(s,cause);
+
+ }
+
+ /**
+ * Constructs a new instance of this class given a root throwable.
+ *
+ * @param cause root failure cause
+ */
+ public AccessDeniedException(Throwable cause) {
+ this("The current ticket doesn't have sufficient rights for the requested action.", cause);
+ }
+
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CheckCredentialTicketBeforeAdvice.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CheckCredentialTicketBeforeAdvice.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CheckCredentialTicketBeforeAdvice.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,63 @@
+/*
+ * Created on Jan 21, 2005
+ */
+package org.lamsfoundation.lams.contentrepository;
+
+import java.lang.reflect.Method;
+
+import org.apache.log4j.Logger;
+import org.springframework.aop.MethodBeforeAdvice;
+
+/**
+ * Ticket checking functionality for implementers of IRepositoryAdmin.
+ *
+ * All calls to IRepositoryAdmin must have either ICredential or ITicket as
+ * their first parameter. In any case, the parameter must not be null.
+ *
+ * If the first argument is missing then it throws an AccessDeniedException
+ *
+ * @author Fiona Malikoff
+ */
+public class CheckCredentialTicketBeforeAdvice implements MethodBeforeAdvice {
+
+ protected Logger log = Logger.getLogger(CheckCredentialTicketBeforeAdvice.class);
+
+ /** @throws AccessDeniedException if the first parameter is null or it is an unrecognised ticket.
+ * @throws RuntimeRepositoryException if the method has as its first parameter an object that is not
+ * an ICredential or an ITicket
+ */
+ public void before(Method m, Object[] args, Object target)
+ throws AccessDeniedException, RepositoryRuntimeException {
+ // assume that the first argument is the ticket or credential
+
+ if ( log.isDebugEnabled() ) {
+ log.debug("Method "+m.getName()+" Checking credential/ticket "+args[0]);
+ }
+
+ if ( args[0] == null ) {
+
+ throw new AccessDeniedException("No ticket/credential supplied. Access to repository denied.");
+
+ } else {
+
+ if ( ITicket.class.isInstance(args[0]) ) {
+
+ IRepositoryAdmin repository = (IRepositoryAdmin) target;
+ if ( ! repository.isTicketOkay((ITicket) args[0]) ) {
+ log.error("Supplied ticket not recognised. It may have timed out. Please log in again.");
+ throw new AccessDeniedException("Supplied ticket not recognised. It may have timed out. Please log in again.");
+ }
+
+ } else if ( ! ICredentials.class.isInstance(args[0]) ) {
+
+ String error = "Method has wrong signature. Method "+m.getName()+" has CheckCredentialTicketBeforeAdvice applied to it, but the first argument is a "
+ +args[0].getClass().getName()+". It must be either a ICredential or a ITicket";
+ log.error(error);
+ throw new RepositoryRuntimeException(error);
+
+ }
+ }
+ }
+
+}
+
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrCredential.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrCredential.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrCredential.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,132 @@
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.Serializable;
+import java.util.Set;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+/**
+ * @hibernate.class
+ * table="lams_cr_credential"
+ *
+*/
+public class CrCredential implements Serializable {
+
+ /** identifier field */
+ private Long credentialId;
+
+ /** persistent field */
+ private String name;
+
+ /** persistent field */
+ private String password;
+
+ /** persistent field */
+ private Set crWorkspaceCredentials;
+
+ /** full constructor */
+ public CrCredential(String name, String password, Set crWorkspaceCredentials) {
+ this.name = name;
+ this.password = password;
+ this.crWorkspaceCredentials = crWorkspaceCredentials;
+ }
+
+ /** default constructor */
+ public CrCredential() {
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="identity"
+ * type="java.lang.Long"
+ * column="credential_id"
+ * unsaved-value="0"
+ *
+ */
+ public Long getCredentialId() {
+ return this.credentialId;
+ }
+
+ public void setCredentialId(Long credentialId) {
+ this.credentialId = credentialId;
+ }
+
+ /**
+ * @hibernate.property
+ * column="name"
+ * unique="true"
+ * length="255"
+ * not-null="true"
+ *
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @hibernate.property
+ * column="password"
+ * length="255"
+ * not-null="true"
+ *
+ */
+ public String getPassword() {
+ return this.password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * inverse="true"
+ * cascade="none"
+ * @hibernate.collection-key
+ * column="credential_id"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.contentrepository.CrWorkspaceCredential"
+ *
+ */
+ public Set getCrWorkspaceCredentials() {
+ return this.crWorkspaceCredentials;
+ }
+
+ public void setCrWorkspaceCredentials(Set crWorkspaceCredentials) {
+ this.crWorkspaceCredentials = crWorkspaceCredentials;
+ }
+
+ public String toString() {
+ return new ToStringBuilder(this)
+ .append("credentialId", getCredentialId())
+ .append("name", getName())
+ .toString();
+ }
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( !(other instanceof CrCredential) ) return false;
+ CrCredential castOther = (CrCredential) other;
+ return new EqualsBuilder()
+ .append(this.getCredentialId(), castOther.getCredentialId())
+ .append(this.getName(), castOther.getName())
+ .append(this.getPassword(), castOther.getPassword())
+ .isEquals();
+ }
+
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .append(getCredentialId())
+ .append(getName())
+ .append(getPassword())
+ .toHashCode();
+ }
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNode.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNode.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNode.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,325 @@
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+/**
+ * @hibernate.class
+ * table="lams_cr_node"
+ *
+*/
+public class CrNode implements Serializable {
+
+ /** identifier field */
+ private Long nodeId;
+
+ /** nullable persistent field */
+ private String path;
+
+ /** persistent field */
+ private String type;
+
+ /** nullable persistent field */
+ private Date createdDateTime;
+
+ /** persistent field */
+ private Long nextVersionId;
+
+ /** persistent field */
+ private org.lamsfoundation.lams.contentrepository.CrWorkspace crWorkspace;
+
+ /** persistent field */
+ private Set crNodeVersions;
+
+ /** transitory field.
+ * don't create the versionHistory till requested, but
+ * keep it just in case the caller asks for it again.
+ */
+ private SortedSet versionHistory = null;
+
+ /** full constructor */
+ public CrNode(String path, String type, Date createdDateTime, Long nextVersionId, org.lamsfoundation.lams.contentrepository.CrWorkspace crWorkspace, Set crNodeVersions) {
+ this.path = path;
+ this.type = type;
+ this.createdDateTime = createdDateTime;
+ this.nextVersionId = nextVersionId;
+ this.crWorkspace = crWorkspace;
+ this.crNodeVersions = crNodeVersions;
+ }
+
+ /** default constructor */
+ public CrNode() {
+ }
+
+ /** minimal constructor */
+ public CrNode(String type, Long nextVersionId, org.lamsfoundation.lams.contentrepository.CrWorkspace crWorkspace, Set crNodeVersions) {
+ this.type = type;
+ this.nextVersionId = nextVersionId;
+ this.crWorkspace = crWorkspace;
+ this.crNodeVersions = crNodeVersions;
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="identity"
+ * type="java.lang.Long"
+ * column="node_id"
+ * unsaved-value="0"
+ *
+ */
+ public Long getNodeId() {
+ return this.nodeId;
+ }
+
+ public void setNodeId(Long nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ /**
+ * @hibernate.property
+ * column="path"
+ * length="255"
+ *
+ */
+ public String getPath() {
+ return this.path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ /**
+ * @hibernate.property
+ * column="type"
+ * length="255"
+ * not-null="true"
+ *
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * @hibernate.property
+ * column="created_date_time"
+ * length="14"
+ *
+ */
+ public Date getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ public void setCreatedDateTime(Date createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ }
+
+ /**
+ * @hibernate.property
+ * type="java.lang.Long"
+ * column="next_version_id"
+ *
+ */
+ public Long getNextVersionId() {
+ return this.nextVersionId;
+ }
+
+ public void setNextVersionId(Long nextVersionId) {
+ this.nextVersionId = nextVersionId;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="workspace_id"
+ *
+ */
+ public org.lamsfoundation.lams.contentrepository.CrWorkspace getCrWorkspace() {
+ return this.crWorkspace;
+ }
+
+ public void setCrWorkspace(org.lamsfoundation.lams.contentrepository.CrWorkspace crWorkspace) {
+ this.crWorkspace = crWorkspace;
+ }
+
+ /**
+ * @hibernate.set
+ * lazy="false"
+ * inverse="true"
+ * cascade="all-delete-orphan"
+ * @hibernate.collection-key
+ * column="node_id"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.contentrepository.CrNodeVersion"
+ *
+ */
+ public Set getCrNodeVersions() {
+ return this.crNodeVersions;
+ }
+
+ public void setCrNodeVersions(Set crNodeVersions) {
+ this.crNodeVersions = crNodeVersions;
+ }
+
+ public String toString() {
+ return new ToStringBuilder(this)
+ .append("nodeId", getNodeId())
+ .append("path", getPath())
+ .append("type", getType())
+ .append("createdDateTime", getCreatedDateTime())
+ .toString();
+ }
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( !(other instanceof CrNode) ) return false;
+ CrNode castOther = (CrNode) other;
+ return new EqualsBuilder()
+ .append(this.getNodeId(), castOther.getNodeId())
+ .append(this.getPath(), castOther.getPath())
+ .append(this.getType(), castOther.getType())
+ .append(this.getCreatedDateTime(), castOther.getCreatedDateTime())
+ .append(this.getCrWorkspace(), castOther.getCrWorkspace())
+ .isEquals();
+ }
+
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .append(getNodeId())
+ .append(getPath())
+ .append(getType())
+ .append(getCreatedDateTime())
+ .append(getCrWorkspace())
+ .toHashCode();
+ }
+
+ /* ********* Manually added methods ****/
+ /** Get the next version id for this node and then
+ * increment it. All other ids come out of the database
+ * but for the version we need the next id within a
+ * uuid, and the db can't help us there.
+ */
+ public synchronized Long incrementNextVersionId() {
+ Long retValue = nextVersionId;
+ nextVersionId = new Long(nextVersionId.longValue() + 1);
+ return retValue;
+ }
+
+ /**
+ * Get the history for this node. Quite intensive operation the
+ * first time it is run on a node as it has to build all the
+ * data structures.
+ * @return SortedSet of IVersionDetail objects, ordered by version
+ */
+ public SortedSet getVersionHistory() {
+
+ if ( versionHistory == null ) {
+
+ SortedSet history = new TreeSet();
+
+ Set versions = getCrNodeVersions();
+ if ( versions != null ) {
+ Iterator iter = versions.iterator();
+ while (iter.hasNext()) {
+ CrNodeVersion element = (CrNodeVersion) iter.next();
+ String desc = element.getVersionDescription();
+ history.add( new SimpleVersionDetail(
+ element.getVersionId(),
+ element.getCreatedDateTime(),
+ desc ));
+ }
+ }
+ versionHistory = history;
+ }
+
+ return versionHistory;
+ }
+
+ /**
+ * Indicates whether this node is of the specified node type.
+ * @param nodeTypeName the name of a node type.
+ * @return true if this node is of the specified node type
+ * or a subtype of the specified node type; returns false otherwise.
+ */
+ public boolean isNodeType(String nodeTypeName) {
+ return nodeTypeName != null && nodeTypeName.equals(getType());
+ }
+
+ /** Get a particular version of this node
+ */
+ public CrNodeVersion getNodeVersion(Long versionId)
+ {
+
+ CrNodeVersion nodeVersion = null;
+ Set nodeVersionSet = getCrNodeVersions();
+ if ( nodeVersionSet != null ) {
+ Iterator iter = nodeVersionSet.iterator();
+ if ( versionId != null ) {
+ nodeVersion = findParticularVersion(iter, versionId);
+ } else {
+ nodeVersion = findLatestVersion(iter);
+ }
+ }
+ return nodeVersion;
+ }
+
+ /* Assumes that verionId will never be null - otherwise findLatestVersion
+ * would have been called.
+ */
+ private CrNodeVersion findParticularVersion(Iterator nodeVersionSetIterator, Long versionId ) {
+ // find version, throw exception if not found.
+ CrNodeVersion found = null;
+ while (nodeVersionSetIterator.hasNext()) {
+ CrNodeVersion element = (CrNodeVersion) nodeVersionSetIterator.next();
+ if ( versionId.equals(element.getVersionId()) ) {
+ found = element;
+ break;
+ }
+ }
+ return found;
+ }
+
+ /* Find the latest version of a node. Tries to find the node
+ * with the highest version number. If it finds a node with
+ * no version number, that will only be selected if there
+ * are no other versions.
+ */
+ private CrNodeVersion findLatestVersion(Iterator nodeVersionSetIterator ) {
+ // find lastest version, throw exception if not found.
+ CrNodeVersion found = null;
+ while (nodeVersionSetIterator.hasNext()) {
+ CrNodeVersion element = (CrNodeVersion) nodeVersionSetIterator.next();
+ if ( found == null || ( found.getVersionId() != null &&
+ found.getVersionId().compareTo(element.getVersionId()) < 0 ))
+ found = element;
+ }
+ return found;
+ }
+
+ /** Get a list of all the versions - just the Long value. */
+ public Long[] getVersionIds() {
+ Set allCrNodeVersions = getCrNodeVersions();
+ Long[] versions = new Long[allCrNodeVersions!=null?allCrNodeVersions.size():0];
+ Iterator iter = allCrNodeVersions.iterator();
+ int i=0;
+ while (iter.hasNext()) {
+ CrNodeVersion element = (CrNodeVersion) iter.next();
+ versions[i] = element.getVersionId();
+ }
+ return versions;
+ }
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNodeVersion.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNodeVersion.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNodeVersion.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,421 @@
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+/**
+ * @hibernate.class
+ * table="lams_cr_node_version"
+ *
+*/
+public class CrNodeVersion implements Serializable {
+
+ /** identifier field */
+ private Long nvId;
+
+ /** persistent field. Should never be null, but make it a Long
+ * (rather than long), so that we don't have to keep converting
+ * it to Long to match UUID. */
+ private Long versionId;
+
+ /** nullable persistent field */
+ private Date createdDateTime;
+
+ /** persistent field */
+ private org.lamsfoundation.lams.contentrepository.CrNode node;
+
+ /** persistent field */
+ private org.lamsfoundation.lams.contentrepository.CrNodeVersion parentNodeVersion;
+
+ /** persistent field */
+ private Set childNodeVersions;
+
+ /** persistent field */
+ private Set crNodeVersionProperties;
+
+ /** full constructor */
+ public CrNodeVersion(Long versionId, Date createdDateTime, org.lamsfoundation.lams.contentrepository.CrNode node, org.lamsfoundation.lams.contentrepository.CrNodeVersion parentNodeVersion, Set crNodeVersionProperties, Set childNodeVersions) {
+ this.versionId = versionId;
+ this.createdDateTime = createdDateTime;
+ this.node = node;
+ this.parentNodeVersion = parentNodeVersion;
+ this.crNodeVersionProperties = crNodeVersionProperties;
+ this.childNodeVersions = childNodeVersions;
+ }
+
+ /** default constructor */
+ public CrNodeVersion() {
+ }
+
+ /** minimal constructor */
+ public CrNodeVersion(Long versionId, org.lamsfoundation.lams.contentrepository.CrNode node, org.lamsfoundation.lams.contentrepository.CrNodeVersion parentNodeVersion, Set crNodeVersionProperties, Set childNodeVersions) {
+ this.versionId = versionId;
+ this.node = node;
+ this.parentNodeVersion = parentNodeVersion;
+ this.crNodeVersionProperties = crNodeVersionProperties;
+ this.childNodeVersions = childNodeVersions;
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="identity"
+ * type="java.lang.Long"
+ * column="nv_id"
+ * unsaved-value="0"
+ *
+ */
+ public Long getNvId() {
+ return this.nvId;
+ }
+
+ public void setNvId(Long nvId) {
+ this.nvId = nvId;
+ }
+
+ /**
+ * @hibernate.property
+ * column="version_id"
+ * length="20"
+ * not-null="true"
+ *
+ */
+ public Long getVersionId() {
+ return this.versionId;
+ }
+
+ public void setVersionId(Long versionId) {
+ this.versionId = versionId;
+ }
+
+ /**
+ * @hibernate.property
+ * column="created_date_time"
+ * length="14"
+ *
+ */
+ public Date getCreatedDateTime() {
+ return this.createdDateTime;
+ }
+
+ public void setCreatedDateTime(Date createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="node_id"
+ *
+ */
+ public org.lamsfoundation.lams.contentrepository.CrNode getNode() {
+ return this.node;
+ }
+
+ public void setNode(org.lamsfoundation.lams.contentrepository.CrNode node) {
+ this.node = node;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="parent_nv_id"
+ *
+ */
+ public org.lamsfoundation.lams.contentrepository.CrNodeVersion getParentNodeVersion() {
+ return this.parentNodeVersion;
+ }
+
+ public void setParentNodeVersion(org.lamsfoundation.lams.contentrepository.CrNodeVersion parentNodeVersion) {
+ this.parentNodeVersion = parentNodeVersion;
+ }
+
+ /**
+ * @hibernate.set
+ * lazy="false"
+ * inverse="true"
+ * cascade="all-delete-orphan"
+ * @hibernate.collection-key
+ * column="nv_id"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.contentrepository.CrNodeVersionProperty"
+ *
+ */
+ public Set getCrNodeVersionProperties() {
+ return this.crNodeVersionProperties;
+ }
+
+ public void setCrNodeVersionProperties(Set crNodeVersionProperties) {
+ this.crNodeVersionProperties = crNodeVersionProperties;
+ }
+
+ /**
+ * Gets the set of child nodes. Do not use this method if you can use
+ * addChildNodeVersion(), removeChildNodeVersion() or
+ * getChildNodeVersion() instead.
+ *
+ * @hibernate.set
+ * lazy="false"
+ * inverse="true"
+ * cascade="all-delete-orphan"
+ * @hibernate.collection-key
+ * column="parent_nv_id "
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.contentrepository.CrNodeVersion"
+ *
+ */
+ public Set getChildNodeVersions() {
+ return this.childNodeVersions;
+ }
+
+ /**
+ * Assigns a new set of child nodes. Do not use this method if
+ * you can use addChildNodeVersion(), removeChildNodeVersion() or
+ * getChildNodeVersion() instead.
+ */
+ public void setChildNodeVersions(Set childNodeVersions) {
+ this.childNodeVersions = childNodeVersions;
+ }
+
+ /** Add a child node to the childNodeVersions collection.
+ * Use this method rather than calling getChildNodeVersions()
+ * and adding to the set. See also removeChildNodeVersion()
+ * and getChildNodeVersion();
+ *
+ * @param childNode
+ */
+ public void addChildNodeVersion(CrNodeVersion childNode) {
+ Set set = getChildNodeVersions();
+
+ if ( set == null ) {
+ set = new HashSet();
+ setChildNodeVersions(set);
+ }
+
+ getChildNodeVersions().add(childNode);
+ }
+
+ /** Remove a child node to the childNodeVersions collection.
+ * Use this method rather than calling getChildNodeVersions()
+ * and iterating through the set. See also addChildNodeVersion()
+ * and getChildNodeVersion();
+ *
+ * Uses equals method defined in this class.
+ *
+ * Not tested!!!!
+ *
+ * @param childNode
+ */
+ public void removeChildNodeVersion(CrNodeVersion childNode) {
+ Set set = getChildNodeVersions();
+
+ if ( set != null ) {
+ Iterator iter = set.iterator();
+ boolean removed = false;
+ while ( iter.hasNext() && ! removed ) {
+ CrNodeVersion element = (CrNodeVersion) iter.next();
+ if ( element.equals(childNode) ) {
+ iter.remove();
+ }
+ }
+ }
+ }
+
+ /** Remove a child node to the childNodeVersions collection.
+ * Use this method rather than calling getChildNodeVersions()
+ * and iterating through the set. See also addChildNodeVersion()
+ * and removeChildNodeVersion();
+ *
+ * @param relPath of child
+ */
+ public CrNodeVersion getChildNodeVersion(String relPath) {
+
+ if ( getChildNodeVersions() == null )
+ return null;
+
+ CrNodeVersion childNode = null;
+ Iterator iter = getChildNodeVersions().iterator();
+ while (iter.hasNext() && childNode == null) {
+ CrNodeVersion element = (CrNodeVersion) iter.next();
+ String path = element.getNode().getPath();
+ if ( ( relPath == null && path == null ) ||
+ ( relPath != null && relPath.equals(path)) ) {
+ childNode = element;
+ }
+ }
+ return childNode;
+ }
+
+ public String toString() {
+ return new ToStringBuilder(this)
+ .append("nvId", getNvId())
+ .append("versionId", getVersionId())
+ .append("createdDateTime", getCreatedDateTime())
+ .toString();
+ }
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( !(other instanceof CrNodeVersion) ) return false;
+ CrNodeVersion castOther = (CrNodeVersion) other;
+ return new EqualsBuilder()
+ .append(this.getNvId(), castOther.getNvId())
+ .append(this.getVersionId(), castOther.getVersionId())
+ .append(this.getCreatedDateTime(), castOther.getCreatedDateTime())
+ .append(this.getNode(), castOther.getNode())
+ .append(this.getParentNodeVersion(), castOther.getParentNodeVersion())
+ .isEquals();
+ }
+
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .append(getNvId())
+ .append(getVersionId())
+ .append(getCreatedDateTime())
+ .append(getNode())
+ .append(getParentNodeVersion())
+ .toHashCode();
+ }
+
+ /* ** Added code - not generated by hbm ****/
+ /** Get a property value */
+ public CrNodeVersionProperty getProperty(String name) {
+
+ if ( name == null ) {
+ return null;
+ }
+
+ Set properties = this.getCrNodeVersionProperties();
+ if ( properties != null ) {
+ Iterator iter = properties.iterator();
+ while (iter.hasNext()) {
+ CrNodeVersionProperty element = (CrNodeVersionProperty) iter.next();
+ if ( name.equals(element.getName()) ) {
+ return element;
+ }
+ }
+ }
+ return null;
+ }
+
+ /** Remove a property.
+ *
+ * Removes it from the collection, and as the collection
+ * is cascade="all-delete-orphan", the property should be
+ * removed from the db automatically.
+ */
+ private void removeProperty(String name) {
+
+ if ( name != null ) {
+ Set properties = this.getCrNodeVersionProperties();
+ CrNodeVersionProperty prop;
+ if ( properties != null ) {
+ Iterator iter = properties.iterator();
+ while (iter.hasNext()) {
+ CrNodeVersionProperty element = (CrNodeVersionProperty) iter.next();
+ if ( name.equals(element.getName()) ) {
+ iter.remove();
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ private CrNodeVersionProperty createProperty(String name, Object value, int valueType) {
+ CrNodeVersionProperty property = new CrNodeVersionProperty();
+ property.setCrNodeVersion(this);
+ property.setName(name);
+ property.setValue(value.toString());
+ property.setType(valueType);
+ return property;
+ }
+
+ /** Set a property value. Removes the property if the value is null
+ * @throws RepositoryRuntimeException if name is null
+ * @return CrNodeVersionProperty for inserted/updated value, null if removing value */
+ public CrNodeVersionProperty setProperty(String name, Object value, int valueType)
+ throws RepositoryRuntimeException{
+
+ if ( name == null )
+ throw new RepositoryRuntimeException("A name must be supplied - a property cannot have a null name.");
+
+ // if value is null then remove the property
+ if ( value == null ) {
+ removeProperty(name);
+ return null;
+ }
+
+ // otherwise update/insert the property.
+ Set properties = getCrNodeVersionProperties();
+ CrNodeVersionProperty prop = null;
+ if ( properties != null ) {
+ Iterator iter = properties.iterator();
+ while (iter.hasNext() && prop == null) {
+ CrNodeVersionProperty element = (CrNodeVersionProperty) iter.next();
+ if ( name.equals(element.getName()) ) {
+ prop = element;
+ }
+ }
+ if ( prop != null ) {
+ prop.setValue(value.toString());
+ prop.setType(valueType);
+ } else {
+ prop = createProperty(name, value, valueType);
+ properties.add(prop);
+ }
+ } else {
+ properties = new HashSet();
+ prop = createProperty(name, value, valueType);
+ properties.add(prop);
+ setCrNodeVersionProperties(properties);
+ }
+ return prop;
+ }
+
+ /** Get the version description. Stored as a property so
+ * could be accessed via getProperty() */
+ public String getVersionDescription() {
+ CrNodeVersionProperty prop = getProperty(PropertyName.VERSIONDESC);
+ return prop != null ? prop.getString() : null;
+ }
+
+ /** Set the version description. Stored as a property so
+ * could be accessed via setProperty */
+ public void setVersionDescription(String description) {
+ setProperty(PropertyName.VERSIONDESC,description, PropertyType.STRING);
+ }
+
+ /**
+ * Indicates whether a property exists for this name
+ * Returns true if a property exists and false otherwise.
+ *
+ * @param name The name of a (possible) property.
+ * @return true if a property exists at relPath;
+ * false otherwise.
+ */
+ public boolean hasProperty(String name) {
+ return getProperty(name) != null;
+ }
+
+ /**
+ * Indicates whether this node has properties.
+ * Returns true if this node has one or more properties;
+ * false otherwise.
+ *
+ * @return true if this node has one or more properties;
+ * false otherwise.
+ */
+ public boolean hasProperties() {
+ Set properties = getCrNodeVersionProperties();
+ return properties != null && properties.size() > 0 ;
+ }
+
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNodeVersionProperty.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNodeVersionProperty.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrNodeVersionProperty.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,230 @@
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.Serializable;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.log4j.Logger;
+
+
+/**
+ * @hibernate.class
+ * table="lams_cr_node_version_property"
+ *
+*/
+public class CrNodeVersionProperty implements IValue,Serializable {
+
+ /** identifier field */
+ private Long id;
+
+ /** persistent field */
+ private String name;
+
+ /** persistent field */
+ private String value;
+
+ /** persistent field */
+ private int type;
+
+ /** persistent field */
+ private org.lamsfoundation.lams.contentrepository.CrNodeVersion crNodeVersion;
+
+ /** full constructor */
+ public CrNodeVersionProperty(String name, String value, int type, org.lamsfoundation.lams.contentrepository.CrNodeVersion crNodeVersion) {
+ this.name = name;
+ this.value = value;
+ this.type = type;
+ this.crNodeVersion = crNodeVersion;
+ }
+
+ /** default constructor */
+ public CrNodeVersionProperty() {
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="identity"
+ * type="java.lang.Long"
+ * column="id"
+ * unsaved-value="0"
+ *
+ */
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /**
+ * @hibernate.property
+ * column="name"
+ * length="255"
+ * not-null="true"
+ *
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @hibernate.property
+ * column="value"
+ * length="255"
+ * not-null="true"
+ *
+ */
+ public String getValue() {
+ return this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * @hibernate.property
+ * column="type"
+ * length="3"
+ * not-null="true"
+ *
+ */
+ public int getType() {
+ return this.type;
+ }
+
+ public void setType(int type) {
+ this.type = type;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="nv_id"
+ *
+ */
+ public org.lamsfoundation.lams.contentrepository.CrNodeVersion getCrNodeVersion() {
+ return this.crNodeVersion;
+ }
+
+ public void setCrNodeVersion(org.lamsfoundation.lams.contentrepository.CrNodeVersion crNodeVersion) {
+ this.crNodeVersion = crNodeVersion;
+ }
+
+ public String toString() {
+ return new ToStringBuilder(this)
+ .append("id", getId())
+ .append("name", getName())
+ .append("value", getValue())
+ .append("type", getType())
+ .toString();
+ }
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( !(other instanceof CrNodeVersionProperty) ) return false;
+ CrNodeVersionProperty castOther = (CrNodeVersionProperty) other;
+ return new EqualsBuilder()
+ .append(this.getId(), castOther.getId())
+ .append(this.getName(), castOther.getName())
+ .append(this.getValue(), castOther.getValue())
+ .append(this.getType(), castOther.getType())
+ .append(this.getCrNodeVersion(), castOther.getCrNodeVersion())
+ .isEquals();
+ }
+
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .append(getId())
+ .append(getName())
+ .append(getValue())
+ .append(getType())
+ .append(getCrNodeVersion())
+ .toHashCode();
+ }
+
+ /* ** Implementation of IValue interface ** */
+
+ protected Logger log = Logger.getLogger(CrNodeVersionProperty.class);
+
+ /**
+ * Returns a string representation of the value.
+ *
+ * @throws ValueFormatException If able to convert the value to a string.
+ *
+ * @throws IllegalStateException If calling getString() on a file and the stream cannot be read.
+ *
+ * @throws RepositoryException If another error occurs.
+ */
+ public String getString() {
+ return value;
+ }
+
+ /**
+ * Returns a double representation of the value.
+ *
+ * @throws ValueFormatException If able to convert the value to a double.
+ */
+ public double getDouble() throws ValueFormatException {
+ try {
+ return Double.parseDouble(value);
+ } catch ( NumberFormatException nfe ) {
+ throw new ValueFormatException("Unable to convert value "+value+" to double.");
+ }
+ }
+
+ /**
+ * Returns a Calendar representation of the value.
+ *
+ * @throws ValueFormatException If able to convert the value to a Calendar.
+ */
+ public Calendar getDate() throws ValueFormatException {
+ SimpleDateFormat df = new SimpleDateFormat();
+ Date date = null;
+ try {
+ date = df.parse(value);
+ } catch (ParseException e) {
+ log.debug("Parse exception occured converting "+value+" to date.",e);
+ }
+ if ( date == null ) {
+ throw new ValueFormatException("Unable to convert value "+value+" to Calendar.");
+ }
+
+ Calendar calendar = new GregorianCalendar();
+ calendar.setTime(date);
+
+ return calendar;
+ }
+
+ /**
+ * Returns a long representation of the value.
+ *
+ * @throws ValueFormatException If able to convert the value to a long.
+ */
+ public long getLong() throws ValueFormatException {
+ try {
+ return Long.parseLong(value);
+ } catch ( NumberFormatException nfe ) {
+ throw new ValueFormatException("Unable to convert value "+value+" to long.");
+ }
+ }
+
+ /**
+ * Returns a boolean representation of the value.
+ */
+ public boolean getBoolean() throws ValueFormatException {
+ return Boolean.valueOf(value).booleanValue();
+ }
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrWorkspace.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrWorkspace.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrWorkspace.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,133 @@
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.Serializable;
+import java.util.Set;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+/**
+ * @hibernate.class
+ * table="lams_cr_workspace"
+ *
+*/
+public class CrWorkspace implements IWorkspace,Serializable {
+
+ /** identifier field */
+ private Long workspaceId;
+
+ /** persistent field */
+ private String name;
+
+ /** persistent field */
+ private Set crWorkspaceCredentials;
+
+ /** persistent field */
+ private Set crNodes;
+
+ /** full constructor */
+ public CrWorkspace(String name, Set crWorkspaceCredentials, Set crNodes) {
+ this.name = name;
+ this.crWorkspaceCredentials = crWorkspaceCredentials;
+ this.crNodes = crNodes;
+ }
+
+ /** default constructor */
+ public CrWorkspace() {
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="identity"
+ * type="java.lang.Long"
+ * column="workspace_id"
+ * unsaved-value="0"
+ *
+ */
+ public Long getWorkspaceId() {
+ return this.workspaceId;
+ }
+
+ public void setWorkspaceId(Long workspaceId) {
+ this.workspaceId = workspaceId;
+ }
+
+ /**
+ * @hibernate.property
+ * column="name"
+ * length="255"
+ * not-null="true"
+ *
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * inverse="true"
+ * cascade="none"
+ * @hibernate.collection-key
+ * column="workspace_id"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.contentrepository.CrWorkspaceCredential"
+ *
+ */
+ public Set getCrWorkspaceCredentials() {
+ return this.crWorkspaceCredentials;
+ }
+
+ public void setCrWorkspaceCredentials(Set crWorkspaceCredentials) {
+ this.crWorkspaceCredentials = crWorkspaceCredentials;
+ }
+
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * inverse="true"
+ * cascade="none"
+ * @hibernate.collection-key
+ * column="workspace_id"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.contentrepository.CrNode"
+ *
+ */
+ public Set getCrNodes() {
+ return this.crNodes;
+ }
+
+ public void setCrNodes(Set crNodes) {
+ this.crNodes = crNodes;
+ }
+
+ public String toString() {
+ return new ToStringBuilder(this)
+ .append("workspaceId", getWorkspaceId())
+ .append("name", getName())
+ .toString();
+ }
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( !(other instanceof CrWorkspace) ) return false;
+ CrWorkspace castOther = (CrWorkspace) other;
+ return new EqualsBuilder()
+ .append(this.getWorkspaceId(), castOther.getWorkspaceId())
+ .append(this.getName(), castOther.getName())
+ .isEquals();
+ }
+
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .append(getWorkspaceId())
+ .append(getName())
+ .toHashCode();
+ }
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrWorkspaceCredential.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrWorkspaceCredential.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/CrWorkspaceCredential.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,104 @@
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.Serializable;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+
+/**
+ * @hibernate.class
+ * table="lams_cr_workspace_credential"
+ *
+*/
+public class CrWorkspaceCredential implements Serializable {
+
+ /** identifier field */
+ private Long wcId;
+
+ /** persistent field */
+ private org.lamsfoundation.lams.contentrepository.CrWorkspace crWorkspace;
+
+ /** persistent field */
+ private org.lamsfoundation.lams.contentrepository.CrCredential crCredential;
+
+ /** full constructor */
+ public CrWorkspaceCredential(org.lamsfoundation.lams.contentrepository.CrWorkspace crWorkspace, org.lamsfoundation.lams.contentrepository.CrCredential crCredential) {
+ this.crWorkspace = crWorkspace;
+ this.crCredential = crCredential;
+ }
+
+ /** default constructor */
+ public CrWorkspaceCredential() {
+ }
+
+ /**
+ * @hibernate.id
+ * generator-class="identity"
+ * type="java.lang.Long"
+ * column="wc_id"
+ * unsaved-value="0"
+ *
+ */
+ public Long getWcId() {
+ return this.wcId;
+ }
+
+ public void setWcId(Long wcId) {
+ this.wcId = wcId;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="workspace_id"
+ *
+ */
+ public org.lamsfoundation.lams.contentrepository.CrWorkspace getCrWorkspace() {
+ return this.crWorkspace;
+ }
+
+ public void setCrWorkspace(org.lamsfoundation.lams.contentrepository.CrWorkspace crWorkspace) {
+ this.crWorkspace = crWorkspace;
+ }
+
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="credential_id"
+ *
+ */
+ public org.lamsfoundation.lams.contentrepository.CrCredential getCrCredential() {
+ return this.crCredential;
+ }
+
+ public void setCrCredential(org.lamsfoundation.lams.contentrepository.CrCredential crCredential) {
+ this.crCredential = crCredential;
+ }
+
+ public String toString() {
+ return new ToStringBuilder(this)
+ .append("wcId", getWcId())
+ .toString();
+ }
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( !(other instanceof CrWorkspaceCredential) ) return false;
+ CrWorkspaceCredential castOther = (CrWorkspaceCredential) other;
+ return new EqualsBuilder()
+ .append(this.getWcId(), castOther.getWcId())
+ .append(this.getCrWorkspace(), castOther.getCrWorkspace())
+ .append(this.getCrCredential(), castOther.getCrCredential())
+ .isEquals();
+ }
+
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .append(getWcId())
+ .append(getCrWorkspace())
+ .append(getCrCredential())
+ .toHashCode();
+ }
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/FileException.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/FileException.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/FileException.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,46 @@
+package org.lamsfoundation.lams.contentrepository;
+/**
+ * Some error was generated reading or writing the files
+ * to disk.
+ */
+public class FileException extends RepositoryCheckedException {
+ /**
+ * Constructs a new instance of this class.
+ */
+ public FileException() {
+ this("File error occured.");
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure cause.
+ *
+ * @param s description
+ */
+ public FileException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a new instance of this class given a message describing the
+ * failure and a root throwable.
+ *
+ * @param s description
+ * @param cause root throwable cause
+ */
+ public FileException(String s, Throwable cause) {
+ super(s,cause);
+
+ }
+
+ /**
+ * Constructs a new instance of this class given a root throwable.
+ *
+ * @param cause root failure cause
+ */
+ public FileException(Throwable cause) {
+ this("File error occured.", cause);
+ }
+
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ICredentials.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ICredentials.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/ICredentials.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,76 @@
+
+package org.lamsfoundation.lams.contentrepository;
+import java.io.Serializable;
+
+/**
+ * Base interface for all credentials that may be passed to the
+ * Repository.login() method.
+ */
+public interface ICredentials extends Serializable {
+
+ /**
+ * Returns the name of the tool.
+ *
+ * @return the tool name.
+ */
+ public String getName();
+
+ /**
+ * Returns the password.
+ *
+ *
+ * If using the Spring factory, you nodeDAO and loadData() are called
+ * automatically, but you will still need to set the workspace.
+ *
+ *
+
+
+
+
+Classes
+
+
+
+
+ICredentials,SimpleCredentials SimpleCredentials is an implementation of ICredentials. To log in, the
+tool will create a SimpleCredentials object.
+IRepository The interface used for access to the repository. This is the equivalent of a SLSB interface
+to the repository. It is implemented by singleton SimpleRepository and accessed via the Spring context.
+ITicket The Ticket represents the "authorisation" key to the repository. When the tool logs in, it
+will be passed a SimpleTicket object, which implements the ITicket interface. This ticket must be supplied
+back to the repository to access the tool's nodes.
+IValue An object that allows the value of a property to be used as a String, Long, Double, Boolean
+or Calendar. At present, only Strings have been used so other types (particularly Calendar) may not
+function correctly. Implemented by CrNodeVersionProperty (a Hibernate based data object).
+IVersionDetail Describes the versions of a node. Useful for displaying a version history if the
+user needs to select a particular version. Implemented by SimpleVersionDetail.
+IVersionedNode The IVersionedNode interface represents a particular version of a node. When
+the tool asks for a file or package, it will be returned the node representing the files. This node
+will allow the package to get not only the filestream but the original file name and mime type.
+NodeKey The key to a node is made up of the UUID (Long) and a version (Long). This class
+encapsulates both keys, and is used to return the keys when a node is created/updated.
+NodeType Defines all the valid node types. Used for testing
+whether something is a file node or a package node: e.g. isNodeType(NodeType.FILENODE).
+PropertyName Defines all the current property names - such as MIMETYPE, FILENAME.
+Used to get the appropriate property from a node. e.g. IValue value = node.getProperty(PropertyName.MIMETYPE).
+PropertyType Defines what type a property really is - String, Long, Double, etc. Typical Usage
+
+
+ ApplicationContext context = new ClassPathXmlApplicationContext(IRepository.REPOSITORY_CONTEXT_PATH);
+ IRepository repository = (IRepository)context.getBean(IRepository.REPOSITORY_SERVICE_ID);
+ ICredentials cred = new SimpleCredentials(toolName, toolId);
+ repository.createCredential(cred);
+ repository.addWorkspace(cred, workspaceName);
+
+
+
+ ITicket ticket = repository.login(cred, workspaceName);
+
+
+
+ NodeKey fileNodeKeyV1 = repository.login.addFileItem(ticket, inputstream, filename,
+ mimeType, versionDescription);
+ IVersionedNode version1Node = repository.getFileItem(ticket,fileNodeKeyV1.getUuid(), fileNodeKeyV1.getVersion());
+
+ NodeKey fileNodeKeyV2 = getRepository().updateFileItem(ticket, fileNodeKeyV1.getUuid(), filename,
+ IVersionedNode version2Node = repository.getFileItem(ticket,fileNodeKeyV2.getUuid(), fileNodeKeyV2.getVersion());
+ IVersionedNode latestFileVersionNode = repository.getFileItem(ticket,fileNodeKeyV2.getUuid(), null);
+ InputStream isForOutputToScreen1 = latestFileVersionNode.getFile();
+
+ String[] problemFiles = repository.deleteVersion(ticket,fileNodeKeyV1.getUuid(), fileNodeKeyV1.getVersion());
+
+ NodeKey packageNodeKeyV1 = repository.addPackageItem(ticket,directoryName, initialFile, versionDescription);
+ IVersionedNode package1Node = repository.getFileItem(packageNodeKeyV1.getUuid(), packageNodeKeyV1.getVersion());
+
+ NodeKey packageNodeKeyV2 = repository.updatePackageItem(ticket, packageNodeKeyV1.getUuid(), directoryName, initialFile, versionDescription);
+ IVersionedNode package2Node = repository.getFileItem(packageNodeKeyV2.getUuid(), packageNodeKeyV2.getVersion());
+ IVersionedNode latestPackageVersionNode = repository.getFileItem(ticket,fileNodeKeyV2.getUuid(), null);
+ InputStream isForOutputToScreen2 = latestPackageVersionNode();
+
+ String[] problemFiles2 = getRepository().deleteNode(ticket,packageNodeKeyV1.getUuid());
+
+
+
+ repository.logout(ticket);
+
+Exceptions and Transactions
+
+Configuration
+
+
+
+
+Building the Repository
+
+
+
+
+
\ No newline at end of file
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/ICredentialDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/ICredentialDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/ICredentialDAO.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,34 @@
+package org.lamsfoundation.lams.contentrepository.dao;
+
+import org.lamsfoundation.lams.contentrepository.CrCredential;
+import org.lamsfoundation.lams.contentrepository.ICredentials;
+import org.lamsfoundation.lams.contentrepository.IWorkspace;
+import org.lamsfoundation.lams.contentrepository.RepositoryRuntimeException;
+
+public interface ICredentialDAO {
+
+ /** Check the supplied credential to the workspace.
+ * By doing the check at this level, the password does
+ * not need to be read from the database.
+ * @return true if credential is found
+ * @throws repository exception if an internal (db) error occurs
+ */
+ public abstract boolean checkCredential(ICredentials credential, IWorkspace workspace) throws RepositoryRuntimeException;
+
+ /** Check the supplied credential to the repository
+ * By doing the check at this level, the password does
+ * not need to be read from the database.
+ * @return true if credential is found
+ * @throws repository exception if an internal (db) error occurs
+ */
+ public abstract boolean checkCredential(ICredentials credential) throws RepositoryRuntimeException;
+
+ public abstract void insert(Object object);
+
+ public abstract void update(Object object);
+
+ public abstract void delete(Object object);
+
+ public abstract CrCredential findByName(String name);
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/IFileDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/IFileDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/IFileDAO.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,44 @@
+/*
+ * Created on Jan 10, 2005
+ */
+package org.lamsfoundation.lams.contentrepository.dao;
+
+import java.io.InputStream;
+
+import org.lamsfoundation.lams.contentrepository.FileException;
+
+
+/**
+ * Manages the reading and writing of files to the repository directories.
+ *
+ * @author Fiona Malikoff
+ */
+public interface IFileDAO {
+
+ /**
+ * Write out a file to the repository. Closes the stream.
+ * @return the path to which the file was written
+ */
+ public String writeFile(Long uuid, Long versionId, InputStream is)
+ throws FileException;
+
+ /**
+ * Gets a file from the repository.
+ */
+ public InputStream getFile(Long uuid, Long versionId)
+ throws FileException;
+
+ /** Delete a file from the repository. If this makes the directory
+ * empty, then the directory should be deleted.
+ * @returns 1 if deleted okay, 0 if file not found, -1 if file found but a delete error occured.
+ */
+ public int delete(Long uuid, Long versionId)
+ throws FileException;
+
+ /**
+ * Get the actual path of the file ie the path on disk
+ */
+ public String getFilePath(Long uuid, Long versionId)
+ throws FileException;
+
+}
\ No newline at end of file
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/INodeDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/INodeDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/INodeDAO.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,29 @@
+/*
+ * Created on Dec 20, 2004
+ */
+package org.lamsfoundation.lams.contentrepository.dao;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Data access routines for Nodes, versions and properties
+ *
+ * @author Fiona Malikoff
+ */
+public interface INodeDAO {
+
+ /** Finds an object. Return null if not found (note: this
+ * is not the standard behaviour for Spring and Hibernate combined.)
+ */
+ public Object find(Class objClass, Serializable id);
+
+ public void insert(Object object);
+
+ public void update(Object object);
+
+ public void delete(Object object);
+
+ public List findAll(Class objClass);
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/IWorkspaceDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/IWorkspaceDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/IWorkspaceDAO.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,54 @@
+/*
+ * Created on Dec 20, 2004
+ */
+package org.lamsfoundation.lams.contentrepository.dao;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.lamsfoundation.lams.contentrepository.CrWorkspace;
+
+
+/**
+ * Data access routines for Workspaces.
+ *
+ * @author Fiona Malikoff
+ */
+public interface IWorkspaceDAO {
+
+ /** Get a workspace.
+ *
+ * @param workspaceName
+ * @return first (and expected only) workspace with this name.
+ */
+ public CrWorkspace findByName(String workspaceName);
+
+ /** Get all the nodes for a workspace.
+ *
+ * Can't just get the workspace as the hibernate implementation
+ * will lazy load the nodes, and so getNodes() will be missing
+ * the necessary info when workspace is returned to the calling
+ * code.
+ *
+ * @param workspaceId
+ * @return first (and expected only) workspace with this name.
+ */
+ public List findWorkspaceNodes(Long workspaceId);
+
+ /** Finds an object. Return null if not found (note: this
+ * is not the standard behaviour for Spring and Hibernate combined.)
+ * @param objClass
+ * @param id
+ * @return object built from database
+ */
+ public Object find(Class objClass, Serializable id);
+
+ public void insert(Object object);
+
+ public void update(Object object);
+
+ public void delete(Object object);
+
+ public List findAll(Class objClass);
+
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/file/FileDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/file/FileDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/dao/file/FileDAO.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,219 @@
+/*
+ * Created on Jan 10, 2005
+ */
+package org.lamsfoundation.lams.contentrepository.dao.file;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.apache.log4j.Logger;
+import org.lamsfoundation.lams.contentrepository.FileException;
+import org.lamsfoundation.lams.contentrepository.dao.IFileDAO;
+
+
+/**
+ * Manages the reading and writing of files to the repository directories.
+ * Note: this does not involve the database - so no Hibernate!
+ *
+ * @author Fiona Malikoff
+ */
+public class FileDAO implements IFileDAO {
+
+ private String repositoryLocation;
+ protected Logger log = Logger.getLogger(FileDAO.class);
+
+ /**
+ * @return array of two strings - the first is the directory, the second is the
+ * file path.
+ */
+ protected String[] generateFilePath(Long uuid, Long versionId)
+ throws FileException {
+
+ if ( repositoryLocation == null )
+ throw new FileException("Repository location unknown. Cannot access files. This should have been configured in the Spring context.");
+
+ String directoryPath = repositoryLocation;
+
+ if ( uuid == null || uuid.longValue() < 1 )
+ throw new FileException("Unable to generate new filename for uuid="+uuid);
+
+ String uuidString = uuid.toString();
+ if ( uuidString.length() % 2 != 0 ) {
+ uuidString = "0"+uuidString;
+ }
+ for ( int i=0; i
+The create-db-tables and insert-test-data targets can be run at any time. If you
+run the create-db-tables then you will need to clear out all the directories in the
+repository otherwise it fail when it uses an id that has a file in the repository.
+You must run insert-test-data before running the JUNIT tests or the
+create workspace and create user tests will fail (as the test values to be added
+will already exist).
+
+ */
+ public void destroy() {
+ super.destroy(); // Just puts "destroy" string in log
+ // Put your code here
+ }
+
+ /**
+ * The doGet method of the servlet.
+ *
+ * This method is called when a form has its tag value method equals to get.
+ *
+ * @param request the request send by the client to the server
+ * @param response the response send by the server to the client
+ * @throws ServletException if an error occurred
+ * @throws IOException if an error occurred
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+ try {
+ handleCall(request, response);
+ } catch (RepositoryCheckedException e) {
+ errorInContent(request, response,"Repository threw an exception ",e);
+ }
+ }
+
+ private void handleCall(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, BeansException, AccessDeniedException, ItemNotFoundException, FileException, ValueFormatException, IOException{
+
+ long start = System.currentTimeMillis();
+
+ ITicket ticket = RepositoryDispatchAction.getTicket(request);
+ if ( ticket == null )
+ errorInContent(request, response,"No ticket found in session. Unable to access repository.",null);
+
+ Long uuid = RepositoryDispatchAction.getLong(request.getParameter(RepositoryDispatchAction.UUID_NAME));
+ Long version = null;
+
+ String callId = null;
+
+ if ( uuid != null ) {
+
+ callId = "download "+Math.random()+" "+uuid;
+
+ version = RepositoryDispatchAction.getLong(request.getParameter(RepositoryDispatchAction.VERSION_NAME));
+
+ IVersionedNode node = getFileItem(ticket, uuid, version,null);
+ log.error(callId+" getFileItem1 (ms) "+(System.currentTimeMillis()-start));
+ // update versionId in case it was null and we got the latest version...
+ version = node.getVersion();
+
+ if ( node.isNodeType(NodeType.PACKAGENODE) ) {
+
+ // now get the path of the initial page in the package
+ String initialPage = getInitialPage(request, response, node);
+
+ // redirect to the initial path
+ // prepend with servlet and id - initial call doesn't include the id
+ // and depending on "/"s, the servlet name is sometimes lost by the redirect.
+ initialPage = request.getRequestURL() + "/" + uuid
+ + "/" + version + "/" + initialPage;
+ log.debug("Request url was "+request.getRequestURL());
+ log.debug("Servlet path was "+request.getServletPath());
+ log.debug("Attempting to redirect to initial page "+initialPage);
+ response.sendRedirect(initialPage);
+
+ } else if ( node.isNodeType(NodeType.FILENODE) ) {
+
+ handleFileNode(request, response, node);
+
+ } else {
+ errorInContent(request, response,"Unsupported node type "
+ +node.getNodeType()+". Node Data is "+node.toString(),null);
+ }
+
+ } else {
+
+ // using the /download/
+ *
+ * This method is called when a form has its tag value method equals to post.
+ *
+ * @param request the request send by the client to the server
+ * @param response the response send by the server to the client
+ * @throws ServletException if an error occurred
+ * @throws IOException if an error occurred
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+ try {
+ handleCall(request, response);
+ } catch (RepositoryCheckedException e) {
+ errorInContent(request, response,"Repository threw an exception ",e);
+ }
+ }
+
+ /**
+ * Gets the application context and gets the repository object.
+ * Required for the demo to run, so make sure this servlet loads on startup.
+ *
+ * @throws ServletException if an error occure
+ */
+ public void init() throws ServletException {
+ System.err.println("Repository Demo calling context and getting repository singleton.");
+ ApplicationContext context = new ClassPathXmlApplicationContext(IRepository.REPOSITORY_CONTEXT_PATH);
+ repository = (IRepository)context.getBean(IRepository.REPOSITORY_SERVICE_ID);
+ }
+
+
+ protected void errorInContent(HttpServletRequest request, HttpServletResponse response, String errMsg, Exception e ) throws IOException {
+
+ log.error(errMsg,e);
+
+ response.setContentType("text/html");
+ PrintWriter out = response.getWriter();
+ out.println("");
+ out.println("");
+ out.println(" "
+ +"
";
+ }
+
+ /**
+ * @return Returns the repository.
+ */
+ public static IRepository getRepository() {
+ return repository;
+ }
+}
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/LoginRepositoryAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/LoginRepositoryAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/LoginRepositoryAction.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,146 @@
+//Created by MyEclipse Struts
+// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.8.2/xslt/JavaClass.xsl
+
+package org.lamsfoundation.lams.contentrepository.struts.action;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.lamsfoundation.lams.contentrepository.AccessDeniedException;
+import org.lamsfoundation.lams.contentrepository.ICredentials;
+import org.lamsfoundation.lams.contentrepository.IRepository;
+import org.lamsfoundation.lams.contentrepository.ITicket;
+import org.lamsfoundation.lams.contentrepository.ItemExistsException;
+import org.lamsfoundation.lams.contentrepository.LoginException;
+import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
+import org.lamsfoundation.lams.contentrepository.SimpleCredentials;
+import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException;
+import org.lamsfoundation.lams.contentrepository.struts.form.LoginRepositoryForm;
+
+
+/**
+ * MyEclipse Struts
+ * Creation date: 01-13-2005
+ *
+ * The exceptions will be handled by struts but are listed explicitly
+ * here so (1) I can log them and (2) you can see what exceptions are thrown.
+ *
+ * XDoclet definition:
+ * @struts:action path="/loginRepository" name="loginRepositoryForm" input="/loginRepository.jsp" scope="request" validate="true" parameter="method"
+ */
+public class LoginRepositoryAction extends RepositoryDispatchAction {
+
+ protected Logger log = Logger.getLogger(LoginRepositoryAction.class);
+
+ // --------------------------------------------------------- Instance Variables
+
+ // --------------------------------------------------------- Methods
+
+ /**
+ * Login to the repository
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return ActionForward
+ */
+ public ActionForward loginToWorkspace(
+ ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response) throws RepositoryCheckedException {
+ return process(mapping, form, request, response, false);
+ }
+
+ /**
+ * Create and login to a new workspace
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return ActionForward
+ */
+ public ActionForward createNewWorkspace(
+ ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response) throws RepositoryCheckedException {
+ return process(mapping, form, request, response, true);
+ }
+
+ /* Get the repository bean and connect to the desired workspace. May need to create the
+ * workspace first - depends on createWorkspaceFirst flag.
+ * RepositoryCheckedException is the superclass for all the other repository checked exceptions
+ * thrown by this method.
+ */
+ private ActionForward process(ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response,
+ boolean createWorkspaceFirst) throws RepositoryCheckedException
+ {
+ log.debug("In process, createWorkspaceFirst="+createWorkspaceFirst);
+
+ LoginRepositoryForm loginRepositoryForm = (LoginRepositoryForm) form;
+ if ( log.isDebugEnabled() ) {
+ log.debug("Form : "+form);
+ }
+
+ // login to repository
+ String toolName = loginRepositoryForm.getToolName();
+ char[] toolId = loginRepositoryForm.getIndentificationString().toCharArray();
+ String workspaceName = loginRepositoryForm.getWorkspaceName();
+ ICredentials cred = new SimpleCredentials(toolName, toolId);
+
+ IRepository repository = Download.getRepository();
+
+ if ( createWorkspaceFirst ) {
+ try {
+ // add the tool credential, then create the workspace
+ // if the credential isn't added first, then the addWorkspace
+ // call will fail - only a valid credential can add a workspace.
+ repository.createCredential(cred);
+ repository.addWorkspace(cred, workspaceName);
+ } catch (LoginException e) {
+ log.error("LoginException occured ",e);
+ throw e;
+ } catch (ItemExistsException e) {
+ log.error("Workspace already exists Exception occured ",e);
+ throw e;
+ } catch (RepositoryCheckedException e) {
+ log.error("Some other repository error (usually internal error) occured ",e);
+ throw e;
+ }
+ }
+
+ ITicket ticket;
+ try {
+ ticket = repository.login(cred, workspaceName);
+ } catch (LoginException e) {
+ log.error("LoginException occured ",e);
+ throw e;
+ } catch (AccessDeniedException e) {
+ log.error("Not allowed to do that type exception occured ",e);
+ throw e;
+ } catch (WorkspaceNotFoundException e) {
+ log.error("Workspace was not found exception occured ",e);
+ throw e;
+ }
+
+ // add the ticket to the session. this ticket will need to kept somewhere
+ // by the application as it is the method of accessing the repository.
+ log.debug("New ticket being added to session: "+ticket);
+ setTicket(request, ticket);
+
+ log.debug("Login succeeded, forwarding to "+mapping.findForward(SUCCESS_PATH));
+ return mapping.findForward(SUCCESS_PATH);
+
+ }
+
+
+
+}
\ No newline at end of file
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/NodeSelectionAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/NodeSelectionAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/NodeSelectionAction.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,245 @@
+//Created by MyEclipse Struts
+// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.8.2/xslt/JavaClass.xsl
+
+package org.lamsfoundation.lams.contentrepository.struts.action;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedMap;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+import org.apache.struts.action.ActionError;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.lamsfoundation.lams.contentrepository.AccessDeniedException;
+import org.lamsfoundation.lams.contentrepository.FileException;
+import org.lamsfoundation.lams.contentrepository.ITicket;
+import org.lamsfoundation.lams.contentrepository.IVersionedNode;
+import org.lamsfoundation.lams.contentrepository.InvalidParameterException;
+import org.lamsfoundation.lams.contentrepository.ItemNotFoundException;
+
+
+/**
+ * MyEclipse Struts
+ * Creation date: 01-13-2005
+ *
+ * The exceptions will be handled by struts but are listed explicitly
+ * here so (1) I can log them and (2) you can see what exceptions are thrown.
+ *
+ * XDoclet definition:
+ * @struts:action path="/nodeSelection" name="nodeSelectionForm" input="/nodeSelection.jsp" scope="request" parameter="method"
+ */
+public class NodeSelectionAction extends RepositoryDispatchAction {
+
+ protected Logger log = Logger.getLogger(NodeSelectionAction.class);
+
+ /**
+ * Get the list of nodes in the workspace. Displays the node list
+ * screen.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return ActionForward
+ * @throws AccessDeniedException
+ * @throws ItemNotFoundException
+ * @throws FileException
+ */
+ public ActionForward getList(ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response) throws AccessDeniedException, ItemNotFoundException, FileException {
+
+ ITicket ticket = getTicket(request);
+ log.debug("In getList, ticket is "+ticket);
+ if ( ticket == null ) {
+ log.error("Ticket missing from session");
+ return returnError(mapping, request,
+ new ActionError("error.noTicket"));
+ }
+
+ // get the map of nodes and put it in the request,
+ // ready to be rendered by the jsp. This isn't "normal" -
+ // usually the app will have a list of all its nodes
+ // and know what they are. This getNodeList method
+ // was put in just to write this demo. So its not an
+ // efficient method, and should not be used by a real
+ // application.
+ log.debug("Getting node map");
+ SortedMap map = null;
+ try {
+ map = Download.getRepository().getNodeList(ticket);
+ } catch (AccessDeniedException e) {
+ log.error("Not allowed to do this exception occured ",e);
+ throw e;
+ }
+ log.debug("Got map, map is "+map);
+
+ // Normally, the application will have their own details about
+ // all the nodes but we don't, so go back and get the real
+ // node details, and only list (on the JSP) the direct file
+ // nodes and the package nodes - not the file nodes within
+ // the package nodes.
+ ArrayList jspList = new ArrayList();
+ if ( map != null ) {
+
+ Iterator iter = map.keySet().iterator();
+
+ while (iter.hasNext()) {
+ Long uuid = (Long) iter.next();
+
+ IVersionedNode node;
+ try {
+
+ node = Download.getRepository().getFileItem(ticket, uuid, null);
+
+ } catch (AccessDeniedException e) {
+ log.error("Not allowed to do this exception occured ",e);
+ throw e;
+ } catch (ItemNotFoundException e) {
+ log.error("Item not found exception occured ",e);
+ throw e;
+ } catch (FileException e) {
+ log.error("File exception occured ",e);
+ throw e;
+ }
+
+ if ( ! node.hasParentNode() ) {
+ jspList.add(node);
+ jspList.add(map.get(uuid));
+ }
+ }
+ }
+ request.setAttribute(NODE_LIST_NAME, jspList);
+
+ log.debug("Added map to request, forwarding to "+mapping.findForward("nodelist"));
+ return mapping.findForward("nodelist");
+
+ }
+
+ /**
+ * Get the list of nodes in the workspace. Displays the node list
+ * screen.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return ActionForward
+ * @throws AccessDeniedException
+ * @throws ItemNotFoundException
+ * @throws FileException
+ */
+ public ActionForward viewPackage(ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response) throws AccessDeniedException, ItemNotFoundException, FileException {
+
+ ITicket ticket = getTicket(request);
+ log.debug("In getList, ticket is "+ticket);
+ if ( ticket == null ) {
+ log.error("Ticket missing from session");
+ return returnError(mapping, request,
+ new ActionError("error.noTicket"));
+ }
+
+ Long uuid = getLong(request.getParameter(UUID_NAME));
+ Long version = getLong(request.getParameter(VERSION_NAME));
+
+ if ( uuid == null ) {
+ log.error("UUID missing");
+ return returnError(mapping, request,
+ new ActionError("error.uuidMissing"));
+ }
+
+ log.debug("Deleting node "+uuid+" version "+version);
+
+ List packageList = null;
+ try {
+
+ packageList = Download.getRepository().getPackageNodes(ticket, uuid, version);
+ request.setAttribute(PACKAGE_LIST, packageList);
+
+ } catch (AccessDeniedException e) {
+ log.error("Not allowed to do this exception occured ",e);
+ throw e;
+ } catch (ItemNotFoundException e) {
+ log.error("Item not found exception occured ",e);
+ throw e;
+ }
+
+ log.debug("Added map to request, forwarding to "+mapping.findForward("packagelist"));
+ return mapping.findForward("packagelist");
+ }
+
+ /**
+ * Delete a version of a node, or the whole node.
+ *
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return ActionForward
+ * @throws ItemNotFoundException
+ * @throws InvalidParameterException
+ * @throws AccessDeniedException
+ * @throws Exception
+ */
+ public ActionForward deleteNode(ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response)
+
+ throws ItemNotFoundException, InvalidParameterException,
+ AccessDeniedException, FileException {
+
+ ITicket ticket = getTicket(request);
+ log.debug("In deleteNode, ticket is "+ticket);
+ if ( ticket == null ) {
+ log.error("Ticket missing from session");
+ return returnError(mapping, request,
+ new ActionError("error.noTicket"));
+ }
+
+ Long uuid = getLong(request.getParameter(UUID_NAME));
+ Long version = getLong(request.getParameter(VERSION_NAME));
+
+ if ( uuid == null ) {
+ log.error("UUID missing");
+ return returnError(mapping, request,
+ new ActionError("error.uuidMissing"));
+ }
+
+
+ log.debug("Deleting node "+uuid+" version "+version);
+
+ try {
+ if ( version == null ) {
+ String[] problemFiles = Download.getRepository().deleteNode(ticket,uuid);
+ log.info("Deleted node, "
+ +(problemFiles==null||problemFiles.length==0?0:problemFiles.length)
+ +" problem files were encountered.");
+ } else {
+ String[] problemFiles = Download.getRepository().deleteVersion(ticket,uuid,version);
+ }
+
+ log.debug("Deleted nodes, forwarding to list");
+ return getList(mapping,form,request,response);
+
+ } catch (AccessDeniedException e) {
+ log.error("Not allowed to do this exception occured ",e);
+ throw e;
+ } catch (ItemNotFoundException e) {
+ log.error("Item not found exception occured ",e);
+ throw e;
+ }
+
+ }
+
+}
\ No newline at end of file
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/RepositoryDispatchAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/RepositoryDispatchAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/RepositoryDispatchAction.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,98 @@
+//Created by MyEclipse Struts
+// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_3.8.2/xslt/JavaClass.xsl
+
+package org.lamsfoundation.lams.contentrepository.struts.action;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+import org.apache.struts.action.ActionError;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessages;
+import org.apache.struts.actions.DispatchAction;
+import org.lamsfoundation.lams.contentrepository.ITicket;
+import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
+
+
+/**
+ * Base class for the dispatch actions used in the repository tests.
+ * Shares functionality such as checking ticket.
+ */
+public class RepositoryDispatchAction extends DispatchAction {
+
+ public final static String TICKET_NAME = "ticket";
+
+ public static final String NODE_LIST_NAME = "nodeList";
+ public static final String UUID_NAME = "uuid";
+ public static final String VERSION_NAME = "version";
+
+ public static final String SUCCESS_PATH = "success";
+ public static final String ERROR_PATH = "error";
+ public static final String LOGOUT_PATH = "logout";
+
+ public static final String PACKAGE_LIST = "packageList";
+
+ protected static Logger log = Logger.getLogger(RepositoryDispatchAction.class);
+
+ /** Adds this error to the errors, then goes to the error forward */
+ protected ActionForward returnError(ActionMapping mapping,
+ HttpServletRequest request, ActionError error) {
+ ActionErrors errors = new ActionErrors();
+ errors.add(ActionMessages.GLOBAL_MESSAGE, error);
+ saveErrors(request,errors);
+ return mapping.findForward(ERROR_PATH);
+ }
+
+ protected static ITicket getTicket(HttpServletRequest request) {
+ return (ITicket) request.getSession().getAttribute(TICKET_NAME);
+ }
+
+ protected static void setTicket(HttpServletRequest request, ITicket ticket) {
+ request.getSession().setAttribute(TICKET_NAME, ticket);
+ }
+
+ protected static Long getLong(String longAsString) {
+ try {
+ return new Long(longAsString);
+ } catch ( NumberFormatException e ) {
+ return null;
+ }
+ }
+
+ /**
+ * Logout of the workspace. Doesn't need a form.
+ * @param mapping
+ * @param form
+ * @param request
+ * @param response
+ * @return ActionForward
+ */
+ public ActionForward logout(
+ ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response) throws RepositoryCheckedException {
+
+ log.debug("In logout");
+
+ ITicket ticket = getTicket(request);
+ log.debug("In getNode, ticket is "+ticket);
+ if ( ticket == null ) {
+ log.error("Ticket missing from session");
+ return returnError(mapping, request,
+ new ActionError("error.noTicket"));
+ }
+
+ log.debug("About to logout");
+
+ Download.getRepository().logout(ticket);
+
+ log.debug("Logged out to "+mapping.findForward(LOGOUT_PATH));
+ return mapping.findForward(LOGOUT_PATH);
+
+ }
+}
\ No newline at end of file
Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/TestLogin.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/TestLogin.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/struts/action/TestLogin.java 28 Jan 2005 02:25:41 -0000 1.1
@@ -0,0 +1,122 @@
+package org.lamsfoundation.lams.contentrepository.struts.action;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.lamsfoundation.lams.contentrepository.ICredentials;
+import org.lamsfoundation.lams.contentrepository.ITicket;
+import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
+import org.lamsfoundation.lams.contentrepository.SimpleCredentials;
+
+
+/**
+ * This standalone servlet is for performance testing. It acts
+ * as an "interface" between JMeter and the Repository jar file.
+ *
+ * All it does is logs in and puts the ticket in the session.
+ * It is designed to be as bare bones as possible, so that the
+ * performance of the servlet doesn't affect the testing too much.
+ *
+ * The user and the workspace must already exist.
+ *
+ * Parameters w=getContextPath "+request.getContextPath()+" "
+ + " getPathInfo "+request.getPathInfo()+" "
+ + " getPathTranslated "+request.getPathTranslated()+" "
+ + " getQueryString "+request.getQueryString()+" "
+ + " getRequestURI "+request.getRequestURI()+" "
+ + " getRequestURL "+request.getRequestURL()+" "
+ + " getServletPath "+request.getServletPath()+" "
+ + "
+ *
+ * @author Fiona Malikoff
+ */
+public class NodeTransactionTest extends TestCase {
+
+ /*
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /*
+ * @see TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Constructor for NodeTransactionTest.
+ * @param name
+ */
+ public NodeTransactionTest(String name) {
+ super(name);
+ }
+
+}
Index: lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/TestSimpleRepository.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/Attic/TestSimpleRepository.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/TestSimpleRepository.java 28 Jan 2005 02:26:16 -0000 1.1
@@ -0,0 +1,596 @@
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedSet;
+
+import org.apache.log4j.Logger;
+import org.lamsfoundation.lams.contentrepository.AccessDeniedException;
+import org.lamsfoundation.lams.contentrepository.FileException;
+import org.lamsfoundation.lams.contentrepository.ICredentials;
+import org.lamsfoundation.lams.contentrepository.ITicket;
+import org.lamsfoundation.lams.contentrepository.IVersionDetail;
+import org.lamsfoundation.lams.contentrepository.IVersionedNode;
+import org.lamsfoundation.lams.contentrepository.ItemNotFoundException;
+import org.lamsfoundation.lams.contentrepository.LoginException;
+import org.lamsfoundation.lams.contentrepository.NodeKey;
+import org.lamsfoundation.lams.contentrepository.NodeType;
+import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
+import org.lamsfoundation.lams.contentrepository.SimpleCredentials;
+import org.lamsfoundation.lams.contentrepository.SimpleVersionedNode;
+import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException;
+import org.lamsfoundation.lams.contentrepository.dao.IFileDAO;
+import org.lamsfoundation.lams.contentrepository.dao.file.FileDAO;
+
+
+/**
+ * Test SimpleRepository and the Credentials code.
+ *
+ * @author Fiona Malikoff
+ */
+public class TestSimpleRepository extends BaseTestCase {
+
+ protected Logger log = Logger.getLogger(TestSimpleRepository.class);
+
+ String wrongWorkspaceExists = "btoolWorkspace";
+ String wrongWorkspaceDoesNotExist = "ctoolWorkspace";
+ String newWorkspace = "newtoolWorkspace";
+ String workspaceAlreadyExistsMessage = "Workspace newtoolWorkspace already exists, cannot add workspace.";
+ String wrongUser = "btool";
+ String newUser = "ctool";
+ String userAlreadyExistsMessage = "Credential name ctool already exists - cannot create credential.";
+ char[] wrongPassword = {'b','t','o','o','l'};
+ char[] newPassword1 = {'c','t','o','o','l','x'};
+ char[] newPassword2 = {'d','t','o','o','l','x'};
+
+ Long one = new Long(1);
+ Long two = new Long(2);
+ String v1Description = "Draft";
+ String v2Description = "Final";
+
+ /**
+ * Constructor for SimpleRepositoryTest.
+ * @param arg0
+ */
+ public TestSimpleRepository() {
+ super();
+ }
+
+ public void testLoginPass() {
+ // get a credential from the bean factory
+ // setup credential with known username/password
+ ICredentials cred = new SimpleCredentials(INITIAL_WORKSPACE_USER, INITIAL_WORKSPACE_PASSWORD);
+ try {
+ ITicket ticket = repository.login(cred, INITIAL_WORKSPACE);
+ assertNotNull("Login succeeded, ticket returned.", ticket);
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+ }
+
+ public void testLoginFailWrongUser() {
+ // get a credential from the bean factory
+ // setup credential with known username/password
+ ICredentials cred = new SimpleCredentials(wrongUser, INITIAL_WORKSPACE_PASSWORD);
+ try {
+ ITicket ticket = repository.login(cred, INITIAL_WORKSPACE);
+ fail("Login succeeded but expected it to fail as username was wrong. Ticket is "+ticket);
+ } catch ( LoginException le ) {
+ assertTrue("Login exception thrown as expected. Exception was "+le.getMessage(),true);
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+ }
+
+ public void testLoginFailWrongPassword() {
+ // get a credential from the bean factory
+ // setup credential with known username/password
+ ICredentials cred = new SimpleCredentials(INITIAL_WORKSPACE_USER, wrongPassword);
+ try {
+ ITicket ticket = repository.login(cred, INITIAL_WORKSPACE);
+ fail("Login succeeded but expected it to fail as password was wrong. Ticket is "+ticket);
+ } catch ( LoginException le ) {
+ assertTrue("Login exception thrown as expected. Exception was "+le.getMessage(),true);
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+ }
+
+ public void testLoginFailWrongWorkspaceExists() {
+ // get a credential from the bean factory
+ // setup credential with known username/password
+ try {
+ ICredentials cred = new SimpleCredentials(INITIAL_WORKSPACE_USER, INITIAL_WORKSPACE_PASSWORD);
+ ITicket ticket = repository.login(cred, wrongWorkspaceExists);
+ fail("Login succeeded but expected it to fail as password was wrong. Ticket is "+ticket);
+ } catch ( WorkspaceNotFoundException we ) {
+ assertTrue("Workspace not found exception thrown as expected.",true);
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+ }
+
+ public void testLoginFailWrongWorkspaceDoesNotExist() {
+ // get a credential from the bean factory
+ // setup credential with known username/password
+ try {
+ ICredentials cred = new SimpleCredentials(INITIAL_WORKSPACE_USER, INITIAL_WORKSPACE_PASSWORD);
+ ITicket ticket = repository.login(cred, wrongWorkspaceDoesNotExist);
+ fail("Login succeeded but expected it to fail as password was wrong. Ticket is "+ticket);
+ } catch ( WorkspaceNotFoundException we ) {
+ assertTrue("Workspace not found exception thrown as expected. Exception was "+we.getMessage(), true);
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+ }
+
+ public void testAddWorkspace() {
+ ICredentials cred = new SimpleCredentials(INITIAL_WORKSPACE_USER, INITIAL_WORKSPACE_PASSWORD);
+ try {
+ repository.addWorkspace(cred,newWorkspace);
+ ITicket ticket = repository.login(cred, newWorkspace);
+ assertNotNull("Add workspace succeeded - can login to workspace. Ticket is "+ticket, ticket);
+ } catch ( AccessDeniedException ae ) {
+ assertTrue("Access denied exception thrown as expected. Exception was "+ae.getMessage(), true);
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+
+ // repeat the add - should fail as the workspace name already exists
+ try {
+ repository.addWorkspace(cred,newWorkspace);
+ ITicket ticket = repository.login(cred, newWorkspace);
+ fail("Add workspace suceeded but it should have failed as workspace already exists.");
+ } catch ( RepositoryCheckedException re ) {
+ assertTrue("Repository exception thrown was due to name duplication as expected: "+re.getMessage(),
+ re.getMessage() != null && re.getMessage().equals(workspaceAlreadyExistsMessage));
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+}
+
+ /** Tests adding a new user and changing a password */
+ public void testUserAdmin() {
+ // try creating a new user.
+ // setup credential with known username/password
+ ICredentials cred1 = new SimpleCredentials(newUser, newPassword1);
+ ICredentials cred2 = new SimpleCredentials(newUser, newPassword2);
+ try {
+ repository.createCredential(cred1);
+ repository.assignCredentials(cred1, INITIAL_WORKSPACE);
+ ITicket newTicket = repository.login(cred1, INITIAL_WORKSPACE);
+ assertTrue("Login succeeded for new user to original workspace.",true);
+ } catch ( LoginException le ) {
+ assertTrue("Login exception unexpectededly - user newly created. Exception was "+le.getMessage(),true);
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+
+ try {
+ // resetup the credential as the password will have been cleared by login.
+ cred1 = new SimpleCredentials(newUser, newPassword1);
+ repository.updateCredentials(cred1,cred2);
+ ITicket newTicket = repository.login(cred2, INITIAL_WORKSPACE);
+ assertTrue("Login succeeded for new user to original workspace with new password.",true);
+ } catch ( LoginException le ) {
+ assertTrue("Login exception unexpectededly - user password changed. Exception was "+le.getMessage(),true);
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+
+ // try recreating a new user - should fail
+ // setup credential with known username/password
+ try {
+ repository.createCredential(cred1);
+ fail("User creation should have failed due to duplicate username");
+ } catch ( RepositoryCheckedException re ) {
+ assertTrue("Repository exception thrown was due to name duplication as expected: "+re.getMessage(),
+ re.getMessage() != null && re.getMessage().equals(userAlreadyExistsMessage));
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+ }
+
+ /** create a node with two versions and test deleting them using delete version */
+ public void testFileItemDeleteVersion() {
+ IFileDAO fileDAO = (FileDAO)context.getBean("fileDAO", FileDAO.class);
+
+ NodeKey keys = testAddFileItem(TEXT_FILEPATH, TEXT_FILENAME,null,one);
+ checkFileNodeExist(fileDAO, keys.getUuid(), one, 1);
+ keys = testAddFileItem(BINARY_FILEPATH, BINARY_FILENAME,keys.getUuid(),two);
+ checkFileNodeExist(fileDAO, keys.getUuid(), two, 2);
+
+ deleteVersion(keys.getUuid(), two);
+ checkFileNodeExist(fileDAO, keys.getUuid(), one, 1);
+ checkFileNodeDoesNotExist(fileDAO, keys.getUuid(), two, 1);
+
+ deleteVersion(keys.getUuid(), one);
+ checkFileNodeDoesNotExist(fileDAO, keys.getUuid(), one, 0);
+ checkFileNodeDoesNotExist(fileDAO, keys.getUuid(), two, 0);
+ }
+
+ /** create a node with two versions and test deleting them using delete node */
+ public void testFileItemDeleteNode() {
+
+ IFileDAO fileDAO = (FileDAO)context.getBean("fileDAO", FileDAO.class);
+
+ NodeKey keys = testAddFileItem(TEXT_FILEPATH, TEXT_FILENAME,null,one);
+ checkFileNodeExist(fileDAO, keys.getUuid(), one, 1);
+ testAddFileItem(BINARY_FILEPATH, BINARY_FILENAME,keys.getUuid(),two);
+ checkFileNodeExist(fileDAO, keys.getUuid(), two, 2);
+
+ deleteNode(keys.getUuid());
+ checkFileNodeDoesNotExist(fileDAO, keys.getUuid(), one, 0);
+ checkFileNodeDoesNotExist(fileDAO, keys.getUuid(), two, 0);
+ }
+
+ /** create a node with two versions and test deleting them using delete node
+ * but first rig the files so one of them is already gone and the other one is
+ * read only. Note: java can delete a read only file - the status just
+ * stops you from writing it.
+ */
+ public void testFileItemDeleteNodeFileProb() {
+
+ IFileDAO fileDAO = (FileDAO)context.getBean("fileDAO", FileDAO.class);
+
+ NodeKey keys = testAddFileItem(TEXT_FILEPATH, TEXT_FILENAME,null,one);
+ checkFileNodeExist(fileDAO, keys.getUuid(), one, 1);
+ testAddFileItem(BINARY_FILEPATH, BINARY_FILENAME,keys.getUuid(),two);
+ checkFileNodeExist(fileDAO, keys.getUuid(), two, 2);
+
+ String expectProbPath = null;
+ try {
+ File file = new File(fileDAO.getFilePath(keys.getUuid(), one));
+ boolean success = file.delete();
+ assertTrue("Fudge deletion worked.", success);
+ file = new File(fileDAO.getFilePath(keys.getUuid(), two));
+ file.setReadOnly();
+ } catch (RepositoryCheckedException re) {
+ failUnexpectedException("testTextFileItem",re);
+ }
+
+ deleteNode(keys.getUuid());
+ checkFileNodeDoesNotExist(fileDAO, keys.getUuid(), one, 0);
+ checkFileNodeDoesNotExist(fileDAO, keys.getUuid(), two, 0);
+
+ }
+
+ private void checkFileNodeExist(IFileDAO fileDAO, Long uuid, Long version, int expectNumVersions) {
+
+ InputStream isOut = null;
+ try {
+ IVersionedNode node = repository.getFileItem(ticket, uuid, version);
+ isOut = node.getFile();
+ assertTrue("Input stream is returned.", isOut != null);
+ int ch = isOut.read();
+ assertTrue("Input stream can be read, first byte is "+ch, ch != -1);
+
+ SortedSet history = repository.getVersionHistory(ticket, uuid);
+ assertTrue("History contains "+history.size()+" objects, expected "+expectNumVersions,
+ history != null && history.size()==expectNumVersions);
+ Iterator iter = history.iterator();
+ while (iter.hasNext()) {
+ IVersionDetail element = (IVersionDetail) iter.next();
+ if ( element.getVersionId().longValue() == 1)
+ assertTrue("Description is "+element.getDescription()
+ +" as expected "+v1Description,
+ v1Description.equals(element.getDescription()));
+ else
+ assertTrue("Description is "+element.getDescription()
+ +" as expected "+v2Description,
+ v2Description.equals(element.getDescription()));
+ }
+
+ String filepath = fileDAO.getFilePath(uuid, version);
+ File file = new File(filepath);
+ assertTrue("File "+filepath+" exists. ", file.exists() );
+
+ } catch (RepositoryCheckedException re) {
+ failUnexpectedException("checkFileNode",re);
+ } catch (IOException ioe) {
+ failUnexpectedException("checkFileNode",ioe);
+ } finally {
+ try {
+ if ( isOut != null ) {
+ isOut.close();
+ }
+ } catch (IOException ioe1) {
+ System.err.println("Unable to close file");
+ ioe1.printStackTrace();
+ }
+ }
+ }
+
+ private void checkFileNodeDoesNotExist(IFileDAO fileDAO, Long uuid, Long version, int expectNumVersions) {
+
+ try {
+ try {
+ IVersionedNode node;
+ node = repository.getFileItem(ticket, uuid, version);
+ fail("Should have thrown ItemNotFoundException exception for uuid "
+ +uuid+" version "+version+" got node "+node);
+ } catch ( ItemNotFoundException e ) {
+ assertTrue("ItemNotFoundException thrown as expected", true);
+ }
+
+ try {
+
+ SortedSet history = repository.getVersionHistory(ticket, uuid);
+ if ( expectNumVersions > 0 )
+ assertTrue("History contains "+history.size()+" objects, expected "+expectNumVersions,
+ history != null && history.size()==expectNumVersions);
+ else
+ fail("Should have thrown ItemNotFoundException exception for uuid "
+ +uuid+" as all versions have been deleted so node should have been deleted.");
+
+ } catch ( ItemNotFoundException e ) {
+ if ( expectNumVersions > 0 )
+ fail("ItemNotFoundException thrown unexpectedly - there should be other versions! ");
+ else
+ assertTrue("ItemNotFoundException thrown as expected", true);
+ }
+
+ String filepath = fileDAO.getFilePath(uuid, version);
+ File file = new File(filepath);
+ assertTrue("File "+filepath+" does not exist. ", ! file.exists() );
+
+ // should the directory still be there?
+ int pos = file.getPath().lastIndexOf(File.separator+version);
+ String dirPath = file.getPath().substring(0,pos);
+ System.out.println("Checking dir path "+dirPath);
+ File dir = new File(dirPath);
+ if ( expectNumVersions > 0 ) {
+ assertTrue("Directory still exists for other files", dir.exists());
+ } else {
+ assertTrue("Directory removed", ! dir.exists());
+ }
+
+ } catch (RepositoryCheckedException re) {
+ re.printStackTrace();
+ failUnexpectedException("checkFileNodeDoesNotExist",re);
+ }
+
+
+ }
+
+ private void deleteVersion(Long uuid, Long version) {
+ try {
+ String[] problemFiles = repository.deleteVersion(ticket,uuid,version);
+ assertTrue("No problematic files should be found. "
+ +(problemFiles!=null ? problemFiles.length+" found":"")
+ ,problemFiles==null || problemFiles.length==0);
+ } catch (RepositoryCheckedException re) {
+ re.printStackTrace();
+ failUnexpectedException("checkFileNodeDoesNotExist",re);
+ }
+ }
+
+ private void deleteNode(Long uuid) {
+ try {
+ String[] problemFiles = repository.deleteNode(ticket,uuid);
+ assertTrue("No problematic files should be found. "
+ +(problemFiles!=null ? problemFiles.length+" found":"")
+ ,problemFiles==null || problemFiles.length==0);
+ } catch (RepositoryCheckedException re) {
+ re.printStackTrace();
+ failUnexpectedException("checkFileNodeDoesNotExist",re);
+ }
+ }
+
+ private NodeKey testAddFileItem(String filePath, String filename, Long uuid, Long expectedVersion) {
+
+ InputStream isIn = null;
+ NodeKey keys = null;
+ try {
+ File file = new File(filePath);
+ if ( ! file.exists() || file.isDirectory() ) {
+ fail("File "+filePath+" not found on computer or is a directory. Please set this variable to a known file that may be read on this computer."
+ +" Note: this is a shortcoming in the test, it is not a failure of the repository.");
+ }
+
+ isIn = new FileInputStream(file);
+
+ if ( uuid == null ) {
+ // new file
+ keys = repository.addFileItem(ticket, isIn, filename, null, v1Description);
+ assertTrue("File save returns uuid",keys != null && keys.getUuid() != null);
+ assertTrue("File save got expected version "+expectedVersion,
+ keys != null && keys.getVersion() != null
+ && keys.getVersion().equals(expectedVersion));
+ } else {
+ // update existing node
+ keys = repository.updateFileItem(ticket, uuid, filename,
+ isIn, null, v2Description);
+ assertTrue("File save returns same uuid",keys != null && keys.getUuid().equals(uuid));
+ assertTrue("File save got expected version "+expectedVersion,
+ keys != null && keys.getVersion() != null
+ && keys.getVersion().equals(expectedVersion));
+ }
+
+
+ } catch (RepositoryCheckedException re) {
+ failUnexpectedException("testAddFileItem",re);
+ } catch (IOException ioe) {
+ failUnexpectedException("testAddFileItem",ioe);
+ } finally {
+ try {
+ if ( isIn != null ) {
+ isIn.close();
+ }
+ } catch (IOException ioe1) {
+ System.err.println("Unable to close file");
+ ioe1.printStackTrace();
+ }
+ }
+
+ return keys;
+
+
+ }
+
+ public void testPackageItem() {
+ NodeKey keys = testPackageItem(null);
+ testPackageItem(keys.getUuid());
+ }
+
+ private NodeKey testPackageItem(Long uuid) {
+
+ String v1Description = "Draft";
+ String v2Description = "Final";
+ NodeKey keys = null;
+ try {
+ File directory = new File(PACKAGE_DIR_PATH);
+ if ( ! directory.exists() || ! directory.isDirectory() ) {
+ fail("Directory "+PACKAGE_DIR_PATH+" not found on computer or is not a directory. Please set this variable to a directory containing an index.html file and related files."
+ +" Note: this is a shortcoming in the test, it is not a failure of the repository.");
+ }
+ String[] filenames = directory.list();
+
+ if ( uuid == null ) {
+ keys = repository.addPackageItem(ticket, PACKAGE_DIR_PATH, "index.html", v1Description);
+ assertTrue("Package save returns uuid",keys != null && keys.getUuid() != null);
+ assertTrue("Package save got version 1",
+ keys != null && keys.getVersion() != null
+ && keys.getVersion().longValue() == 1);
+ } else {
+ keys = repository.updatePackageItem(ticket, uuid, PACKAGE_DIR_PATH, "index.html", v2Description);
+ assertTrue("Package save returns uuid",keys != null && keys.getUuid() != null);
+ assertTrue("Package save got version >1",
+ keys != null && keys.getVersion() != null
+ && keys.getVersion().longValue() > 1);
+ }
+
+ // try getting the start file - index.html
+ checkFileInPackage(keys, null);
+
+ // now try another file in the package
+ checkFileInPackage(keys, PACKAGE_TEST_FILE);
+
+ // check that there is the expected number of files in pacakge.
+ // expect an extra node over the number of files (for the package node)
+ List nodes = repository.getPackageNodes(ticket, keys.getUuid(), null);
+ assertTrue("Expected number of nodes found. Expected "
+ +(PACKAGE_NUM_FILES+1)+" got "
+ +(nodes != null ? nodes.size() : 0 ),
+ nodes != null && nodes.size() == (PACKAGE_NUM_FILES+1));
+ Iterator iter = nodes.iterator();
+ if ( iter.hasNext() ) {
+ SimpleVersionedNode packageNode = (SimpleVersionedNode) iter.next();
+ assertTrue("First node is the package node.",
+ packageNode.isNodeType(NodeType.PACKAGENODE));
+ }
+ while ( iter.hasNext() ) {
+ SimpleVersionedNode childNode = (SimpleVersionedNode) iter.next();
+ assertTrue("Child node is a file node.",
+ childNode.isNodeType(NodeType.FILENODE));
+ }
+
+ } catch (RepositoryCheckedException re) {
+ failUnexpectedException("testPackageItem",re);
+ } catch (IOException ioe) {
+ failUnexpectedException("testPackageItem",ioe);
+ }
+ return keys;
+ }
+
+ /**
+ * @param keys
+ * @param relPath
+ * @throws AccessDeniedException
+ * @throws ItemNotFoundException
+ * @throws FileException
+ * @throws IOException
+ */
+ private void checkFileInPackage(NodeKey keys, String relPath) throws AccessDeniedException, ItemNotFoundException, FileException, IOException {
+ IVersionedNode node = repository.getFileItem(ticket, keys.getUuid(), keys.getVersion());
+ InputStream isOut = node.getFile();
+ assertTrue("Input stream is returned for file path "+relPath, isOut != null);
+ try {
+ int ch = isOut.read();
+ assertTrue("Input stream can be read, first byte is "+ch, ch != -1);
+ } catch ( IOException e ) {
+ throw e;
+ } finally {
+ if (isOut != null)
+ isOut.close();
+ }
+ }
+
+ public void testLogout() {
+ // relogin then logout so that we don't affect the other tests.
+ ICredentials cred = new SimpleCredentials(INITIAL_WORKSPACE_USER, INITIAL_WORKSPACE_PASSWORD);
+ ITicket localTicket = null;
+ try {
+ localTicket = repository.login(cred, INITIAL_WORKSPACE);
+ assertTrue("Login okay",localTicket != null);
+ SortedSet history = repository.getVersionHistory(ticket, TEST_DATA_NODE_ID);
+ assertTrue("History can be accessed before logging out",true);
+ repository.logout(ticket);
+ } catch (RepositoryCheckedException e) {
+ failUnexpectedException("testLogout",e);
+ }
+
+ try {
+ Long id = ticket.getWorkspaceId();
+ assertTrue("Workspace id is not avaiable after logging out",id==null);
+ try {
+ SortedSet history = repository.getVersionHistory(ticket, TEST_DATA_NODE_ID);
+ fail("History shouldn't be available after logging out");
+ } catch (AccessDeniedException ade ) {
+ assertTrue("AccessDeniedException thrown as expected - can't get history after logging out",true);
+ }
+ } catch (RepositoryCheckedException e) {
+ failUnexpectedException("testLogout",e);
+ }
+ }
+
+ /** Checks that the system will give us an error if we get try to
+ * get a node that belongs to a different workspace to our ticket.
+ */
+ public void testWrongWorkspaceAccess() {
+ // relogin then logout so that we don't affect the other tests.
+ ICredentials cred = new SimpleCredentials(INITIAL_WORKSPACE_USER, INITIAL_WORKSPACE_PASSWORD);
+ ITicket localTicket = null;
+ try {
+ localTicket = repository.login(cred, SECONDARY_WORKSPACE);
+ assertTrue("Login okay",localTicket != null);
+ } catch (RepositoryCheckedException e) {
+ failUnexpectedException("testWrongWorkspaceAccess",e);
+ }
+
+ try {
+ // should fail as this node is in the INITIAL_WORKSPACE,
+ // not the SECONDARY_WORKSPACE
+ IVersionedNode node = repository.getFileItem(localTicket, TEST_DATA_NODE_ID, null);
+ fail("Node can be accessed for the wrong workspace.");
+ } catch (ItemNotFoundException e) {
+ assertTrue("ItemNotFoundException thrown as expected when getting node from wrong workspace.", true);
+ } catch (RepositoryCheckedException e) {
+ failUnexpectedException("testWrongWorkspaceAccess",e);
+ }
+
+ try {
+ // should fail as this node is in the INITIAL_WORKSPACE,
+ // not the SECONDARY_WORKSPACE
+ SortedSet history = repository.getVersionHistory(localTicket, TEST_DATA_NODE_ID);
+ fail("History can be accessed for the wrong workspace.");
+ } catch (ItemNotFoundException e) {
+ assertTrue("ItemNotFoundException thrown as expected when getting history for node from wrong workspace.", true);
+ } catch (RepositoryCheckedException e) {
+ failUnexpectedException("testWrongWorkspaceAccess",e);
+ }
+
+ try {
+ // be nice and clean up.
+ repository.logout(localTicket);
+ } catch (RepositoryCheckedException e) {
+ failUnexpectedException("testWrongWorkspaceAccess",e);
+ }
+ }
+
+
+}
Index: lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/TestSimpleTicket.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/Attic/TestSimpleTicket.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/TestSimpleTicket.java 28 Jan 2005 02:26:16 -0000 1.1
@@ -0,0 +1,59 @@
+/*
+ * Created on Jan 11, 2005
+ */
+package org.lamsfoundation.lams.contentrepository;
+
+import org.apache.log4j.Logger;
+import org.lamsfoundation.lams.contentrepository.AccessDeniedException;
+import org.lamsfoundation.lams.contentrepository.LoginException;
+import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException;
+
+/**
+ * Test the SimpleTicket class. Tests the methods for
+ * the ITicket interface.
+ *
+ * @author Fiona Malikoff
+ */
+public class TestSimpleTicket extends BaseTestCase {
+
+ protected Logger log = Logger.getLogger(TestSimpleTicket.class);
+
+ /**
+ * Constructor for TestSimpleTicket.
+ * @throws WorkspaceNotFoundException
+ * @throws AccessDeniedException
+ * @throws LoginException
+ */
+ public TestSimpleTicket() throws LoginException, AccessDeniedException, WorkspaceNotFoundException {
+ super();
+ }
+
+ /*
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /*
+ * @see TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testGetWorkspaceId() {
+ Long id = ticket.getWorkspaceId();
+ assertTrue("Ticket has workspaceId.", id != null );
+ assertTrue("Workspace id is "+id
+ +" as expected "+INITIAL_WORKSPACE_ID,
+ INITIAL_WORKSPACE_ID.equals(id));
+ }
+
+ public void testGetTicketId() {
+ String id = ticket.getTicketId();
+ assertTrue("Ticket has a ticketId.", id != null );
+ }
+
+
+}
Index: lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/TestSimpleVersionDetail.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/Attic/TestSimpleVersionDetail.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/TestSimpleVersionDetail.java 28 Jan 2005 02:26:16 -0000 1.1
@@ -0,0 +1,105 @@
+/*
+ * Created on Jan 10, 2005
+ */
+package org.lamsfoundation.lams.contentrepository;
+
+import java.util.Date;
+import java.util.Iterator;
+import java.util.TreeSet;
+
+import org.lamsfoundation.lams.contentrepository.IVersionDetail;
+import org.lamsfoundation.lams.contentrepository.SimpleVersionDetail;
+
+import junit.framework.TestCase;
+
+/**
+ * Checks creation and ordering of SimpleVersionDetail objects,
+ * using the IVersionDetail interface.
+ *
+ * Needs to be in the same package as SimpleVersionDetail
+ * to access protected constructor.
+ *
+ * @author Fiona Malikoff
+ */
+public class TestSimpleVersionDetail extends TestCase {
+
+ private IVersionDetail detail1a = null;
+ private IVersionDetail detail1aSame = null;
+ private IVersionDetail detail1b = null;
+ private IVersionDetail detail1c = null;
+ private IVersionDetail detail2 = null;
+ private IVersionDetail detailnull = null;
+
+ private static Date KNOWNDATE = new Date(0);
+ private static Long V1 = new Long(1);
+ private static Long V2 = new Long(1);
+
+ /*
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ Date dt = new Date(System.currentTimeMillis());
+ detail1a = new SimpleVersionDetail(new Long(1), KNOWNDATE, "1");
+ detail1aSame = new SimpleVersionDetail(new Long(1), KNOWNDATE, "1");
+ detail1b = new SimpleVersionDetail(new Long(1), dt, "2");
+ detail1c = new SimpleVersionDetail(new Long(1), dt, "3");
+ detail2 = new SimpleVersionDetail(new Long(2), dt, "4");
+ }
+
+ public void testGetCreatedDateTime() {
+ Date dt = detail1a.getCreatedDateTime();
+ assertTrue("Date is as expected. Expected "+KNOWNDATE+" got "+dt, KNOWNDATE.equals(dt));
+ }
+
+ public void testGetDescription() {
+ String desc = detail1b.getDescription();
+ assertTrue("Description is as expected. Expected 2 got "+desc, "2".equals(desc));
+ }
+
+ public void testGetVersionId() {
+ Long id = detail1c.getVersionId();
+ assertTrue("Description is as expected. Expected "+V1+" got "+id, V1.equals(id));
+ }
+
+ /*
+ * Class under test for boolean equals(Object)
+ */
+ public void testEqualsObject() {
+ assertTrue("Detail 1a and detail 1a same are equal as expected ",detail1a.equals(detail1aSame));
+ assertTrue("Detail 1a and detail 1b are different as expected ",!detail1a.equals(detail1b));
+ assertTrue("Detail 1b and detail 1c are different as expected ",!detail1b.equals(detail1c));
+ assertTrue("Detail 1a and detail 2 are different as expected ",!detail1b.equals(detail2));
+ assertTrue("Detail 1a and detailnull are different as expected ",!detail1a.equals(null));
+ }
+
+ public void testCompareTo() {
+ assertTrue("Null object comes at end of sort order (i.e. null is high)", detail2.compareTo(detailnull) < 0);
+ assertTrue("Detail 1a earlier in sort order than 1c (i.e. lower)", detail1a.compareTo(detail1c) < 0);
+ assertTrue("Detail 1a earlier in sort order than 1c (i.e. lower)", detail1a.compareTo(detail1c) < 0);
+ TreeSet sortedSet = new TreeSet();
+ sortedSet.add(detail1c);
+ sortedSet.add(detail2);
+ sortedSet.add(detail1a);
+ sortedSet.add(detail1b);
+ Iterator iter = sortedSet.iterator();
+ int i = 1;
+ while ( iter.hasNext() ) {
+ IVersionDetail detail = (IVersionDetail) iter.next();
+ switch ( i ) {
+ case 1: assertTrue("First object is detail1a", detail.equals(detail1a));
+ break;
+ case 2: assertTrue("First object is detail1b", detail.equals(detail1b));
+ break;
+ case 3: assertTrue("First object is detail1c", detail.equals(detail1c));
+ break;
+ case 4: assertTrue("First object is detail2", detail.equals(detail2));
+ break;
+ default: fail("More objects in set than expected. Object was "+detail);
+ }
+ i++;
+ }
+ }
+
+}
Index: lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/TestSimpleVersionedNode.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/Attic/TestSimpleVersionedNode.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/TestSimpleVersionedNode.java 28 Jan 2005 02:26:16 -0000 1.1
@@ -0,0 +1,583 @@
+/*
+ * Created on Jan 6, 2005
+ */
+package org.lamsfoundation.lams.contentrepository;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.SortedSet;
+
+import org.apache.log4j.Logger;
+import org.lamsfoundation.lams.contentrepository.AccessDeniedException;
+import org.lamsfoundation.lams.contentrepository.CrNodeVersionProperty;
+import org.lamsfoundation.lams.contentrepository.CrWorkspace;
+import org.lamsfoundation.lams.contentrepository.FileException;
+import org.lamsfoundation.lams.contentrepository.IValue;
+import org.lamsfoundation.lams.contentrepository.IVersionDetail;
+import org.lamsfoundation.lams.contentrepository.IVersionedNode;
+import org.lamsfoundation.lams.contentrepository.IVersionedNodeAdmin;
+import org.lamsfoundation.lams.contentrepository.ItemExistsException;
+import org.lamsfoundation.lams.contentrepository.NoSuchNodeTypeException;
+import org.lamsfoundation.lams.contentrepository.NodeType;
+import org.lamsfoundation.lams.contentrepository.PropertyName;
+import org.lamsfoundation.lams.contentrepository.PropertyType;
+import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
+import org.lamsfoundation.lams.contentrepository.SimpleVersionedNode;
+import org.lamsfoundation.lams.contentrepository.ValidationException;
+import org.lamsfoundation.lams.contentrepository.ValueFormatException;
+import org.lamsfoundation.lams.contentrepository.dao.hibernate.WorkspaceDAO;
+
+
+
+
+/**
+ * @author Fiona Malikoff
+ *
+ * Test the non-persistence related features of a SimpleVersionedNode.
+ * Unable to test the ids as these are generated when written to the database.
+ *
+ * When running tests, please make sure the FILEPATH is set to a file on your PC
+ * or comment out the file tests.
+ *
+ * Needs to be in the same package as SimpleVersionedNode
+ * to access protected methods.
+ */
+public class TestSimpleVersionedNode extends BaseTestCase {
+
+ protected Logger log = Logger.getLogger(TestSimpleVersionedNode.class);
+
+ /**
+ * Constructor for TestSimpleVersionedNode. Called for each test, so the stuff
+ * is sets up is static and is only done once.
+ * @param arg0
+ * @throws RepositoryCheckedException
+ * @throws NoSuchNodeTypeException
+ * @throws ItemExistsException
+ */
+ public TestSimpleVersionedNode() throws ItemExistsException, NoSuchNodeTypeException, RepositoryCheckedException {
+ super();
+ }
+
+ /*
+ * Class under test for void setProperty(String, IValue)
+ */
+ public void testSetPropertyStringIValue() {
+ IValue value = new CrNodeVersionProperty("IVALUE name",
+ "IVALUE value", PropertyType.STRING, null);
+ }
+
+ /*
+ * Guts of tests for setProperty calls using implied types and explicit types.
+ * For implied types, past it in as its own object type (Boolean, Double, etc) and leave type null.
+ * For explicit types, past it in as a string and set type to the appropriate type.
+ */
+ private void testSetProperty(String name, Object value, Integer type, String expectedString,
+ Boolean expectedBoolean, Long expectedLong, Double expectedDouble, Calendar expectedCalendar)
+ {
+ SimpleVersionedNode testNode = getTestNode();
+ try {
+ if ( type != null ) {
+ testNode.setProperty(name, (String)value, type.intValue());
+ } else if ( String.class.isInstance(value) )
+ testNode.setProperty(name, (String)value );
+ else if ( Boolean.class.isInstance(value) )
+ testNode.setProperty(name, ((Boolean)value).booleanValue() );
+ else if ( Double.class.isInstance(value) )
+ testNode.setProperty(name, ((Double)value).doubleValue() );
+ else if ( Long.class.isInstance(value) )
+ testNode.setProperty(name, ((Long)value).longValue() );
+ else if ( Calendar.class.isInstance(value) )
+ testNode.setProperty(name, (Calendar)value );
+ } catch (Exception e) {
+ failUnexpectedException(e);
+ }
+
+ try {
+ testNode.save(null, null);
+ } catch (Exception e) {
+ failUnexpectedException(e);
+ }
+
+ IValue iValue = null;
+ IVersionedNode rereadNode = getTestNode();
+ assertTrue("Able to reread node", rereadNode != null);
+ iValue = rereadNode.getProperty(name);
+ assertTrue("Property for name "+name+" was able to be read from db.",iValue != null);
+
+ if ( expectedString != null ) {
+ try {
+ String val = iValue.getString();
+ assertTrue("Property accessable as string ("+val+")",
+ expectedString.equals(val));
+ } catch (ValueFormatException e1) {
+ e1.printStackTrace();
+ fail("ValueFormatException thrown unexpectedly. "+e1.getMessage());
+ }
+ } else {
+ try {
+ String val = iValue.getString();
+ fail("ValueFormatException exception expected. Value returned as "+val);
+ } catch (ValueFormatException e1) {
+ assertTrue("ValueFormatException thrown as expected",true);
+ }
+ }
+
+ if ( expectedBoolean != null ) {
+ try {
+ boolean val = iValue.getBoolean();
+ assertTrue("Property accessable as boolean ("+val+")",
+ val == expectedBoolean.booleanValue());
+ } catch (ValueFormatException e1) {
+ failUnexpectedException(e1);
+ }
+ } else {
+ try {
+ boolean val = iValue.getBoolean();
+ fail("ValueFormatException exception expected. Value returned as "+val);
+ } catch (ValueFormatException e1) {
+ assertTrue("ValueFormatException thrown as expected",true);
+ }
+ }
+
+ if ( expectedLong != null ) {
+ try {
+ long val = iValue.getLong();
+ assertTrue("Property accessable as long ("+val+")",
+ val == expectedLong.longValue());
+ } catch (ValueFormatException e1) {
+ e1.printStackTrace();
+ fail("ValueFormatException thrown unexpectedly. "+e1.getMessage());
+ }
+ } else {
+ try {
+ long val = iValue.getLong();
+ fail("ValueFormatException exception expected. Value returned as "+val);
+ } catch (ValueFormatException e1) {
+ assertTrue("ValueFormatException thrown as expected",true);
+ }
+ }
+
+ if ( expectedDouble != null ) {
+ try {
+ double val = iValue.getDouble();
+ assertTrue("Property accessable as long ("+val+")",
+ val == expectedDouble.doubleValue());
+ } catch (ValueFormatException e1) {
+ e1.printStackTrace();
+ fail("ValueFormatException thrown unexpectedly. "+e1.getMessage());
+ }
+ } else {
+ try {
+ double val = iValue.getLong();
+ fail("ValueFormatException exception expected. Value returned as "+val);
+ } catch (ValueFormatException e1) {
+ assertTrue("ValueFormatException thrown as expected",true);
+ }
+ }
+
+ if ( expectedCalendar != null ) {
+ try {
+ Calendar val = iValue.getDate();
+ assertTrue("Property accessable as string ("+val+")",
+ expectedCalendar.equals(val));
+ } catch (ValueFormatException e1) {
+ e1.printStackTrace();
+ fail("ValueFormatException thrown unexpectedly. "+e1.getMessage());
+ }
+ } else {
+ try {
+ Calendar val = iValue.getDate();
+ fail("ValueFormatException exception expected. Value returned as "+val);
+ } catch (ValueFormatException e1) {
+ assertTrue("ValueFormatException thrown as expected",true);
+ }
+ }
+
+ testNode = null;
+ }
+
+ /*
+ * Class under test for void setProperty(String, String, int)
+ * Integer type, String expectedString,
+ Boolean expectedBoolean, Long expectedLong, Double expectedDouble, Calendar expectedCalendar)
+ */
+ public void testSetPropertySpecifiedType() {
+ testSetProperty("NAME STRING", "VALUE STRING", new Integer(PropertyType.STRING),
+ "VALUE STRING", Boolean.FALSE, null, null, null);
+ testSetProperty("NAME STRING 100.01", "100.01", new Integer(PropertyType.STRING),
+ "100.01", Boolean.FALSE, null, new Double(100.01), null);
+// calendar test! testSetPropertyImpliedType("NAME STRING 100.01", "100.01", new Integer(PropertyType.STRING),
+// "VALUE STRING", Boolean.FALSE, new Long(100), new Double(100.01), null);
+ testSetProperty("NAME BOOLEAN True", "True", new Integer(PropertyType.BOOLEAN),
+ "True", Boolean.TRUE, null, null, null);
+ testSetProperty("NAME LONG 100", "100", new Integer(PropertyType.LONG),
+ "100", Boolean.FALSE, new Long(100), new Double(100), null);
+ testSetProperty("NAME DOUBLE 100.02", "100.02", new Integer(PropertyType.DOUBLE),
+ "100.02", Boolean.FALSE, null, new Double(100.02), null);
+// calendar test! testSetPropertyImpliedType("NAME CALENDAR ???", "???", new Integer(PropertyType.CALENDAR),
+// "???", Boolean.FALSE, null, null, value);
+ }
+
+ /*
+ * Class under test for void setProperty(String, String)
+ */
+ public void testSetPropertyStringString() {
+ testSetProperty("NAME STRING2", "VALUE STRING2", null,
+ "VALUE STRING2", Boolean.FALSE, null, null, null);
+ testSetProperty("NAME STRING 200.01", "200.01", new Integer(PropertyType.STRING),
+ "200.01", Boolean.FALSE, null, new Double(200.01), null);
+// calendar test! testSetPropertyImpliedType("NAME STRING 100.01", "100.01", new Integer(PropertyType.STRING),
+// "VALUE STRING", Boolean.FALSE, new Long(100), new Double(100.01), null);
+ }
+
+ /*
+ * Class under test for void setProperty(String, boolean)
+ */
+ public void testSetPropertyStringboolean() {
+ testSetProperty("NAME BOOLEAN True", Boolean.TRUE, null,
+ "true", Boolean.TRUE, null, null, null);
+ }
+
+ /*
+ * Class under test for void setProperty(String, double)
+ */
+ public void testSetPropertyStringdouble() {
+ testSetProperty("NAME DOUBLE 200.02", new Double(200.02), null,
+ "200.02", Boolean.FALSE, null, new Double(200.02), null);
+ }
+
+ /*
+ * Class under test for void setProperty(String, long)
+ */
+ public void testSetPropertyStringlong() {
+ testSetProperty("NAME LONG 200", new Long(200), null,
+ "200", Boolean.FALSE, new Long(200), new Double(200), null);
+ }
+
+ /*
+ * Class under test for void setProperty(String, Calendar)
+ */
+ public void testSetPropertyStringCalendar() {
+// calendar test! testSetPropertyImpliedType("NAME CALENDAR ???", "???", new Integer(PropertyType.CALENDAR),
+// "???", Boolean.FALSE, null, null, value);
+ }
+
+ /*
+ * Class under test for void setProperty(String, IValue)
+ */
+ public void testClearPropertyStringIValue() {
+ // set the value
+ String name = "TO DELETE";
+ String value = "This value is to be deleted."+System.currentTimeMillis();
+
+ try {
+ SimpleVersionedNode testNode = getTestNode();
+ testNode.setProperty(name, value, PropertyType.STRING);
+ testNode.save(null, null);
+
+ IValue iValue = null;
+ IVersionedNode rereadNode = getTestNode();
+ assertTrue("Able to reread node", rereadNode != null);
+ iValue = rereadNode.getProperty(name);
+ assertTrue("Property for name "+name+" was able to be read from db.",iValue != null);
+ assertTrue("Property contained expected data "+value,value.equals(iValue.getString()));
+
+ // delete the value. Row in db should be deleted.
+ testNode = getTestNode();
+ testNode.setProperty(name, null, PropertyType.STRING);
+ testNode.save(null, null);
+
+ iValue = null;
+ rereadNode = getTestNode();
+ assertTrue("Able to reread node", rereadNode != null);
+ iValue = rereadNode.getProperty(name);
+ assertTrue("Property for name "+name+" was not in the db.",iValue == null);
+ } catch (RepositoryCheckedException e) {
+ e.printStackTrace();
+ fail("RepositoryCheckedException thrown unexpectedly. "+e.getMessage());
+ }
+ }
+
+ public void testGetProperties() {
+ Set properties = null;
+ IVersionedNodeAdmin testNode = getNode(INITIAL_WORKSPACE_ID, TEST_FILE_NODE_ID);
+ properties = testNode.getProperties();
+ int num = properties != null ? properties.size() : -1;
+ assertTrue("Expect that node has 3 property, finds "+num+" properties.",num==3);
+ testNode = null;
+ }
+
+ public void testHasProperty() {
+ IVersionedNodeAdmin testNode = getTestNode();
+ assertTrue("Test node has version desc property ",testNode.hasProperty(PropertyName.VERSIONDESC));
+ testNode = null;
+ }
+
+ public void testHasProperties() {
+ IVersionedNodeAdmin testNode = getTestNode();
+ assertTrue("Test node has properties ",testNode.hasProperties());
+ testNode = null;
+ }
+
+ public void testGetNodeType() {
+ IVersionedNodeAdmin testNode = getTestNode();
+ String nodeType = testNode.getNodeType();
+ assertTrue("Test node has node type, should be DATANODE, returned as "+nodeType,
+ NodeType.DATANODE.equals(nodeType));
+ testNode = null;
+ }
+
+ public void testIsNodeType() {
+ IVersionedNodeAdmin testNode = getTestNode();
+ assertTrue("Test node is correct DATANODE type",
+ testNode.isNodeType(NodeType.DATANODE));
+ testNode = null;
+ }
+
+ public void testGetVersionHistory() {
+ IVersionedNodeAdmin testNode = getTestNode();
+
+ SortedSet history = testNode.getVersionHistory();
+ assertTrue("history exists and is not empty ",
+ history != null && ! history.isEmpty());
+ Iterator iter = history.iterator();
+ Long previousVersionId = null;
+
+ while (iter.hasNext()) {
+
+ IVersionDetail element = (IVersionDetail) iter.next();
+ assertTrue("Version id is a +ve long",
+ element.getVersionId() != null &&
+ element.getVersionId().longValue() > 0 );
+
+ assertTrue("Version has a date",
+ element.getCreatedDateTime() != null);
+
+ if ( previousVersionId != null &&
+ previousVersionId.longValue() > element.getVersionId().longValue() ) {
+ fail("Version history is in wrong order");
+ }
+ previousVersionId = element.getVersionId();
+ }
+
+ testNode = null;
+ }
+
+ public void testGetPath() {
+ IVersionedNodeAdmin testNode = getTestNode();
+ String val = testNode.getPath();
+ assertTrue("Test node should have path "+TEST_NODE_PATH+" has path "+val,
+ TEST_NODE_PATH.equals(val));
+ testNode = null;
+ }
+
+ public void testGetVersion() {
+ IVersionedNodeAdmin testNode = getTestNode();
+ Long version = testNode.getVersion();
+ assertTrue("Test node is initial version.",version != null && version.longValue()==2);
+ testNode = null;
+ }
+
+ public void testGetCreatedDateTime() {
+ IVersionedNodeAdmin testNode = getTestNode();
+ Date dt = testNode.getCreatedDateTime();
+ assertTrue("Test node has a created date time.",dt != null);
+ testNode = null;
+ }
+
+ public void testAddNode() {
+ Long fileNodeUUID = null;
+ Long dataNodeUUID = null;
+ Long packageNodeUUID = null;
+ try {
+ // file nodes are tested in another test
+ SimpleVersionedNode dataNode = createNode(INITIAL_WORKSPACE_ID, NodeType.DATANODE);
+
+ SimpleVersionedNode packageNode = createNode(INITIAL_WORKSPACE_ID, NodeType.PACKAGENODE);
+ packageNode.setProperty(PropertyName.INITIALPATH,"index.html");
+
+ assertTrue("2 nodes created, but not saved into database ",
+ dataNode != null && dataNode.getUUID() == null
+ && packageNode != null && packageNode.getUUID() == null);
+
+ saveCheckNode("Data", NodeType.DATANODE, dataNode);
+ saveCheckNode("Package", NodeType.PACKAGENODE, packageNode);
+
+ } catch ( Exception e ) {
+ failUnexpectedException(e);
+ }
+
+ }
+
+ public void testTextFileNode() {
+ Long uuid = testFileNodeInternal(TEXT_FILEPATH, TEXT_FILENAME, null);
+ testFileNodeInternal(TEXT_FILEPATH, TEXT_FILENAME, uuid);
+ }
+
+ public void testBinaryFileNode() {
+ Long uuid = testFileNodeInternal(BINARY_FILEPATH, BINARY_FILENAME, null);
+ testFileNodeInternal(BINARY_FILEPATH, BINARY_FILENAME, uuid);
+ }
+
+ /*
+ * Tests a file node using the given filePath.
+ * Will also make sure it can't add the file to a data node.
+ * if repositoryEntryExists == true then assume that there should
+ * already be a file in the directory hence an error will be thrown.
+ */
+ private Long testFileNodeInternal(String filePath, String filename, Long uuid) {
+
+ FileInputStream is = null;
+ InputStream newIs = null;
+ SimpleVersionedNode fileNode = null;
+ Long newUuid = uuid;
+ IVersionedNodeAdmin testNode = getTestNode();
+
+ try {
+ File file = new File(filePath);
+ if ( ! file.exists() || file.isDirectory() ) {
+ fail("File "+filePath+" not found on computer or is a directory. Please set this variable to a known file that may be read on this computer."
+ +" Note: this is a shortcoming in the test, it is not a failure of the repository.");
+ }
+
+ is = new FileInputStream(file);
+
+ // first try adding the file to a data node. Should fail as that's not allowed
+ try {
+ testNode.setFile(is, filename, null);
+ } catch (RepositoryCheckedException e) {
+ assertTrue("Exception thrown as test node will not accept an input stream - it is only a data node. "
+ +e.getMessage(),e.getMessage().indexOf("Node must be of type FILE_NODE") != -1);
+ }
+
+ // now try adding to a new filenode. Check that it enforces a file stream and the name,
+ // before writing it out properly
+ if ( newUuid == null ) {
+ fileNode = createNode(INITIAL_WORKSPACE_ID, NodeType.FILENODE);
+ } else {
+ fileNode = (SimpleVersionedNode) getNode(INITIAL_WORKSPACE_ID, newUuid);
+ }
+
+ try {
+ fileNode.setFile(null, filename, null);
+ } catch (RepositoryCheckedException e) {
+ assertTrue("Exception thrown as input stream is missing",
+ e.getMessage().indexOf("InputStream is required.")!=-1);
+ }
+
+ try {
+ fileNode.setFile(is, null, null);
+ } catch (RepositoryCheckedException e) {
+ assertTrue("Exception thrown as filename is missing",
+ e.getMessage().indexOf("Filename is required.")!=-1);
+ }
+
+ fileNode.setFile(is, filename, null);
+ saveCheckNode("File", NodeType.FILENODE, fileNode);
+ newUuid = fileNode.getUUID();
+ newIs = fileNode.getFile();
+ assertTrue("File node has an input stream.",newIs != null);
+
+ } catch (FileNotFoundException fe) {
+ fail("File "+filePath+" not found on computer. Please set this variable to a known file that may be read on this computer."
+ +" Note: this is a shortcoming in the test, it is not a failure of the repository.");
+ } catch (FileException fe2) {
+ if ( uuid != null && fe2.getMessage().indexOf("exists")!=-1) {
+ assertTrue("File exists error thrown as expected.", true);
+ } else {
+ fe2.printStackTrace();
+ fail("Exception thrown unexpectedly. "+fe2.getMessage());
+ }
+
+ } catch (RepositoryCheckedException e2) {
+ e2.printStackTrace();
+ fail("Exception thrown unexpectedly. "+e2.getMessage());
+ } finally {
+ if ( is != null ) {
+ try {
+ is.close();
+ } catch (IOException e1) {
+ System.err.println("Unable to close input file - was there a failure ?");
+ e1.printStackTrace();
+ }
+ }
+
+ if ( newIs != null ) {
+ try {
+ newIs.close();
+ } catch (IOException e1) {
+ System.err.println("Unable to close reread file");
+ e1.printStackTrace();
+ }
+ }
+ }
+ testNode = null;
+ return newUuid;
+ }
+
+ /**
+ * @param nodeDesc
+ * @param expectedType
+ * @param fileNode
+ * @throws ValidationException
+ * @throws RepositoryCheckedException
+ */
+ private void saveCheckNode(String nodeDesc, String expectedType, SimpleVersionedNode nodeToSave)
+ throws ValidationException, RepositoryCheckedException {
+ Long nodeUUID;
+ nodeToSave.save(null, null);
+ nodeUUID = nodeToSave.getUUID();
+ assertTrue(nodeDesc+" Node saved in database, assigned a UUID", nodeUUID != null);
+
+ IVersionedNode retrievedNode = getNode(INITIAL_WORKSPACE_ID, nodeUUID);
+ assertTrue(nodeDesc+" Node can be retrieved, has correct UUID",
+ retrievedNode != null && retrievedNode.getUUID().equals(nodeUUID));
+ assertTrue(nodeDesc+" Node is of expected type. Expected "+expectedType+" found "+retrievedNode.getNodeType(),
+ retrievedNode.isNodeType(expectedType));
+ }
+
+ public void testAddNodeBadType() {
+ try {
+ SimpleVersionedNode newNode = createNode(INITIAL_WORKSPACE_ID, "XYZ");
+ newNode.save(null, null);
+ fail("NoSuchNodeTypeException should have been thrown");
+ } catch (Exception e) {
+ if ( NoSuchNodeTypeException.class.isInstance(e) ) {
+ assertTrue("NoSuchNodeTypeException thrown as expected ",true);
+ } else {
+ e.printStackTrace();
+ fail("Exception thrown unexpectedly. "+e.getMessage());
+ }
+ }
+
+ }
+
+ /** Normally this functionality is handled by the repository object
+ * but this test case is trying to test the stuff below the repository
+ * object
+ * @return Node
+ * @throws NoSuchNodeTypeException
+ * @throws AccessDeniedException
+ */
+ protected SimpleVersionedNode createNode(Long workspaceId, String nodeType) throws NoSuchNodeTypeException, AccessDeniedException {
+
+ SimpleVersionedNode newNode = (SimpleVersionedNode)context.getBean("node", SimpleVersionedNode.class);
+ WorkspaceDAO workspaceDAO = (WorkspaceDAO)context.getBean("workspaceDAO");
+
+ CrWorkspace workspace = (CrWorkspace) workspaceDAO.find(CrWorkspace.class, workspaceId);
+ if ( workspace == null ) {
+ fail("Workspace id="+workspaceId+" does not exist.");
+ }
+
+ newNode.initialiseNode(null,nodeType,workspace,null);
+ return newNode;
+ }
+
+}
Index: lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/dao/file/TestFileDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/dao/file/Attic/TestFileDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_contentrepository/test/java/org/lamsfoundation/lams/contentrepository/dao/file/TestFileDAO.java 28 Jan 2005 02:26:16 -0000 1.1
@@ -0,0 +1,83 @@
+/*
+ * Created on Jan 10, 2005
+ */
+package org.lamsfoundation.lams.contentrepository.dao.file;
+
+import org.lamsfoundation.lams.contentrepository.BaseTestCase;
+import org.lamsfoundation.lams.contentrepository.FileException;
+import org.lamsfoundation.lams.contentrepository.dao.file.FileDAO;
+
+
+/**
+ * @author Fiona Malikoff
+ *
+ * Tests just the generation of file names. The actual writing is
+ * tested via the save/get file functions on SimpleVersionedNode
+ */
+public class TestFileDAO extends BaseTestCase {
+
+ Long idEven = null;
+ Long idUneven = null;
+ Long v1 = null;
+ Long v101 = null;
+ static FileDAO fileDAO = null;
+
+ public void setUp() {
+ if ( fileDAO == null ) {
+ fileDAO = (FileDAO)context.getBean("fileDAO", FileDAO.class);
+ }
+ }
+
+ public void testGenerateFilePathEven1() {
+ String paths[] = null;
+ try {
+ paths = fileDAO.generateFilePath(new Long(140412),new Long(1));
+ assertTrue("Directory path ends with \\14\\04\\12 and file path ends with /14/04/12/1",
+ paths[0].endsWith("\\14\\04\\12") && paths[1].endsWith("\\14\\04\\12\\1"));
+ System.out.println("Directory path is "+paths[0]);
+ } catch (FileException e) {
+ e.printStackTrace();
+ fail("Unexpected exception thrown "+e.getMessage()+" paths "+paths);
+ }
+ }
+
+ public void testGenerateFilePathEven101() {
+ String paths[] = null;
+ try {
+ paths = fileDAO.generateFilePath(new Long(140412),new Long(101));
+ assertTrue("Directory path ends with \\14\\04\\12 and file path ends with \\14\\04\\12\\101",
+ paths[0].endsWith("\\14\\04\\12") && paths[1].endsWith("\\14\\04\\12\\101"));
+ System.out.println("Directory path is "+paths[0]);
+ } catch (FileException e) {
+ e.printStackTrace();
+ fail("Unexpected exception thrown "+e.getMessage()+" paths "+paths);
+ }
+ }
+
+ public void testGenerateFilePathOdd1() {
+ String paths[] = null;
+ try {
+ paths = fileDAO.generateFilePath(new Long(12345),new Long(1));
+ assertTrue("Directory path ends with \\01\\23\\45 and file path ends with \\01\\23\\45\\1",
+ paths[0].endsWith("\\01\\23\\45") && paths[1].endsWith("\\01\\23\\45\\1"));
+ System.out.println("Directory path is "+paths[0]);
+ } catch (FileException e) {
+ e.printStackTrace();
+ fail("Unexpected exception thrown "+e.getMessage()+" paths "+paths);
+ }
+ }
+
+ public void testGenerateFilePathOdd101() {
+ String paths[] = null;
+ try {
+ paths = fileDAO.generateFilePath(new Long(12345),new Long(101));
+ assertTrue("Directory path ends with \\01\\23\\45 and file path ends with \\01\\23\\45\\101",
+ paths[0].endsWith("\\01\\23\\45") && paths[1].endsWith("\\01\\23\\45\\101"));
+ System.out.println("Directory path is "+paths[0]);
+ } catch (FileException e) {
+ e.printStackTrace();
+ fail("Unexpected exception thrown "+e.getMessage()+" paths "+paths);
+ }
+
+ }
+}
Index: lams_contentrepository/web/nodeSelection.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/web/nodeSelection.jsp,v
diff -u -r1.7 -r1.8
--- lams_contentrepository/web/nodeSelection.jsp 25 Jan 2005 03:39:05 -0000 1.7
+++ lams_contentrepository/web/nodeSelection.jsp 28 Jan 2005 02:26:30 -0000 1.8
@@ -1,11 +1,11 @@
<%@ page language="java"%>
<%@ page import="java.util.*"%>
-<%@ page import="com.lamsinternational.lams.contentrepository.IValue"%>
-<%@ page import="com.lamsinternational.lams.contentrepository.IVersionDetail"%>
-<%@ page import="com.lamsinternational.lams.contentrepository.IVersionedNode"%>
-<%@ page import="com.lamsinternational.lams.contentrepository.PropertyName"%>
-<%@ page import="com.lamsinternational.lams.contentrepository.NodeType"%>
+<%@ page import="org.lamsfoundation.lams.contentrepository.IValue"%>
+<%@ page import="org.lamsfoundation.lams.contentrepository.IVersionDetail"%>
+<%@ page import="org.lamsfoundation.lams.contentrepository.IVersionedNode"%>
+<%@ page import="org.lamsfoundation.lams.contentrepository.PropertyName"%>
+<%@ page import="org.lamsfoundation.lams.contentrepository.NodeType"%>
<%@ taglib uri="/WEB-INF/struts/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts/struts-html.tld" prefix="html" %>
Index: lams_contentrepository/web/packageList.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/web/packageList.jsp,v
diff -u -r1.1 -r1.2
--- lams_contentrepository/web/packageList.jsp 25 Jan 2005 03:39:05 -0000 1.1
+++ lams_contentrepository/web/packageList.jsp 28 Jan 2005 02:26:30 -0000 1.2
@@ -1,9 +1,9 @@
<%@ page language="java"%>
<%@ page import="java.util.*"%>
-<%@ page import="com.lamsinternational.lams.contentrepository.IValue"%>
-<%@ page import="com.lamsinternational.lams.contentrepository.IVersionedNode"%>
-<%@ page import="com.lamsinternational.lams.contentrepository.PropertyName"%>
+<%@ page import="org.lamsfoundation.lams.contentrepository.IValue"%>
+<%@ page import="org.lamsfoundation.lams.contentrepository.IVersionedNode"%>
+<%@ page import="org.lamsfoundation.lams.contentrepository.PropertyName"%>
<%@ taglib uri="/WEB-INF/struts/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts/struts-html.tld" prefix="html" %>
Index: lams_contentrepository/web/WEB-INF/web.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_contentrepository/web/WEB-INF/Attic/web.xml,v
diff -u -r1.2 -r1.3
--- lams_contentrepository/web/WEB-INF/web.xml 21 Jan 2005 04:12:30 -0000 1.2
+++ lams_contentrepository/web/WEB-INF/web.xml 28 Jan 2005 02:26:30 -0000 1.3
@@ -22,16 +22,31 @@