diff --git a/src/java/DmWebPortal/Makefile b/src/java/DmWebPortal/Makefile deleted file mode 100644 index d4bddb4d18470f97634997ba5de642c70364acc4..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -TOP=../../.. -ANT=dm-ant -ANT_ARGS=-Dlibs.CopyLibs.classpath=lib/org-netbeans-modules-java-j2seproject-copylibstask.jar -BUILD_PROPERTIES_FILE=nbproject/private/private.properties -GENERIC_BUILD_PROPERTIES_FILE=$(BUILD_PROPERTIES_FILE).generic.build - -all install: dist - -clean clean-all clean-install distclean: ant-clean - -.PHONY: propertiesFile -propertiesFile: - if [ ! -f $(BUILD_PROPERTIES_FILE) ]; then cmd="cat $(GENERIC_BUILD_PROPERTIES_FILE) | sed 's?DM_GLASSFISH_DIR?$${DM_GLASSFISH_DIR}?g' > $(BUILD_PROPERTIES_FILE)" && eval $$cmd ; fi - -.PHONY: ant-clean -ant-clean: propertiesFile - $(ANT) $(ANT_ARGS) clean - -# For compiling from command line, we have to use generic build properties file -.PHONY: dist -dist: propertiesFile - if [ -f $(BUILD_PROPERTIES_FILE) ]; then mv $(BUILD_PROPERTIES_FILE) $(BUILD_PROPERTIES_FILE).orig; fi - cmd="cat $(GENERIC_BUILD_PROPERTIES_FILE) | sed 's?DM_GLASSFISH_DIR?$${DM_GLASSFISH_DIR}?g' > $(BUILD_PROPERTIES_FILE)" && eval $$cmd - $(ANT) $(ANT_ARGS) dist - if [ -f $(BUILD_PROPERTIES_FILE).orig ]; then mv $(BUILD_PROPERTIES_FILE).orig $(BUILD_PROPERTIES_FILE); fi - diff --git a/src/java/DmWebPortal/build.xml b/src/java/DmWebPortal/build.xml deleted file mode 100644 index b34cfa82c5d34de3710a4eb92fa4c2340a958ecc..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/build.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<!-- By default, only the Clean and Build commands use this build script. --> -<!-- Commands such as Run, Debug, and Test only use this build script if --> -<!-- the Compile on Save feature is turned off for the project. --> -<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> -<!-- in the project's Project Properties dialog box.--> -<project name="DmWebPortal" default="default" basedir="."> - <description>Builds, tests, and runs the project DmWebPortal.</description> - <import file="nbproject/build-impl.xml"/> - <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-single: called before javac compilation of single file - -post-compile-single: called after javac compilation of single file - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-compile-test-single: called before javac compilation of single JUnit test - -post-compile-test-single: called after javac compilation of single JUunit test - -pre-dist: called before archive building - -post-dist: called after archive building - -post-clean: called after cleaning build products - -pre-run-deploy: called before deploying - -post-run-deploy: called after deploying - - Example of pluging an obfuscator after the compilation could look like - - <target name="-post-compile"> - <obfuscate> - <fileset dir="${build.classes.dir}"/> - </obfuscate> - </target> - - For list of available properties check the imported - nbproject/build-impl.xml file. - - - Other way how to customize the build is by overriding existing main targets. - The target of interest are: - - init-macrodef-javac: defines macro for javac compilation - init-macrodef-junit: defines macro for junit execution - init-macrodef-debug: defines macro for class debugging - do-dist: archive building - run: execution of project - javadoc-build: javadoc generation - - Example of overriding the target for project execution could look like - - <target name="run" depends="<PROJNAME>-impl.jar"> - <exec dir="bin" executable="launcher.exe"> - <arg file="${dist.jar}"/> - </exec> - </target> - - Notice that overridden target depends on jar target and not only on - compile target as regular run target does. Again, for list of available - properties which you can use check the target you are overriding in - nbproject/build-impl.xml file. - - --> -</project> diff --git a/src/java/DmWebPortal/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/src/java/DmWebPortal/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar deleted file mode 100644 index 14c3bbbf50780fcdd7e29a43c3b6b416f7850744..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/eclipselink/eclipselink.jar b/src/java/DmWebPortal/lib/eclipselink/eclipselink.jar deleted file mode 100644 index db8a43c6e625c58eb47587d2d7fca58a2e55fb7c..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/eclipselink/eclipselink.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/eclipselink/javax.persistence_2.1.0.v201304241213.jar b/src/java/DmWebPortal/lib/eclipselink/javax.persistence_2.1.0.v201304241213.jar deleted file mode 100644 index a4dd3861ffbcac7bd189bff7c397bc51a40fcadc..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/eclipselink/javax.persistence_2.1.0.v201304241213.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.1.v20130918-f2b9fc5.jar b/src/java/DmWebPortal/lib/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.1.v20130918-f2b9fc5.jar deleted file mode 100644 index 9de35be66e4ef75e9fe555e1b7271abd129f0656..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.1.v20130918-f2b9fc5.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.1.v20130918-f2b9fc5.jar b/src/java/DmWebPortal/lib/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.1.v20130918-f2b9fc5.jar deleted file mode 100644 index a1007dfc8829b9987018399c8deb4e65a954274e..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.1.v20130918-f2b9fc5.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/gson-2.3.1.jar b/src/java/DmWebPortal/lib/gson-2.3.1.jar deleted file mode 100644 index 250132c197467d7ddef3b7f40a98fdc036163b66..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/gson-2.3.1.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/itext-2.1.7.jar b/src/java/DmWebPortal/lib/itext-2.1.7.jar deleted file mode 100644 index 3f2c188223481f69e6c0aff835aed8f6e1d8b1c2..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/itext-2.1.7.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/javaee-doc-api.jar b/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/javaee-doc-api.jar deleted file mode 100644 index bdebe91cc2781a0135d24e6dbe6c0f9e16e551c4..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/javaee-doc-api.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/javax.annotation.jar b/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/javax.annotation.jar deleted file mode 100644 index ec4b372325dc33ea9e38064516000786929f07bb..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/javax.annotation.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/jaxb-api-osgi.jar b/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/jaxb-api-osgi.jar deleted file mode 100644 index d167e2f62b1b5cd79df1f0fa7ffad7182eb1985a..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/jaxb-api-osgi.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/webservices-api-osgi.jar b/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/webservices-api-osgi.jar deleted file mode 100644 index 217424dac47f3cfd863e53d400b7bc35e73ad67c..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/javaee-endorsed-api-6.0/webservices-api-osgi.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/log4j-1.2.17.jar b/src/java/DmWebPortal/lib/log4j-1.2.17.jar deleted file mode 100644 index 068867ebfd231db09a7775794eea8127420380ed..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/log4j-1.2.17.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/nblibraries.properties b/src/java/DmWebPortal/lib/nblibraries.properties deleted file mode 100644 index 74ba782defa0688dfaa4e612eb9f55b366462cb5..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/lib/nblibraries.properties +++ /dev/null @@ -1,27 +0,0 @@ -libs.CopyLibs.classpath=\ - ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar -libs.CopyLibs.displayName=CopyLibs Task -libs.CopyLibs.prop-version=2.0 -libs.eclipselink.classpath=\ - ${base}/eclipselink/eclipselink.jar:\ - ${base}/eclipselink/javax.persistence_2.1.0.v201304241213.jar:\ - ${base}/eclipselink/org.eclipse.persistence.jpa.jpql_2.5.1.v20130918-f2b9fc5.jar -libs.eclipselink.displayName=EclipseLink (JPA 2.1) -libs.eclipselink.prop-maven-dependencies=\n org.eclipse.persistence:eclipselink:2.5.1:jar\n -libs.eclipselinkmodelgen.classpath=\ - ${base}/eclipselinkmodelgen/org.eclipse.persistence.jpa.modelgen_2.5.1.v20130918-f2b9fc5.jar -libs.eclipselinkmodelgen.displayName=EclipseLink-ModelGen (JPA 2.1) -libs.eclipselinkmodelgen.prop-maven-dependencies=org.eclipse.persistence:org.eclipse.persistence.jpa.modelgen.processor:2.5.1:jar -libs.javaee-endorsed-api-6.0.classpath=\ - ${base}/javaee-endorsed-api-6.0/javax.annotation.jar:\ - ${base}/javaee-endorsed-api-6.0/jaxb-api-osgi.jar:\ - ${base}/javaee-endorsed-api-6.0/webservices-api-osgi.jar -libs.javaee-endorsed-api-6.0.displayName=Java EE 6 Endorsed API Library -libs.javaee-endorsed-api-6.0.javadoc=\ - ${base}/javaee-endorsed-api-6.0/javaee-doc-api.jar -libs.primefaces.classpath=\ - ${base}/primefaces/primefaces-3.5.jar:\ - ${base}/primefaces/commons-fileupload-1.3.jar -libs.primefaces.displayName=PrimeFaces 3.5 -libs.primefaces.prop-maven-dependencies=\n org.primefaces:primefaces:3.5:jar\n commons-fileupload:commons-fileupload:1.3:jar\n -libs.primefaces.prop-maven-repositories=default:http://repository.primefaces.org/ diff --git a/src/java/DmWebPortal/lib/org-netbeans-modules-java-j2seproject-copylibstask.jar b/src/java/DmWebPortal/lib/org-netbeans-modules-java-j2seproject-copylibstask.jar deleted file mode 100644 index 14c3bbbf50780fcdd7e29a43c3b6b416f7850744..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/org-netbeans-modules-java-j2seproject-copylibstask.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/poi-3.10.jar b/src/java/DmWebPortal/lib/poi-3.10.jar deleted file mode 100644 index 8862e217587e06a41c2a5dd8703e683428df8a54..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/poi-3.10.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/postgresql-9.3-1102.jdbc41.jar b/src/java/DmWebPortal/lib/postgresql-9.3-1102.jdbc41.jar deleted file mode 100644 index 4fb1f5bee9a4e6c87ac2b91f14fbeda2017c31aa..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/postgresql-9.3-1102.jdbc41.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/primefaces-5.1.jar b/src/java/DmWebPortal/lib/primefaces-5.1.jar deleted file mode 100644 index e979a446f5f493f168dfb39985fb3dffb73c209a..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/primefaces-5.1.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/primefaces/commons-fileupload-1.3.jar b/src/java/DmWebPortal/lib/primefaces/commons-fileupload-1.3.jar deleted file mode 100644 index 76a175c15b3ce49124a504170b1abe073e75e932..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/primefaces/commons-fileupload-1.3.jar and /dev/null differ diff --git a/src/java/DmWebPortal/lib/primefaces/primefaces-3.5.jar b/src/java/DmWebPortal/lib/primefaces/primefaces-3.5.jar deleted file mode 100644 index e5c0eba4ccb062bd0205d7ed7c164fc2f3c6551f..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/lib/primefaces/primefaces-3.5.jar and /dev/null differ diff --git a/src/java/DmWebPortal/nbproject/.svnignore b/src/java/DmWebPortal/nbproject/.svnignore deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/java/DmWebPortal/nbproject/ant-deploy.xml b/src/java/DmWebPortal/nbproject/ant-deploy.xml deleted file mode 100644 index 2d5f8778d18757ea5ded4eea4da13ca1adc51093..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/nbproject/ant-deploy.xml +++ /dev/null @@ -1,111 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project default="-deploy-ant" basedir="."> - <target name="-init-cl-deployment-env" if="deploy.ant.enabled"> - <property file="${deploy.ant.properties.file}" /> - <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/> - <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/> - <available file="${deploy.ant.resource.dir}" property="has.setup"/> - <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> - <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/> - </target> - - <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present"> - <tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/> - <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/> - <!-- The doctype triggers resolution which can fail --> - <replace file="${temp.sun.web}"> - <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken> - <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue> - </replace> - <replace file="${temp.sun.web}"> - <replacetoken><![CDATA[<sun-web-app]]></replacetoken> - <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue> - </replace> - <xmlproperty file="${temp.sun.web}" validate="false"> - </xmlproperty> - <delete file="${temp.sun.web}"/> - <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}"> - <isset property="sun-web-app.context-root"/> - </condition> - <condition property="deploy.context.root.argument" value="&contextroot=${sun-web-app.context-root}" else="/${ant.project.name}"> - <isset property="sun-web-app.context-root"/> - </condition> - </target> - <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present"> - <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/> - <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/> - <!-- The doctype triggers resolution which can fail --> - <replace file="${temp.gf.web}"> - <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken> - <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue> - </replace> - <replace file="${temp.gf.web}"> - <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken> - <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue> - </replace> - <xmlproperty file="${temp.gf.web}" validate="false"> - </xmlproperty> - <delete file="${temp.gf.web}"/> - <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}"> - <isset property="glassfish-web-app.context-root"/> - </condition> - <condition property="deploy.context.root.argument" value="&contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}"> - <isset property="glassfish-web-app.context-root"/> - </condition> - </target> - <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present"> - <property name="deploy.context.root.argument" value=""/> - </target> - <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup"> - <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/> - <mkdir dir="${gfv3.resources.dir}"/> - <mkdir dir="${gfv3.resources.dir}/META-INF"/> - <copy todir="${gfv3.resources.dir}/META-INF"> - <fileset dir="${deploy.ant.resource.dir}"/> - </copy> - <jar destfile="${deploy.ant.archive}" update="true"> - <fileset dir="${gfv3.resources.dir}"/> - </jar> - <delete dir="${gfv3.resources.dir}"/> - </target> - <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled"> - <antcall target="-deploy-without-pw"/> - <antcall target="-deploy-with-pw"/> - </target> - - <target name="-deploy-without-pw" unless="gfv3.password"> - <echo message="Deploying ${deploy.ant.archive}"/> - <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> - <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/> - <get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&force=true&name=${ant.project.name}" - dest="${gfv3.results.file}"/> - <delete file="${gfv3.results.file}"/> - </target> - <target name="-deploy-with-pw" if="gfv3.password"> - <echo message="Deploying ${deploy.ant.archive}"/> - <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> - <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/> - <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&force=true&name=${ant.project.name}" - dest="${gfv3.results.file}"/> - <delete file="${gfv3.results.file}"/> - </target> - <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled"> - <antcall target="-undeploy-without-pw"/> - <antcall target="-undeploy-with-pw"/> - </target> - - <target name="-undeploy-without-pw" unless="gfv3.password"> - <echo message="Undeploying ${deploy.ant.archive}"/> - <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> - <get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}" - dest="${gfv3.results.file}"/> - <delete file="${gfv3.results.file}"/> - </target> - <target name="-undeploy-with-pw" if="gfv3.password"> - <echo message="Undeploying ${deploy.ant.archive}"/> - <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> - <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}" - dest="${gfv3.results.file}"/> - <delete file="${gfv3.results.file}"/> - </target> -</project> diff --git a/src/java/DmWebPortal/nbproject/build-impl.xml b/src/java/DmWebPortal/nbproject/build-impl.xml deleted file mode 100644 index 845ae48b7776d0b0a90737160b493e0937e21146..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/nbproject/build-impl.xml +++ /dev/null @@ -1,1481 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - *** GENERATED FROM project.xml - DO NOT EDIT *** - *** EDIT ../build.xml INSTEAD *** - - For the purpose of easier reading the script - is divided into following sections: - - initialization - - compilation - - dist - - execution - - debugging - - javadoc - - test compilation - - test execution - - test debugging - - cleanup - - --> -<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="DmWebPortal-impl"> - <import file="ant-deploy.xml"/> - <fail message="Please build using Ant 1.7.1 or higher."> - <condition> - <not> - <antversion atleast="1.7.1"/> - </not> - </condition> - </fail> - <target depends="dist,javadoc" description="Build whole project." name="default"/> - <!-- - INITIALIZATION SECTION - --> - <target name="-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init" name="-init-private"> - <property file="nbproject/private/private.properties"/> - </target> - <target name="-pre-init-libraries"> - <property location="./lib/nblibraries.properties" name="libraries.path"/> - <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/> - <pathconvert dirsep="/" property="libraries.dir"> - <path path="${libraries.dir.nativedirsep}"/> - </pathconvert> - <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/> - <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/> - </target> - <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries"> - <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties"> - <filterchain> - <replacestring from="$${base}" to="${libraries.dir}"/> - <escapeunicode/> - </filterchain> - </loadproperties> - </target> - <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries"> - <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}"> - <filterchain> - <replacestring from="$${base}" to="${libraries.dir}"/> - <escapeunicode/> - </filterchain> - </loadproperties> - </target> - <target depends="-pre-init,-init-private,-init-libraries" name="-init-user"> - <property file="${user.properties.file}"/> - <!-- The two properties below are usually overridden --> - <!-- by the active platform. Just a fallback. --> - <property name="default.javac.source" value="1.4"/> - <property name="default.javac.target" value="1.4"/> - </target> - <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project"> - <property file="nbproject/project.properties"/> - </target> - <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/> - <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init"> - <condition property="have.tests"> - <or> - <available file="${test.src.dir}"/> - </or> - </condition> - <condition property="have.sources"> - <or> - <available file="${src.dir}"/> - </or> - </condition> - <condition property="netbeans.home+have.tests"> - <and> - <isset property="netbeans.home"/> - <isset property="have.tests"/> - </and> - </condition> - <condition property="no.javadoc.preview"> - <isfalse value="${javadoc.preview}"/> - </condition> - <property name="javac.compilerargs" value=""/> - <condition property="no.deps"> - <and> - <istrue value="${no.dependencies}"/> - </and> - </condition> - <condition property="no.dist.ear.dir"> - <not> - <isset property="dist.ear.dir"/> - </not> - </condition> - <property name="build.web.excludes" value="${build.classes.excludes}"/> - <condition property="do.compile.jsps"> - <istrue value="${compile.jsps}"/> - </condition> - <condition property="do.debug.server"> - <or> - <not> - <isset property="debug.server"/> - </not> - <istrue value="${debug.server}"/> - <and> - <not> - <istrue value="${debug.server}"/> - </not> - <not> - <istrue value="${debug.client}"/> - </not> - </and> - </or> - </condition> - <condition property="do.debug.client"> - <istrue value="${debug.client}"/> - </condition> - <condition property="do.display.browser"> - <istrue value="${display.browser}"/> - </condition> - <condition property="do.display.browser.debug.old"> - <and> - <isset property="do.display.browser"/> - <not> - <isset property="do.debug.client"/> - </not> - <not> - <isset property="browser.context"/> - </not> - </and> - </condition> - <condition property="do.display.browser.debug"> - <and> - <isset property="do.display.browser"/> - <not> - <isset property="do.debug.client"/> - </not> - <isset property="browser.context"/> - </and> - </condition> - <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/> - <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/> - <condition property="do.war.package.with.custom.manifest"> - <isset property="has.custom.manifest"/> - </condition> - <condition property="do.war.package.without.custom.manifest"> - <not> - <isset property="has.custom.manifest"/> - </not> - </condition> - <condition property="do.tmp.war.package.with.custom.manifest"> - <and> - <isset property="has.custom.manifest"/> - <or> - <isfalse value="${directory.deployment.supported}"/> - <isset property="dist.ear.dir"/> - </or> - </and> - </condition> - <condition property="do.tmp.war.package.without.custom.manifest"> - <and> - <not> - <isset property="has.custom.manifest"/> - </not> - <or> - <isfalse value="${directory.deployment.supported}"/> - <isset property="dist.ear.dir"/> - </or> - </and> - </condition> - <condition property="do.tmp.war.package"> - <or> - <isfalse value="${directory.deployment.supported}"/> - <isset property="dist.ear.dir"/> - </or> - </condition> - <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/> - <condition else="" property="application.args.param" value="${application.args}"> - <and> - <isset property="application.args"/> - <not> - <equals arg1="${application.args}" arg2="" trim="true"/> - </not> - </and> - </condition> - <property name="source.encoding" value="${file.encoding}"/> - <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> - <and> - <isset property="javadoc.encoding"/> - <not> - <equals arg1="${javadoc.encoding}" arg2=""/> - </not> - </and> - </condition> - <property name="javadoc.encoding.used" value="${source.encoding}"/> - <property name="includes" value="**"/> - <property name="excludes" value=""/> - <property name="runmain.jvmargs" value=""/> - <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> - <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> - <and> - <isset property="endorsed.classpath"/> - <length length="0" string="${endorsed.classpath}" when="greater"/> - </and> - </condition> - <condition else="false" property="jdkBug6558476"> - <and> - <matches pattern="1\.[56]" string="${java.specification.version}"/> - <not> - <os family="unix"/> - </not> - </and> - </condition> - <property name="javac.fork" value="${jdkBug6558476}"/> - <condition property="junit.available"> - <or> - <available classname="org.junit.Test" classpath="${run.test.classpath}"/> - <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> - </or> - </condition> - <condition property="testng.available"> - <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> - </condition> - <condition property="junit+testng.available"> - <and> - <istrue value="${junit.available}"/> - <istrue value="${testng.available}"/> - </and> - </condition> - <condition else="testng" property="testng.mode" value="mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - <condition else="" property="testng.debug.mode" value="-mixed"> - <istrue value="${junit+testng.available}"/> - </condition> - </target> - <target depends="init" name="-init-cos" unless="deploy.on.save"> - <condition property="deploy.on.save" value="true"> - <or> - <istrue value="${j2ee.deploy.on.save}"/> - <istrue value="${j2ee.compile.on.save}"/> - </or> - </condition> - </target> - <target name="-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check"> - <fail unless="src.dir">Must set src.dir</fail> - <fail unless="test.src.dir">Must set test.src.dir</fail> - <fail unless="build.dir">Must set build.dir</fail> - <fail unless="build.web.dir">Must set build.web.dir</fail> - <fail unless="build.generated.dir">Must set build.generated.dir</fail> - <fail unless="dist.dir">Must set dist.dir</fail> - <fail unless="build.classes.dir">Must set build.classes.dir</fail> - <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> - <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> - <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> - <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> - <fail unless="dist.war">Must set dist.war</fail> - <condition property="missing.j2ee.server.home"> - <and> - <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/> - <not> - <isset property="j2ee.server.home"/> - </not> - </and> - </condition> - <fail if="missing.j2ee.server.home"> -The Java EE server classpath is not correctly set up - server home directory is missing. -Either open the project in the IDE and assign the server or setup the server classpath manually. -For example like this: - ant -Dj2ee.server.home=<app_server_installation_directory> - </fail> - <fail unless="j2ee.platform.classpath"> -The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. -Either open the project in the IDE and assign the server or setup the server classpath manually. -For example like this: - ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) -or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) - </fail> - </target> - <target name="-init-macrodef-property"> - <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="${@{value}}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <mkdir dir="@{apgeneratedsrcdir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <compilerarg value="-processorpath"/> - <compilerarg path="@{processorpath}:${empty.dir}"/> - <compilerarg line="${ap.processors.internal}"/> - <compilerarg value="-s"/> - <compilerarg path="@{apgeneratedsrcdir}"/> - <compilerarg line="${ap.proc.none.internal}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> - <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> - <attribute default="${javac.processorpath}" name="processorpath"/> - <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="${javac.debug}" name="debug"/> - <attribute default="${empty.dir}" name="gensrcdir"/> - <element name="customize" optional="true"/> - <sequential> - <property location="${build.dir}/empty" name="empty.dir"/> - <mkdir dir="${empty.dir}"/> - <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}"> - <src> - <dirset dir="@{gensrcdir}" erroronmissingdir="false"> - <include name="*"/> - </dirset> - </src> - <classpath> - <path path="@{classpath}"/> - </classpath> - <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> - <compilerarg line="${javac.compilerargs}"/> - <customize/> - </javac> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> - <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${src.dir}" name="srcdir"/> - <attribute default="${build.classes.dir}" name="destdir"/> - <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/> - <sequential> - <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </depend> - </sequential> - </macrodef> - <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${build.classes.dir}" name="destdir"/> - <sequential> - <fail unless="javac.includes">Must set javac.includes</fail> - <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> - <path> - <filelist dir="@{destdir}" files="${javac.includes}"/> - </path> - <globmapper from="*.java" to="*.class"/> - </pathconvert> - <tempfile deleteonexit="true" property="javac.includesfile.binary"/> - <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> - <delete> - <files includesfile="${javac.includesfile.binary}"/> - </delete> - <delete file="${javac.includesfile.binary}"/> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-init"> - <condition else="false" property="nb.junit.batch" value="true"> - <and> - <istrue value="${junit.available}"/> - <not> - <isset property="test.method"/> - </not> - </and> - </condition> - <condition else="false" property="nb.junit.single" value="true"> - <and> - <istrue value="${junit.available}"/> - <isset property="test.method"/> - </and> - </condition> - </target> - <target name="-init-test-properties"> - <property name="test.binaryincludes" value="<nothing>"/> - <property name="test.binarytestincludes" value=""/> - <property name="test.binaryexcludes" value=""/> - </target> - <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> - <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="run.jvmargs.ide" value=""/> - <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> - <filename name="${test.binarytestincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${run.jvmargs.ide}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> - <target if="${testng.available}" name="-init-macrodef-testng"> - <macrodef name="testng" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> - <isset property="test.method"/> - </condition> - <union id="test.set"> - <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - </union> - <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> - <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="DmWebPortal" testname="TestNG tests" workingDir="${basedir}"> - <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> - <propertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </propertyset> - <customize/> - </testng> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-test-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <echo>No tests executed.</echo> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <webproject2:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </webproject2:junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> - <macrodef name="test-impl" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <webproject2:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </webproject2:testng> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> - <macrodef name="test" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <sequential> - <webproject2:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${runmain.jvmargs}"/> - </customize> - </webproject2:test-impl> - </sequential> - </macrodef> - </target> - <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}"> - <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> - <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element name="customize" optional="true"/> - <sequential> - <property name="run.jvmargs.ide" value=""/> - <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}"> - <batchtest todir="${build.test.results.dir}"> - <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> - <filename name="@{testincludes}"/> - </fileset> - <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> - <filename name="${test.binarytestincludes}"/> - </fileset> - </batchtest> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - <jvmarg value="-ea"/> - <jvmarg line="${run.jvmargs.ide}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <customize/> - </junit> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> - <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <element implicit="true" name="customize" optional="true"/> - <sequential> - <webproject2:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize/> - </webproject2:junit-debug> - </sequential> - </macrodef> - </target> - <target if="${testng.available}" name="-init-macrodef-testng-debug"> - <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element name="customize2" optional="true"/> - <sequential> - <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> - <isset property="test.method"/> - </condition> - <condition else="-suitename DmWebPortal -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> - <matches pattern=".*\.xml" string="@{testClass}"/> - </condition> - <delete dir="${build.test.results.dir}" quiet="true"/> - <mkdir dir="${build.test.results.dir}"/> - <webproject1:debug args="${testng.cmd.args}" classname="org.testng.TestNG" classpath="${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}"> - <customize> - <customize2/> - <jvmarg value="-ea"/> - <arg line="${testng.debug.mode}"/> - <arg line="-d ${build.test.results.dir}"/> - <arg line="-listener org.testng.reporters.VerboseReporter"/> - </customize> - </webproject1:debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> - <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <element implicit="true" name="customize2" optional="true"/> - <sequential> - <webproject2:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2/> - </webproject2:testng-debug> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <webproject2:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> - <customize> - <classpath> - <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/> - </classpath> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${runmain.jvmargs}"/> - </customize> - </webproject2:test-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> - <macrodef name="test-debug" uri="http://www.netbeans.org/ns/web-project/2"> - <attribute default="${includes}" name="includes"/> - <attribute default="${excludes}" name="excludes"/> - <attribute default="**" name="testincludes"/> - <attribute default="" name="testmethods"/> - <attribute default="${main.class}" name="testClass"/> - <attribute default="" name="testMethod"/> - <sequential> - <webproject2:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> - <customize2> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - </customize2> - </webproject2:testng-debug-impl> - </sequential> - </macrodef> - </target> - <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> - <target name="-init-macrodef-java"> - <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}" name="classpath"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${runmain.jvmargs}"/> - <classpath> - <path path="@{classpath}:${j2ee.platform.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-macrodef-nbjsdebug"> - <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1"> - <attribute default="${client.url}" name="webUrl"/> - <sequential> - <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/> - </sequential> - </macrodef> - </target> - <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> - <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1"> - <attribute default="${main.class}" name="name"/> - <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/> - <sequential> - <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}"> - <classpath> - <path path="@{classpath}"/> - </classpath> - </nbjpdastart> - </sequential> - </macrodef> - <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1"> - <attribute default="${build.classes.dir}" name="dir"/> - <sequential> - <nbjpdareload> - <fileset dir="@{dir}" includes="${fix.classes}"> - <include name="${fix.includes}*.class"/> - </fileset> - </nbjpdareload> - </sequential> - </macrodef> - <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1"> - <sequential> - <nbjpdaappreloaded/> - </sequential> - </macrodef> - </target> - <target name="-init-debug-args"> - <property name="version-output" value="java version "${ant.java.version}"/> - <condition property="have-jdk-older-than-1.4"> - <or> - <contains string="${version-output}" substring="java version "1.0"/> - <contains string="${version-output}" substring="java version "1.1"/> - <contains string="${version-output}" substring="java version "1.2"/> - <contains string="${version-output}" substring="java version "1.3"/> - </or> - </condition> - <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> - <istrue value="${have-jdk-older-than-1.4}"/> - </condition> - <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> - <os family="windows"/> - </condition> - <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> - <isset property="debug.transport"/> - </condition> - </target> - <target depends="-init-debug-args" name="-init-macrodef-debug"> - <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1"> - <attribute default="${main.class}" name="classname"/> - <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/> - <attribute default="${application.args.param}" name="args"/> - <element name="customize" optional="true"/> - <sequential> - <java classname="@{classname}" fork="true"> - <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> - <jvmarg line="${debug-args-line}"/> - <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> - <jvmarg line="${runmain.jvmargs}"/> - <classpath> - <path path="@{classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="run-sys-prop."/> - <mapper from="run-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <arg line="@{args}"/> - <customize/> - </java> - </sequential> - </macrodef> - </target> - <target name="-init-taskdefs"> - <fail unless="libs.CopyLibs.classpath"> -The libs.CopyLibs.classpath property is not set up. -This property must point to -org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part -of NetBeans IDE installation and is usually located at -<netbeans_installation>/java<version>/ant/extra folder. -Either open the project in the IDE and make sure CopyLibs library -exists or setup the property manually. For example like this: - ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar - </fail> - <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/> - </target> - <target name="-init-ap-cmdline-properties"> - <property name="annotation.processing.enabled" value="true"/> - <property name="annotation.processing.processors.list" value=""/> - <property name="annotation.processing.run.all.processors" value="true"/> - <property name="javac.processorpath" value="${javac.classpath}"/> - <property name="javac.test.processorpath" value="${javac.test.classpath}"/> - <condition property="ap.supported.internal" value="true"> - <not> - <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> - </not> - </condition> - </target> - <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> - <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> - <isfalse value="${annotation.processing.run.all.processors}"/> - </condition> - <condition else="" property="ap.proc.none.internal" value="-proc:none"> - <isfalse value="${annotation.processing.enabled}"/> - </condition> - </target> - <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> - <property name="ap.cmd.line.internal" value=""/> - </target> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> - <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="-profile-pre-init, init, -profile-post-init" if="profiler.info.jvmargs.agent" name="-profile-init-check"> - <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> - <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> - </target> - <!-- - end of pre NB7.2 profiling section - --> - <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/> - <!-- - COMPILATION SECTION - --> - <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/> - <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/> - <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/> - <target depends="init,deps-jar" name="-pre-pre-compile"> - <mkdir dir="${build.classes.dir}"/> - </target> - <target name="-pre-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target name="-copy-webdir"> - <copy todir="${build.web.dir}"> - <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/> - </copy> - <copy todir="${build.web.dir}/WEB-INF"> - <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/> - </copy> - </target> - <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile"> - <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target if="has.custom.manifest" name="-copy-manifest"> - <mkdir dir="${build.meta.inf.dir}"/> - <copy todir="${build.meta.inf.dir}"> - <fileset dir="${conf.dir}" includes="MANIFEST.MF"/> - </copy> - </target> - <target if="has.persistence.xml" name="-copy-persistence-xml"> - <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/> - <copy todir="${build.web.dir}/WEB-INF/classes/META-INF"> - <fileset dir="${persistence.xml.dir}" includes="persistence.xml orm.xml"/> - </copy> - </target> - <target name="-post-compile"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> - <target name="-pre-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/> - <copy todir="${build.classes.dir}"> - <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> - <property name="jspc.schemas" value="/resources/schemas/"/> - <property name="jspc.dtds" value="/resources/dtds/"/> - <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps"> - <mkdir dir="${build.generated.dir}/src"/> - <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true"> - <arg value="-uriroot"/> - <arg file="${basedir}/${build.web.dir}"/> - <arg value="-d"/> - <arg file="${basedir}/${build.generated.dir}/src"/> - <arg value="-die1"/> - <arg value="-schemas ${jspc.schemas}"/> - <arg value="-dtds ${jspc.dtds}"/> - <arg value="-compilerSourceVM ${javac.source}"/> - <arg value="-compilerTargetVM ${javac.target}"/> - <arg value="-javaEncoding ${source.encoding}"/> - <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/> - <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/> - </java> - <mkdir dir="${build.generated.dir}/classes"/> - <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/> - </target> - <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp"> - <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail> - <mkdir dir="${build.generated.dir}/src"/> - <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true"> - <arg value="-uriroot"/> - <arg file="${basedir}/${build.web.dir}"/> - <arg value="-d"/> - <arg file="${basedir}/${build.generated.dir}/src"/> - <arg value="-die1"/> - <arg value="-schemas ${jspc.schemas}"/> - <arg value="-dtds ${jspc.dtds}"/> - <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/> - <arg value="-jspc.files"/> - <arg path="${jsp.includes}"/> - <arg value="-compilerSourceVM ${javac.source}"/> - <arg value="-compilerTargetVM ${javac.target}"/> - <arg value="-javaEncoding ${source.encoding}"/> - <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/> - </java> - <mkdir dir="${build.generated.dir}/classes"/> - <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"> - <customize> - <patternset includes="${javac.jsp.includes}"/> - </customize> - </webproject2:javac> - </target> - <target name="compile-single-jsp"> - <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail> - <antcall target="-do-compile-single-jsp"/> - </target> - <!-- - DIST BUILDING SECTION - --> - <target name="-pre-dist"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest"> - <dirname file="${dist.war}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - <jar compress="${jar.compress}" jarfile="${dist.war}"> - <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> - </jar> - </target> - <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest"> - <dirname file="${dist.war}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF"> - <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> - </jar> - </target> - <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest"> - <dirname file="${dist.war}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - <jar compress="${jar.compress}" jarfile="${dist.war}"> - <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> - </jar> - </target> - <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest"> - <dirname file="${dist.war}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF"> - <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> - </jar> - </target> - <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/> - <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest"> - <copyfiles files="${file.reference.gson-2.3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> - <copyfiles files="${file.reference.itext-2.1.7.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> - <copyfiles files="${file.reference.log4j-1.2.17.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> - <copyfiles files="${file.reference.postgresql-9.3-1102.jdbc41.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> - <copyfiles files="${file.reference.org-netbeans-modules-java-j2seproject-copylibstask.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> - <copyfiles files="${file.reference.poi-3.10.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> - <copyfiles files="${file.reference.primefaces-5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> - <mkdir dir="${build.web.dir}/META-INF"/> - <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/> - </target> - <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"> - <copyfiles files="${file.reference.gson-2.3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/> - <copyfiles files="${file.reference.itext-2.1.7.jar}" todir="${build.web.dir}/WEB-INF/lib"/> - <copyfiles files="${file.reference.log4j-1.2.17.jar}" todir="${build.web.dir}/WEB-INF/lib"/> - <copyfiles files="${file.reference.postgresql-9.3-1102.jdbc41.jar}" todir="${build.web.dir}/WEB-INF/lib"/> - <copyfiles files="${file.reference.org-netbeans-modules-java-j2seproject-copylibstask.jar}" todir="${build.web.dir}/WEB-INF/lib"/> - <copyfiles files="${file.reference.poi-3.10.jar}" todir="${build.web.dir}/WEB-INF/lib"/> - <copyfiles files="${file.reference.primefaces-5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/> - </target> - <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib"> - <delete dir="${build.web.dir}/WEB-INF/lib"/> - </target> - <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist"> - <dirname file="${dist.ear.war}" property="dist.jar.dir"/> - <mkdir dir="${dist.jar.dir}"/> - <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF"> - <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*,${dist.archive.excludes}"/> - </jar> - </target> - <target name="-post-dist"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/> - <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/> - <!-- - EXECUTION SECTION - --> - <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/> - <target name="-pre-run-deploy"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target name="-post-run-deploy"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target name="-pre-nbmodule-run-deploy"> - <!-- Empty placeholder for easier customization. --> - <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. --> - </target> - <target name="-post-nbmodule-run-deploy"> - <!-- Empty placeholder for easier customization. --> - <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. --> - </target> - <target name="-run-deploy-am"> - <!-- Task to deploy to the Access Manager runtime. --> - </target> - <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy,-do-update-breakpoints" name="run-deploy"/> - <target if="netbeans.home" name="-run-deploy-nb"> - <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/> - </target> - <target name="-init-deploy-ant" unless="netbeans.home"> - <property name="deploy.ant.archive" value="${dist.war}"/> - <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/> - <property name="deploy.ant.resource.dir" value="${resource.dir}"/> - <property name="deploy.ant.enabled" value="true"/> - </target> - <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/> - <target if="netbeans.home" name="-run-undeploy-nb"> - <fail message="Undeploy is not supported from within the IDE"/> - </target> - <target depends="init,-pre-dist,dist,-post-dist" name="verify"> - <nbverify file="${dist.war}"/> - </target> - <target depends="run-deploy,-init-display-browser,-display-browser-nb-old,-display-browser-nb,-display-browser-cl" name="run-display-browser"/> - <target if="do.display.browser" name="-init-display-browser"> - <condition property="do.display.browser.nb.old"> - <and> - <isset property="netbeans.home"/> - <not> - <isset property="browser.context"/> - </not> - </and> - </condition> - <condition property="do.display.browser.nb"> - <and> - <isset property="netbeans.home"/> - <isset property="browser.context"/> - </and> - </condition> - <condition property="do.display.browser.cl"> - <isset property="deploy.ant.enabled"/> - </condition> - </target> - <target if="do.display.browser.nb.old" name="-display-browser-nb-old"> - <nbbrowse url="${client.url}"/> - </target> - <target if="do.display.browser.nb" name="-display-browser-nb"> - <nbbrowse context="${browser.context}" url="${client.url}" urlPath="${client.urlPart}"/> - </target> - <target if="do.display.browser.cl" name="-get-browser" unless="browser"> - <condition property="browser" value="rundll32"> - <os family="windows"/> - </condition> - <condition else="" property="browser.args" value="url.dll,FileProtocolHandler"> - <os family="windows"/> - </condition> - <condition property="browser" value="/usr/bin/open"> - <os family="mac"/> - </condition> - <property environment="env"/> - <condition property="browser" value="${env.BROWSER}"> - <isset property="env.BROWSER"/> - </condition> - <condition property="browser" value="/usr/bin/firefox"> - <available file="/usr/bin/firefox"/> - </condition> - <condition property="browser" value="/usr/local/firefox/firefox"> - <available file="/usr/local/firefox/firefox"/> - </condition> - <condition property="browser" value="/usr/bin/mozilla"> - <available file="/usr/bin/mozilla"/> - </condition> - <condition property="browser" value="/usr/local/mozilla/mozilla"> - <available file="/usr/local/mozilla/mozilla"/> - </condition> - <condition property="browser" value="/usr/sfw/lib/firefox/firefox"> - <available file="/usr/sfw/lib/firefox/firefox"/> - </condition> - <condition property="browser" value="/opt/csw/bin/firefox"> - <available file="/opt/csw/bin/firefox"/> - </condition> - <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla"> - <available file="/usr/sfw/lib/mozilla/mozilla"/> - </condition> - <condition property="browser" value="/opt/csw/bin/mozilla"> - <available file="/opt/csw/bin/mozilla"/> - </condition> - </target> - <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl"> - <fail unless="browser"> - Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. - </fail> - <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/> - <echo>Launching ${browse.url}</echo> - <exec executable="${browser}" spawn="true"> - <arg line="${browser.args} ${browse.url}"/> - </exec> - </target> - <target depends="init,-init-cos,compile-single" name="run-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <webproject1:java classname="${run.class}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main"> - <fail unless="run.class">Must select one file in the IDE or set run.class</fail> - <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> - </target> - <target depends="init" if="netbeans.home" name="-do-update-breakpoints"> - <webproject1:nbjpdaappreloaded/> - </target> - <!-- - DEBUGGING SECTION - --> - <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug"> - <nbstartserver debugmode="true"/> - <antcall target="connect-debugger"/> - <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/> - <antcall target="debug-display-browser-old"/> - <antcall target="debug-display-browser"/> - <antcall target="connect-client-debugger"/> - </target> - <target if="do.debug.server" name="connect-debugger" unless="is.debugged"> - <condition property="listeningcp" value="sourcepath"> - <istrue value="${j2ee.compile.on.save}"/> - </condition> - <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" listeningcp="${listeningcp}" name="${name}" transport="${jpda.transport}"> - <classpath> - <path path="${debug.classpath}:${j2ee.platform.classpath}"/> - </classpath> - <sourcepath> - <path path="${web.docbase.dir}"/> - </sourcepath> - </nbjpdaconnect> - </target> - <target if="do.display.browser.debug.old" name="debug-display-browser-old"> - <nbbrowse url="${client.url}"/> - </target> - <target if="do.display.browser.debug" name="debug-display-browser"> - <nbbrowse context="${browser.context}" url="${client.url}" urlPath="${client.urlPart}"/> - </target> - <target if="do.debug.client" name="connect-client-debugger"> - <webproject1:nbjsdebugstart webUrl="${client.url}"/> - </target> - <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> - </target> - <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> - <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/> - <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> - <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> - </target> - <target depends="init" if="netbeans.home" name="-debug-start-debugger"> - <webproject1:nbjpdastart name="${debug.class}"/> - </target> - <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> - <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> - <webproject1:debug classname="${debug.class}"/> - </target> - <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/> - <target depends="init" name="-pre-debug-fix"> - <fail unless="fix.includes">Must set fix.includes</fail> - <property name="javac.includes" value="${fix.includes}.java"/> - </target> - <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> - <webproject1:nbjpdareload/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> - <!-- - ================= - PROFILING SECTION - ================= - --> - <!-- - pre NB7.2 profiling section; consider it deprecated - --> - <target description="Profile a J2EE project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> - <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs"> - <isset property="profiler.info.jvmargs.extra"/> - </condition> - <antcall target="${profiler.startserver.target}"/> - <antcall target="run"/> - <antcall target="-profile-start-loadgen"/> - </target> - <target if="profiler.info.jvmargs.agent" name="start-profiled-server"> - <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}"> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg value="${profiler.j2ee.agentID}"/> - </nbstartprofiledserver> - </target> - <target if="profiler.info.jvmargs.agent" name="start-profiled-server-extraargs"> - <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}"> - <jvmarg value="${profiler.info.jvmargs.extra}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg value="${profiler.j2ee.agentID}"/> - </nbstartprofiledserver> - </target> - <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> - <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> - <nbprofiledirect> - <classpath> - <path path="${run.test.classpath}"/> - <path path="${j2ee.platform.classpath}"/> - </classpath> - </nbprofiledirect> - <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> - <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> - <jvmarg value="${profiler.info.jvmargs.agent}"/> - <jvmarg line="${profiler.info.jvmargs}"/> - <test name="${profile.class}"/> - <classpath> - <path path="${run.test.classpath}"/> - <path path="${j2ee.platform.classpath}"/> - </classpath> - <syspropertyset> - <propertyref prefix="test-sys-prop."/> - <mapper from="test-sys-prop.*" to="*" type="glob"/> - </syspropertyset> - <formatter type="brief" usefile="false"/> - <formatter type="xml"/> - </junit> - </target> - <target if="netbeans.home" name="-profile-check"> - <condition property="profiler.configured"> - <or> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> - <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> - </or> - </condition> - </target> - <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" name="-do-profile"> - <startprofiler/> - <nbstartserver profilemode="true"/> - <nbdeploy clientUrlPart="${client.urlPart}" forceRedeploy="true" profilemode="true"/> - <antcall target="debug-display-browser-old"/> - <antcall target="debug-display-browser"/> - <antcall target="-profile-start-loadgen"/> - </target> - <target depends="-profile-check,-profile-pre72" description="Profile a J2EE project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> - <antcall target="-do-profile"/> - </target> - <target depends="-profile-test-single-pre72" name="profile-test-single"/> - <target depends="-profile-check" if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs.agent"> - <startprofiler/> - <antcall target="test-single"/> - </target> - <target if="profiler.loadgen.path" name="-profile-start-loadgen"> - <loadgenstart path="${profiler.loadgen.path}"/> - </target> - <!-- - JAVADOC SECTION - --> - <target depends="init" if="have.sources" name="javadoc-build"> - <mkdir dir="${dist.javadoc.dir}"/> - <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> - <classpath> - <path path="${javac.classpath}:${j2ee.platform.classpath}"/> - </classpath> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/*.java"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/*.java"/> - </fileset> - </javadoc> - <copy todir="${dist.javadoc.dir}"> - <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> - <filename name="**/doc-files/**"/> - </fileset> - <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> - <include name="**/doc-files/**"/> - </fileset> - </copy> - </target> - <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview"> - <nbbrowse file="${dist.javadoc.dir}/index.html"/> - </target> - <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/> - <!-- - - TEST COMPILATION SECTION - --> - <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> - <mkdir dir="${build.test.classes.dir}"/> - <property name="j2ee.platform.embeddableejb.classpath" value=""/> - </target> - <target name="-pre-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test"> - <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> - <target name="-pre-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> - <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/> - <copy todir="${build.test.classes.dir}"> - <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> - </copy> - </target> - <target name="-post-compile-test-single"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> - <!-- - - TEST EXECUTION SECTION - --> - <target depends="init" if="have.tests" name="-pre-test-run"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> - <webproject2:test testincludes="**/*Test.java"/> - </target> - <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init" if="have.tests" name="test-report"/> - <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> - <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> - <target depends="init" if="have.tests" name="-pre-test-run-single"> - <mkdir dir="${build.test.results.dir}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> - <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> - <webproject2:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> - <fail unless="test.class">Must select some files in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <webproject2:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> - <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> - </target> - <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> - <!-- - - TEST DEBUGGING SECTION - --> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> - </target> - <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> - <fail unless="test.class">Must select one file in the IDE or set test.class</fail> - <fail unless="test.method">Must select some method in the IDE or set test.method</fail> - <webproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> - </target> - <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> - <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> - </target> - <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> - <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> - <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> - <webproject1:nbjpdareload dir="${build.test.classes.dir}"/> - </target> - <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> - <!-- - - CLEANUP SECTION - --> - <target depends="init" name="deps-clean" unless="no.deps"/> - <target depends="init" name="do-clean"> - <condition property="build.dir.to.clean" value="${build.web.dir}"> - <isset property="dist.ear.dir"/> - </condition> - <property name="build.dir.to.clean" value="${build.web.dir}"/> - <delete includeEmptyDirs="true" quiet="true"> - <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/> - </delete> - <delete dir="${build.dir}"/> - <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/> - <delete dir="${dist.dir}"/> - </target> - <target depends="do-clean" if="status.clean-failed" name="check-clean"> - <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/> - <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/> - </target> - <target depends="init" if="netbeans.home" name="undeploy-clean"> - <nbundeploy failOnError="false" startServer="false"/> - </target> - <target name="-post-clean"> - <!-- Empty placeholder for easier customization. --> - <!-- You can override this target in the ../build.xml file. --> - </target> - <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/> - <target depends="clean" description="Clean build products." name="clean-ear"/> -</project> diff --git a/src/java/DmWebPortal/nbproject/faces-config.NavData b/src/java/DmWebPortal/nbproject/faces-config.NavData deleted file mode 100644 index 298bfc50a82fc997caae5cb3a3a53656c24b7570..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/nbproject/faces-config.NavData +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Scene Scope="Project" version="2"> - <Scope Scope="Faces Configuration Only"/> - <Scope Scope="Project"/> - <Scope Scope="All Faces Configurations"/> -</Scene> diff --git a/src/java/DmWebPortal/nbproject/genfiles.properties b/src/java/DmWebPortal/nbproject/genfiles.properties deleted file mode 100644 index 01920b05ae14dec90da0856600b678c0e4e80384..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=2a807263 -build.xml.script.CRC32=6f54d92a -build.xml.stylesheet.CRC32=651128d4@1.65.1.1 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=2a807263 -nbproject/build-impl.xml.script.CRC32=816a9dd5 -nbproject/build-impl.xml.stylesheet.CRC32=d659eb7a@1.65.1.1 diff --git a/src/java/DmWebPortal/nbproject/private/.svnignore b/src/java/DmWebPortal/nbproject/private/.svnignore deleted file mode 100644 index 2963c1cfca7f43d71b6f86e0d189bae649897e69..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/nbproject/private/.svnignore +++ /dev/null @@ -1,2 +0,0 @@ -private.properties -private.xml diff --git a/src/java/DmWebPortal/nbproject/private/private.properties.generic.build b/src/java/DmWebPortal/nbproject/private/private.properties.generic.build deleted file mode 100644 index 0197b3338d1e3d180d92629b35112ec2cb78542d..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/nbproject/private/private.properties.generic.build +++ /dev/null @@ -1,2 +0,0 @@ -j2ee.server.home=DM_GLASSFISH_DIR/glassfish -j2ee.server.middleware=DM_GLASSFISH_DIR diff --git a/src/java/DmWebPortal/nbproject/project.properties b/src/java/DmWebPortal/nbproject/project.properties deleted file mode 100644 index fe13e2d1286dcd99e160ddfa33208212a9bef03f..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/nbproject/project.properties +++ /dev/null @@ -1,106 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=true -annotation.processing.processor.options=-Aeclipselink.canonicalmodel.use_static_factory=false -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets -build.classes.dir=${build.web.dir}/WEB-INF/classes -build.classes.excludes=**/*.java,**/*.form -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -build.web.dir=${build.dir}/web -build.web.excludes=${build.classes.excludes} -client.urlPart= -compile.jsps=false -conf.dir=${source.root}/conf -debug.classpath=${build.classes.dir}:${javac.classpath} -debug.test.classpath=\ - ${run.test.classpath} -display.browser=true -# Files to be excluded from distribution war -dist.archive.excludes= -dist.dir=dist -dist.ear.war=${dist.dir}/${war.ear.name} -dist.javadoc.dir=${dist.dir}/javadoc -dist.war=${dist.dir}/${war.name} -endorsed.classpath=\ - ${libs.javaee-endorsed-api-6.0.classpath} -excludes= -file.reference.gson-2.3.1.jar=lib/gson-2.3.1.jar -file.reference.itext-2.1.7.jar=lib/itext-2.1.7.jar -file.reference.log4j-1.2.17.jar=lib/log4j-1.2.17.jar -file.reference.org-netbeans-modules-java-j2seproject-copylibstask.jar=lib/org-netbeans-modules-java-j2seproject-copylibstask.jar -file.reference.poi-3.10.jar=lib/poi-3.10.jar -file.reference.postgresql-9.3-1102.jdbc41.jar=lib/postgresql-9.3-1102.jdbc41.jar -file.reference.primefaces-5.1.jar=lib/primefaces-5.1.jar -includes=** -j2ee.compile.on.save=true -j2ee.copy.static.files.on.save=true -j2ee.deploy.on.save=true -j2ee.platform=1.7-web -j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar -j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar -j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar -j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar -j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar -j2ee.platform.wsit.classpath= -j2ee.server.type=gfv3ee6 -jar.compress=false -javac.classpath=\ - ${file.reference.gson-2.3.1.jar}:\ - ${file.reference.itext-2.1.7.jar}:\ - ${file.reference.log4j-1.2.17.jar}:\ - ${file.reference.postgresql-9.3-1102.jdbc41.jar}:\ - ${file.reference.org-netbeans-modules-java-j2seproject-copylibstask.jar}:\ - ${file.reference.poi-3.10.jar}:\ - ${file.reference.primefaces-5.1.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.debug=true -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath}:\ - ${libs.eclipselink.classpath}:\ - ${libs.eclipselinkmodelgen.classpath} -javac.source=1.7 -javac.target=1.7 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.preview=true -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -lib.dir=${web.docbase.dir}/WEB-INF/lib -persistence.xml.dir=${conf.dir} -platform.active=default_platform -resource.dir=setup -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -# Space-separated list of JVM arguments used when running a class with a main method or a unit test -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): -runmain.jvmargs= -source.encoding=UTF-8 -source.root=src -src.dir=${source.root}/java -test.src.dir=test -war.content.additional= -war.ear.name=${war.name} -war.name=DmWebPortal.war -web.docbase.dir=web -webinf.dir=web/WEB-INF diff --git a/src/java/DmWebPortal/nbproject/project.xml b/src/java/DmWebPortal/nbproject/project.xml deleted file mode 100644 index c3149f5fc51516122999bbdd1f6df1d1fc9128cd..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/nbproject/project.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://www.netbeans.org/ns/project/1"> - <type>org.netbeans.modules.web.project</type> - <configuration> - <data xmlns="http://www.netbeans.org/ns/web-project/3"> - <name>DmWebPortal</name> - <minimum-ant-version>1.6.5</minimum-ant-version> - <web-module-libraries> - <library dirs="200"> - <file>${file.reference.gson-2.3.1.jar}</file> - <path-in-war>WEB-INF/lib</path-in-war> - </library> - <library dirs="200"> - <file>${file.reference.itext-2.1.7.jar}</file> - <path-in-war>WEB-INF/lib</path-in-war> - </library> - <library dirs="200"> - <file>${file.reference.log4j-1.2.17.jar}</file> - <path-in-war>WEB-INF/lib</path-in-war> - </library> - <library dirs="200"> - <file>${file.reference.postgresql-9.3-1102.jdbc41.jar}</file> - <path-in-war>WEB-INF/lib</path-in-war> - </library> - <library dirs="200"> - <file>${file.reference.org-netbeans-modules-java-j2seproject-copylibstask.jar}</file> - <path-in-war>WEB-INF/lib</path-in-war> - </library> - <library dirs="200"> - <file>${file.reference.poi-3.10.jar}</file> - <path-in-war>WEB-INF/lib</path-in-war> - </library> - <library dirs="200"> - <file>${file.reference.primefaces-5.1.jar}</file> - <path-in-war>WEB-INF/lib</path-in-war> - </library> - </web-module-libraries> - <web-module-additional-libraries/> - <source-roots> - <root id="src.dir"/> - </source-roots> - <test-roots> - <root id="test.src.dir"/> - </test-roots> - </data> - <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1"> - <definitions>./lib/nblibraries.properties</definitions> - </libraries> - </configuration> -</project> diff --git a/src/java/DmWebPortal/setup/glassfish-resources.xml.template b/src/java/DmWebPortal/setup/glassfish-resources.xml.template deleted file mode 100644 index 83f76c7866cf73780fd5cfd463f87de575792e52..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/setup/glassfish-resources.xml.template +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd"> -<resources> - <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="org.postgresql.ds.PGSimpleDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="postgresql_dm_DbPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false"> - <property name="serverName" value="localhost"/> - <property name="portNumber" value="11136"/> - <property name="databaseName" value="dm"/> - <property name="User" value="dm"/> - <property name="Password" value="DM_DB_PASSWORD"/> - <property name="URL" value="jdbc:postgresql://localhost:11136/dm"/> - <property name="driverClass" value="org.postgresql.Driver"/> - </jdbc-connection-pool> - <jdbc-resource enabled="true" jndi-name="dm_DataSource" object-type="user" pool-name="postgresql_dm_DbPool"/> -</resources> diff --git a/src/java/DmWebPortal/src/conf/MANIFEST.MF b/src/java/DmWebPortal/src/conf/MANIFEST.MF deleted file mode 100644 index 59499bce4a2bd51cba227b7c00fcf745b19c95a4..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/conf/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/src/java/DmWebPortal/src/conf/persistence.xml b/src/java/DmWebPortal/src/conf/persistence.xml deleted file mode 100644 index 6ed5232894944ed3235354d78c056f4861ec226e..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/conf/persistence.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> - <persistence-unit name="DmWebPortalPU" transaction-type="JTA"> - <jta-data-source>dm_DataSource</jta-data-source> - <exclude-unlisted-classes>false</exclude-unlisted-classes> - <properties/> - </persistence-unit> -</persistence> diff --git a/src/java/DmWebPortal/src/java/dm.portal.properties b/src/java/DmWebPortal/src/java/dm.portal.properties deleted file mode 100644 index ffee7ae6acc58f319435f9f147e541b384253c45..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/dm.portal.properties +++ /dev/null @@ -1,10 +0,0 @@ -# 'USERNAME' string will be replaced by the actual username -# dm.portal.ldapUrl=ldaps://phoebusldap.aps.anl.gov:636 -# dm.portal.ldapDnString=uid=USERNAME,ou=people,o=aps.anl.gov,dc=aps,dc=anl,dc=gov - -dm.portal.ldapUrl=ldaps://dmid-vm.xray.aps.anl.gov:636 -dm.portal.ldapDnString=uid=USERNAME,ou=DM,ou=People,o=aps.anl.gov,dc=aps,dc=anl,dc=gov - -dm.dsWebService.url=https://xstor-devel:22236/dm -dm.system.user=dm -dm.system.passwordFile=DM_INSTALL_DIR/etc/DM_SYSTEM_USER.system.passwd \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/DmRestApi.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/DmRestApi.java deleted file mode 100644 index f83e55f310de23de2904e77510249c6b7c646e2b..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/DmRestApi.java +++ /dev/null @@ -1,776 +0,0 @@ -package gov.anl.aps.dm.api; - -import gov.anl.aps.dm.common.constants.DmHttpHeader; -import gov.anl.aps.dm.common.constants.DmProperty; -import gov.anl.aps.dm.common.constants.DmRole; -import gov.anl.aps.dm.common.constants.DmServiceProtocol; -import gov.anl.aps.dm.common.exceptions.AuthorizationError; -import gov.anl.aps.dm.common.exceptions.CommunicationError; -import gov.anl.aps.dm.common.exceptions.ConfigurationError; -import gov.anl.aps.dm.common.exceptions.InvalidArgument; -import gov.anl.aps.dm.common.exceptions.InvalidSession; -import gov.anl.aps.dm.common.exceptions.DmException; -import gov.anl.aps.dm.common.exceptions.DmExceptionFactory; -import gov.anl.aps.dm.common.utilities.NoServerVerificationSSLSocketFactory; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.net.ConnectException; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.ProtocolException; -import java.net.URL; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.net.ssl.HttpsURLConnection; -import org.apache.log4j.Logger; - -/** - * DM REST Web Service API class. - * - * This class serves as superclass for all DM web service interface classes. It - * handles basic communication with web service (establishing sessions, sending - * requests, receiving responses, generating exceptions, etc.). - */ -public class DmRestApi { - - /** - * Relative path for login requests. - */ - public static final String LOGIN_REQUEST_URL = "/login"; - - private static final String DefaultSessionId = "defaultSession"; - - private static final boolean httpsInitialized = initializeHttpsConnection(); - private static final Logger logger = Logger.getLogger(DmRestApi.class.getName()); - - private static boolean initializeHttpsConnection() { - HttpsURLConnection.setDefaultSSLSocketFactory(new NoServerVerificationSSLSocketFactory()); - return true; - } - - private URL serviceUrl; - private DmSession session = new DmSession(); - private String loginUsername; - private String loginPassword; - - /** - * Constructor. - * - * Initializes web service URL from system properties. - * - * @throws ConfigurationError if web service URL property is malformed or - * null - */ - public DmRestApi() throws ConfigurationError { - configureFromProperties(); - } - - /** - * Constructor. - * - * @param webServiceUrl web service URL - * @throws ConfigurationError if web service URL is malformed or null - */ - public DmRestApi(String webServiceUrl) throws ConfigurationError { - configureFromString(webServiceUrl); - } - - /** - * Constructor. - * - * @param webServiceUrl web service URL - * @param loginUsername login username - * @param loginPassword login password - * @throws ConfigurationError if web service URL is malformed or null - */ - public DmRestApi(String webServiceUrl, String loginUsername, String loginPassword) throws ConfigurationError { - configureFromString(webServiceUrl); - this.loginUsername = loginUsername; - this.loginPassword = loginPassword; - } - - /** - * Configure web service URL from Java VM properties. - * - * @throws ConfigurationError if web service URL property is malformed or - * null - */ - public final void configureFromProperties() throws ConfigurationError { - String webServiceUrl = System.getProperty(DmProperty.DS_WEB_SERVICE_URL_PROPERTY_NAME); - configureFromString(webServiceUrl); - } - - /** - * Configure web service URL from string. - * - * @param webServiceUrl web service URL - * @throws ConfigurationError if web service URL property is malformed or - * null - */ - public final void configureFromString(String webServiceUrl) throws ConfigurationError { - if (webServiceUrl == null) { - throw new ConfigurationError("DM web service url is not specified."); - } - try { - serviceUrl = new URL(webServiceUrl); - } catch (MalformedURLException ex) { - throw new ConfigurationError("Malformed DM web service url: " + webServiceUrl); - } - - DmServiceProtocol protocol = DmServiceProtocol.fromString(serviceUrl.getProtocol()); - if (protocol == null) { - throw new ConfigurationError("Unsupported service protocol specified in " + webServiceUrl); - } - } - - public void setLoginUsername(String loginUsername) { - this.loginUsername = loginUsername; - } - - public void setLoginPassword(String loginPassword) { - this.loginPassword = loginPassword; - } - - public URL getServiceUrl() { - return serviceUrl; - } - - public DmSession getSession() { - return session; - } - - public void setSession(DmSession session) { - this.session = session; - } - - /** - * Check HTTP response for exceptions. - * - * @param connection HTTP connection - * @throws DmException when DM error is detected - */ - public static void checkHttpResponseForDmException(HttpURLConnection connection) throws DmException { - String exceptionType = connection.getHeaderField(DmHttpHeader.DM_EXCEPTION_TYPE_HEADER); - if (exceptionType != null) { - String statusMessage = connection.getHeaderField(DmHttpHeader.DM_STATUS_MESSAGE_HEADER); - String statusCode = connection.getHeaderField(DmHttpHeader.DM_STATUS_CODE_HEADER); - int code = Integer.parseInt(statusCode); - DmExceptionFactory.throwDmException(exceptionType, code, statusMessage); - } - } - - /** - * Convert HTTP error for exceptions. - * - * @param httpError HTTP error - * @param connection HTTP connection - * @return generated DM exception - */ - public static DmException convertHttpErrorToDmException(Exception httpError, HttpURLConnection connection) { - String exceptionType = connection.getHeaderField(DmHttpHeader.DM_EXCEPTION_TYPE_HEADER); - if (exceptionType != null) { - String statusMessage = connection.getHeaderField(DmHttpHeader.DM_STATUS_MESSAGE_HEADER); - String statusCode = connection.getHeaderField(DmHttpHeader.DM_STATUS_CODE_HEADER); - int code = Integer.parseInt(statusCode); - return DmExceptionFactory.generateDmException(exceptionType, code, statusMessage); - } else { - return new DmException(httpError); - } - } - - /** - * Get full request URL. - * - * @param requestUrl relative request path, e.g. /object - * @return full request URL string, e.g. http://localhost:17524/dm/object - */ - public String getFullRequestUrl(String requestUrl) { - String url = serviceUrl + requestUrl; - return url; - } - - /** - * Verify session cookie. - * - * @return session cookie - * @throws InvalidSession if session cookie is expired or null - */ - public String verifySessionCookie() throws InvalidSession { - return session.verifyCookie(); - } - - /* - * Get all response headers in a single string. - * - * @param connection HTTP connection - * @return string containing response headers - */ - private static String getResponseHeaders(HttpURLConnection connection) { - String headerString = ""; - Map<String, List<String>> headerMap = connection.getHeaderFields(); - for (String key : headerMap.keySet()) { - List<String> values = headerMap.get(key); - headerString += key + ": " + values + "\n"; - } - return headerString; - } - - /** - * Prepare post data. - * - * @param data key/value data map - * @return string suitable for HTTP post request - * @throws InvalidArgument in case of invalid input data - */ - public static String preparePostData(Map<String, String> data) throws InvalidArgument { - try { - String postData = ""; - String separator = ""; - for (String key : data.keySet()) { - postData += separator + key + "=" + URLEncoder.encode(data.get(key), "UTF8"); - separator = "&"; - } - return postData; - } catch (UnsupportedEncodingException ex) { - logger.error("Invalid argument: " + ex); - throw new InvalidArgument(ex); - } - } - - /** - * Update session cookie from connection's HTTP headers. - * - * @param connection HTTP connection - */ - private void updateSessionCookie(HttpURLConnection connection) { - String cookie = connection.getHeaderField(DmHttpHeader.DM_SET_COOKIE_HEADER); - if (cookie != null) { - session.setCookie(cookie); - logger.debug("Updated session cookie: " + cookie); - } - String sessionRole = connection.getHeaderField(DmHttpHeader.DM_SESSION_ROLE_HEADER); - if (sessionRole != null) { - session.setRole(DmRole.fromString(sessionRole)); - logger.debug("Updated session role: " + sessionRole); - } - } - - /** - * Send post data. - * - * @param data key/value data map - * @param connection HTTP connection - * @throws InvalidArgument in case there is a problem with post data - * @throws DmException in case of any other error - */ - private static void sendPostData(Map<String, String> data, HttpURLConnection connection) throws InvalidArgument, DmException { - String postData = preparePostData(data); - try (DataOutputStream dos = new DataOutputStream(connection.getOutputStream())) { - dos.writeBytes(postData); - dos.flush(); - } catch (IOException ex) { - logger.error(ex); - throw new DmException(ex); - } - } - - /** - * Read HTTP response. - * - * @param connection HTTP connection - * @return HTTP response as a string - * @throws DmException in case of any errors - */ - private static String readHttpResponse(HttpURLConnection connection) throws DmException { - try { - BufferedReader br = new BufferedReader(new InputStreamReader( - (connection.getInputStream()))); - StringBuilder sb = new StringBuilder(); - String output; - while ((output = br.readLine()) != null) { - sb.append(output); - sb.append('\n'); - } - return sb.toString(); - } catch (IOException ex) { - logger.error(ex); - throw new DmException(ex); - } - } - - /** - * Set session cookie in the request headers. - * - * @param connection HTTP connection - * @param sessionCookie session cookie (may be null) - */ - private static void setCookieRequestHeader(HttpURLConnection connection, String sessionCookie) { - if (sessionCookie != null) { - connection.setRequestProperty("Cookie", sessionCookie); - logger.debug("Setting session cookie to: " + sessionCookie); - } - } - - /** - * Set common POST request headers plus session cookie. - * - * @param connection HTTP connection - * @param sessionCookie session cookie (may be null) - * @throws DmException in case of any errors - */ - private static void setPostRequestHeaders(HttpURLConnection connection, String sessionCookie) throws DmException { - setPostRequestHeaders(connection); - setCookieRequestHeader(connection, sessionCookie); - } - - /** - * Set common POST request headers. - * - * @param connection HTTP connection - * @throws DmException in case of any errors - */ - private static void setPostRequestHeaders(HttpURLConnection connection) throws DmException { - try { - connection.setDoOutput(true); - connection.setRequestMethod("POST"); - connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - } catch (ProtocolException ex) { - logger.error(ex); - throw new DmException(ex); - } - } - - /** - * Set common GET request headers plus session cookie. - * - * @param connection HTTP connection - * @param sessionCookie session cookie (may be null) - * @throws DmException in case of any errors - */ - private static void setGetRequestHeaders(HttpURLConnection connection, String sessionCookie) throws DmException { - setGetRequestHeaders(connection); - setCookieRequestHeader(connection, sessionCookie); - } - - /** - * Set common GET request headers. - * - * @param connection HTTP connection - * @throws DmException in case of any errors - */ - private static void setGetRequestHeaders(HttpURLConnection connection) throws DmException { - try { - connection.setRequestMethod("GET"); - } catch (ProtocolException ex) { - logger.error(ex); - throw new DmException(ex); - } - } - - /** - * Set common PUT request headers plus session cookie. - * - * @param connection HTTP connection - * @param sessionCookie session cookie (may be null) - * @throws DmException in case of any errors - */ - private static void setPutRequestHeaders(HttpURLConnection connection, String sessionCookie) throws DmException { - setPutRequestHeaders(connection); - setCookieRequestHeader(connection, sessionCookie); - } - - /** - * Set common PUT request headers. - * - * @param connection HTTP connection - * @throws DmException in case of any errors - */ - private static void setPutRequestHeaders(HttpURLConnection connection) throws DmException { - try { - connection.setDoOutput(true); - connection.setRequestMethod("PUT"); - connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - } catch (ProtocolException ex) { - logger.error(ex); - throw new DmException(ex); - } - } - - /** - * Set common DELETE request headers plus session cookie. - * - * @param connection HTTP connection - * @param sessionCookie session cookie (may be null) - * @throws DmException in case of any errors - */ - private static void setDeleteRequestHeaders(HttpURLConnection connection, String sessionCookie) throws DmException { - setDeleteRequestHeaders(connection); - setCookieRequestHeader(connection, sessionCookie); - } - - /** - * Set common DELETE request headers. - * - * @param connection HTTP connection - * @throws DmException in case of any errors - */ - private static void setDeleteRequestHeaders(HttpURLConnection connection) throws DmException { - try { - connection.setRequestMethod("DELETE"); - } catch (ProtocolException ex) { - logger.error(ex); - throw new DmException(ex); - } - } - - /** - * Login with a given username and password, and with specified session id. - * - * @param username username - * @param password password - * @param sessionId session id, can be null - * @throws AuthorizationError in case of incorrect username or password - * @throws CommunicationError in case service cannot be contacted - * @throws DmException in case of any other errors - */ - public void login(String username, String password, String sessionId) throws DmException { - HttpURLConnection connection = null; - try { - String urlString = getFullRequestUrl(LOGIN_REQUEST_URL); - URL url = new URL(urlString); - connection = (HttpURLConnection) url.openConnection(); - setPostRequestHeaders(connection); - HashMap<String, String> loginData = new HashMap<>(); - loginData.put("username", username); - loginData.put("password", password); - - logger.debug("Establishing session for user: " + username); - logger.debug("Service URL: " + serviceUrl); - sendPostData(loginData, connection); - checkHttpResponseForDmException(connection); - session.setUsername(username); - session.setId(sessionId); - updateSessionCookie(connection); - } catch (ConnectException ex) { - String errorMsg = "Cannot connect to " + getServiceUrl(); - logger.error(errorMsg); - throw new CommunicationError(errorMsg, ex); - } catch (DmException ex) { - logger.error(ex); - throw ex; - } catch (IOException ex) { - logger.error(ex); - throw new DmException(ex); - } finally { - if (connection != null) { - connection.disconnect(); - } - } - - } - - /** - * Login with a given username and password. - * - * @param username username - * @param password password - * @throws AuthorizationError in case of incorrect username or password - * @throws CommunicationError in case service cannot be contacted - * @throws DmException in case of any other errors - */ - public void login(String username, String password) throws DmException { - login(username, password, DefaultSessionId); - } - - /** - * Invoke GET request with login. - * - * @param requestUrl relative request path, e.g. /object - * @return service response string - * @throws DmException in case of any errors - */ - public String loginAndInvokeSessionGetRequest(String requestUrl) throws DmException { - try { - // If we have session, simply invoke request. - session.verifyCookie(); - return invokeSessionGetRequest(requestUrl); - } catch (InvalidSession ex) { - // Session was invalidated, login and try again - } - login(loginUsername, loginPassword); - return invokeSessionGetRequest(requestUrl); - } - - /** - * Invoke GET request. - * - * @param requestUrl relative request path, e.g. /object - * @return service response string - * @throws DmException in case of any errors - */ - public String invokeSessionGetRequest(String requestUrl) throws DmException { - String urlString = getFullRequestUrl(requestUrl); - HttpURLConnection connection = null; - try { - logger.debug("Invoking session get request for URL: " + requestUrl); - String sessionCookie = session.verifyCookie(); - URL url = new URL(urlString); - connection = (HttpURLConnection) url.openConnection(); - - setGetRequestHeaders(connection, sessionCookie); - updateSessionCookie(connection); - checkHttpResponseForDmException(connection); - logger.debug("Response message:\n" + connection.getResponseMessage()); - return readHttpResponse(connection); - } catch (DmException ex) { - throw ex; - } catch (ConnectException ex) { - String errorMsg = "Cannot connect to " + getServiceUrl(); - logger.error(errorMsg); - throw new CommunicationError(errorMsg, ex); - } catch (IOException ex) { - DmException dmException = convertHttpErrorToDmException(ex, connection); - logger.error(ex.getMessage()); - throw dmException; - } finally { - if (connection != null) { - connection.disconnect(); - } - } - } - - /** - * Invoke GET request. - * - * @param requestUrl relative request path, e.g. /object - * @return service response string - * @throws DmException in case of any errors - */ - public String invokeGetRequest(String requestUrl) throws DmException { - String urlString = getFullRequestUrl(requestUrl); - HttpURLConnection connection = null; - try { - logger.debug("Invoking get request for URL: " + requestUrl); - URL url = new URL(urlString); - connection = (HttpURLConnection) url.openConnection(); - updateSessionCookie(connection); - checkHttpResponseForDmException(connection); - logger.debug("Response message:\n" + connection.getResponseMessage()); - return readHttpResponse(connection); - } catch (DmException ex) { - throw ex; - } catch (ConnectException ex) { - String errorMsg = "Cannot connect to " + getServiceUrl(); - logger.error(errorMsg); - throw new CommunicationError(errorMsg, ex); - } catch (IOException ex) { - DmException dmException = convertHttpErrorToDmException(ex, connection); - logger.error(ex.getMessage()); - throw dmException; - } finally { - if (connection != null) { - connection.disconnect(); - } - } - } - - /** - * Invoke POST request with login. - * - * @param requestUrl relative request path, e.g. /object - * @param data request data - * @return service response string - * @throws DmException in case of any errors - */ - public String loginAndInvokeSessionPostRequest(String requestUrl, Map<String, String> data) throws DmException { - try { - // If we have session, simply invoke request. - session.verifyCookie(); - return invokeSessionPostRequest(requestUrl, data); - } catch (InvalidSession ex) { - // Session was invalidated, login and try again - } - login(loginUsername, loginPassword); - return invokeSessionPostRequest(requestUrl, data); - } - - /** - * Invoke POST request. - * - * @param requestUrl relative request path, e.g. /object - * @param data request data - * @return service response string - * @throws DmException in case of any errors - */ - public String invokeSessionPostRequest(String requestUrl, Map<String, String> data) throws DmException { - String urlString = getFullRequestUrl(requestUrl); - HttpURLConnection connection = null; - try { - logger.debug("Invoking session post request for URL: " + requestUrl); - String sessionCookie = session.verifyCookie(); - URL url = new URL(urlString); - connection = (HttpURLConnection) url.openConnection(); - - setPostRequestHeaders(connection, sessionCookie); - sendPostData(data, connection); - updateSessionCookie(connection); - checkHttpResponseForDmException(connection); - logger.debug("Response message:\n" + connection.getResponseMessage()); - return readHttpResponse(connection); - } catch (DmException ex) { - throw ex; - } catch (ConnectException ex) { - String errorMsg = "Cannot connect to " + getServiceUrl(); - logger.error(errorMsg); - throw new CommunicationError(errorMsg, ex); - } catch (IOException ex) { - DmException dmException = convertHttpErrorToDmException(ex, connection); - logger.error(ex.getMessage()); - throw dmException; - } finally { - if (connection != null) { - connection.disconnect(); - } - } - } - - /** - * Invoke PUT request with login. - * - * @param requestUrl relative request path, e.g. /object - * @param data request data - * @return service response string - * @throws DmException in case of any errors - */ - public String loginAndInvokeSessionPutRequest(String requestUrl, Map<String, String> data) throws DmException { - try { - // If we have session, simply invoke request. - session.verifyCookie(); - return invokeSessionPutRequest(requestUrl, data); - } catch (InvalidSession ex) { - // Session was invalidated, login and try again - } - login(loginUsername, loginPassword); - return invokeSessionPutRequest(requestUrl, data); - } - - /** - * Invoke PUT request. - * - * @param requestUrl relative request path, e.g. /object - * @param data request data - * @return service response string - * @throws DmException in case of any errors - */ - public String invokeSessionPutRequest(String requestUrl, Map<String, String> data) throws DmException { - String urlString = getFullRequestUrl(requestUrl); - HttpURLConnection connection = null; - try { - logger.debug("Invoking session put request for URL: " + requestUrl); - String sessionCookie = session.verifyCookie(); - URL url = new URL(urlString); - connection = (HttpURLConnection) url.openConnection(); - - setPutRequestHeaders(connection, sessionCookie); - sendPostData(data, connection); - updateSessionCookie(connection); - checkHttpResponseForDmException(connection); - logger.debug("Response message:\n" + connection.getResponseMessage()); - return readHttpResponse(connection); - } catch (DmException ex) { - throw ex; - } catch (ConnectException ex) { - String errorMsg = "Cannot connect to " + getServiceUrl(); - logger.error(errorMsg); - throw new CommunicationError(errorMsg, ex); - } catch (IOException ex) { - DmException dmException = convertHttpErrorToDmException(ex, connection); - logger.error(ex.getMessage()); - throw dmException; - } finally { - if (connection != null) { - connection.disconnect(); - } - } - } - - /** - * Invoke DELETE request with login. - * - * @param requestUrl relative request path, e.g. /object - * @return service response string - * @throws DmException in case of any errors - */ - public String loginAndInvokeSessionDeleteRequest(String requestUrl) throws DmException { - try { - // If we have session, simply invoke request. - session.verifyCookie(); - return invokeSessionDeleteRequest(requestUrl); - } catch (InvalidSession ex) { - // Session was invalidated, login and try again - } - login(loginUsername, loginPassword); - return invokeSessionDeleteRequest(requestUrl); - } - - /** - * Invoke DELETE request. - * - * @param requestUrl relative request path, e.g. /dm/object - * @return service response string - * @throws DmException in case of any errors - */ - public String invokeSessionDeleteRequest(String requestUrl) throws DmException { - String urlString = getFullRequestUrl(requestUrl); - HttpURLConnection connection = null; - try { - logger.debug("Invoking session post request for URL: " + requestUrl); - String sessionCookie = session.verifyCookie(); - URL url = new URL(urlString); - connection = (HttpURLConnection) url.openConnection(); - - setDeleteRequestHeaders(connection, sessionCookie); - updateSessionCookie(connection); - checkHttpResponseForDmException(connection); - logger.debug("Response message:\n" + connection.getResponseMessage()); - return readHttpResponse(connection); - } catch (DmException ex) { - throw ex; - } catch (ConnectException ex) { - String errorMsg = "Cannot connect to " + getServiceUrl(); - logger.error(errorMsg); - throw new CommunicationError(errorMsg, ex); - } catch (IOException ex) { - DmException dmException = convertHttpErrorToDmException(ex, connection); - logger.error(ex.getMessage()); - throw dmException; - } finally { - if (connection != null) { - connection.disconnect(); - } - } - } - - - /* - * Main method, used for simple testing. - * - * @param args main arguments - */ - public static void main(String[] args) { - try { - DmRestApi client = new DmRestApi("http://zagreb.svdev.net:10232/dm"); - //client.login("sveseli", "sveseli"); - HashMap<String, String> data = new HashMap<>(); - //data.put("parentDirectory", "/"); - client.invokeGetRequest("/experiment/e1"); - } catch (DmException ex) { - System.out.println("Sorry: " + ex); - } - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/DmSession.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/DmSession.java deleted file mode 100644 index 41e294838c872d7d6239960aba805cf926cd3b73..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/DmSession.java +++ /dev/null @@ -1,100 +0,0 @@ -package gov.anl.aps.dm.api; - -import gov.anl.aps.dm.common.constants.DmRole; -import gov.anl.aps.dm.common.exceptions.InvalidSession; -import java.io.Serializable; -import java.net.HttpCookie; - -/** - * DM session class, used for keeping all session-related information (session - * id, username, role, etc.). - */ -public class DmSession implements Serializable { - - private static final long serialVersionUID = 1L; - - private String id = null; - private String username = null; - private String cookie = null; - private DmRole role = null; - - public DmSession() { - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getCookie() { - return cookie; - } - - public void setCookie(String cookie) { - this.cookie = cookie; - } - - public String verifyCookie() throws InvalidSession { - if (cookie == null) { - throw new InvalidSession("Valid session has not been established."); - } else { - HttpCookie httpCookie = HttpCookie.parse(cookie).get(0); - if (httpCookie.hasExpired()) { - throw new InvalidSession("Session id " + id + " has expired."); - } - } - return cookie; - } - - public DmRole getRole() { - return role; - } - - public void setRole(DmRole role) { - this.role = role; - } - - public boolean isAdminRole() { - if (role != null) { - return role.equals(DmRole.ADMIN); - } - return false; - } - - public boolean isUserRole() { - if (role != null) { - return role.equals(DmRole.USER); - } - return false; - } - - @Override - public String toString() { - String result = "{ "; - String delimiter = ""; - if (username != null) { - result += "username :" + username; - delimiter = "; "; - } - if (id != null) { - result += delimiter + "id : " + id; - delimiter = "; "; - } - if (cookie != null) { - result += delimiter + "cookie : " + cookie; - } - result += " }"; - return result; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/ExperimentDsApi.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/ExperimentDsApi.java deleted file mode 100644 index a60d2dce1c23aee46dc550a4aa4e8f8e7c891609..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/api/ExperimentDsApi.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package gov.anl.aps.dm.api; - -import gov.anl.aps.dm.common.exceptions.ConfigurationError; -import gov.anl.aps.dm.common.exceptions.DmException; -import gov.anl.aps.dm.common.exceptions.InvalidArgument; -import gov.anl.aps.dm.common.exceptions.ObjectNotFound; -import gov.anl.aps.dm.common.objects.DmObjectFactory; -import gov.anl.aps.dm.common.objects.Experiment; -import gov.anl.aps.dm.common.utilities.ArgumentUtility; -import java.util.HashMap; - -/** - * - * @author sveseli - */ -public class ExperimentDsApi extends DmRestApi { - - /** - * Constructor. - * - * @throws ConfigurationError if web service URL property is malformed or - * null - */ - public ExperimentDsApi() throws ConfigurationError { - super(); - } - - /** - * Constructor. - * - * @param webServiceUrl web service URL - * @throws ConfigurationError if web service URL is malformed or null - */ - public ExperimentDsApi(String webServiceUrl) throws ConfigurationError { - super(webServiceUrl); - } - - - /** - * Constructor. - * - * @param webServiceUrl web service URL - * @param loginUsername login username - * @param loginPassword login password - * @throws ConfigurationError if web service URL is malformed or null - */ - public ExperimentDsApi(String webServiceUrl, String loginUsername, String loginPassword) throws ConfigurationError { - super(webServiceUrl, loginUsername, loginPassword); - } - - /** - * Update experiment (group users, etc.). - * - * @param experimentName experiment name - * @return Experiment object - * @throws InvalidArgument if provided name is empty or null - * @throws ObjectNotFound when specified experiment does not exist - * @throws DmException in case of all other errors - */ - public Experiment updateExperiment(String experimentName) throws InvalidArgument, ObjectNotFound, DmException { - ArgumentUtility.verifyNonEmptyString("Experiment name", experimentName); - String requestUrl = "/experiments/update"; - HashMap<String, String> requestData = new HashMap<>(); - requestData.put("name", ArgumentUtility.encode(experimentName)); - String jsonString = loginAndInvokeSessionPutRequest(requestUrl, requestData); - Experiment experiment = (Experiment) DmObjectFactory.createDmObject(jsonString, Experiment.class); - return experiment; - } - - /* - * Main method, used for simple testing. - * - * @param args main arguments - */ - public static void main(String[] args) { - try { - ExperimentDsApi client = new ExperimentDsApi("https://dmstorage.svdev.net:22236/dm", "dm", "dm"); - Experiment experiment = client.updateExperiment("e1"); - System.out.println("Updated experiment: \n" + experiment); - } catch (DmException ex) { - System.out.println("Sorry: " + ex); - } - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmHttpHeader.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmHttpHeader.java deleted file mode 100644 index 93353d26634b8632bd77f20d55a6ed44cbeafcd1..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmHttpHeader.java +++ /dev/null @@ -1,13 +0,0 @@ -package gov.anl.aps.dm.common.constants; - -/** - * HTTP headers specific to DM. - */ -public class DmHttpHeader { - - public static final String DM_SET_COOKIE_HEADER = "Set-Cookie"; - public static final String DM_EXCEPTION_TYPE_HEADER = "Dm-Exception-Type"; - public static final String DM_STATUS_CODE_HEADER = "Dm-Status-Code"; - public static final String DM_STATUS_MESSAGE_HEADER = "Dm-Status-Message"; - public static final String DM_SESSION_ROLE_HEADER = "Dm-Session-Role"; -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmProperty.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmProperty.java deleted file mode 100644 index 9bacbe4a92498cc42a6a32a411b5d2395a913c23..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmProperty.java +++ /dev/null @@ -1,11 +0,0 @@ -package gov.anl.aps.dm.common.constants; - -/** - * DM property names. - */ -public class DmProperty { - - public static final String DS_WEB_SERVICE_URL_PROPERTY_NAME = "dm.dsWebService.url"; - public static final String SYSTEM_USER_PROPERTY_NAME = "dm.system.user"; - public static final String SYSTEM_PASSWORD_FILE_PROPERTY_NAME = "dm.system.passwordFile"; -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmRole.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmRole.java deleted file mode 100644 index d25537362e8daec54ffb7a5d550fab39cdaa9a1c..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmRole.java +++ /dev/null @@ -1,34 +0,0 @@ -package gov.anl.aps.dm.common.constants; - -/** - * DM role enum. - */ -public enum DmRole { - - USER("user"), - ADMIN("admin"); - - private final String type; - - private DmRole(String type) { - this.type = type; - } - - @Override - public String toString() { - return type; - } - - public static DmRole fromString(String type) { - DmRole role = null; - switch (type) { - case "user": - role = USER; - break; - case "admin": - role = ADMIN; - break; - } - return role; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmServiceProtocol.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmServiceProtocol.java deleted file mode 100644 index dc875e89776d8aac7ddcf0dfa727c05c35ed6aa1..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmServiceProtocol.java +++ /dev/null @@ -1,34 +0,0 @@ -package gov.anl.aps.dm.common.constants; - -/** - * DM service protocol enum. - */ -public enum DmServiceProtocol { - - HTTP("http"), - HTTPS("https"); - - private final String type; - - private DmServiceProtocol(String type) { - this.type = type; - } - - @Override - public String toString() { - return type; - } - - public static DmServiceProtocol fromString(String type) { - DmServiceProtocol protocol = null; - switch (type) { - case "http": - protocol = HTTP; - break; - case "https": - protocol = HTTPS; - break; - } - return protocol; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmStatus.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmStatus.java deleted file mode 100644 index b269968b7777cfc723210d78628ab8abd9dc83ab..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/constants/DmStatus.java +++ /dev/null @@ -1,26 +0,0 @@ -package gov.anl.aps.dm.common.constants; - -/** - * DM status codes. - */ -public class DmStatus { - - public static final int DM_OK = 0; - public static final int DM_ERROR = 1; - public static final int DM_INTERNAL_ERROR = 2; - public static final int DM_COMMUNICATION_ERROR = 3; - public static final int DM_CONFIGURATION_ERROR = 4; - public static final int DM_AUTHORIZATION_ERROR = 5; - public static final int DM_AUTHENTICATION_ERROR = 6; - public static final int DM_DB_ERROR = 7; - public static final int DM_URL_ERROR = 8; - public static final int DM_TIMEOUT_ERROR = 9; - public static final int DM_INVALID_ARGUMENT = 10; - public static final int DM_INVALID_REQUEST = 11; - public static final int DM_INVALID_SESSION = 12; - public static final int DM_COMMAND_FAILED = 13; - public static final int DM_OBJECT_NOT_FOUND = 14; - public static final int DM_OBJECT_ALREADY_EXISTS = 15; - public static final int DM_INVALID_OBJECT_STATE = 16; - public static final int DM_FILE_PROCESSING_ERROR = 17; -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/AuthenticationError.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/AuthenticationError.java deleted file mode 100644 index 9361d06d69d74213751ae8ca3b4fe5d94fbc074c..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/AuthenticationError.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Authentication error exception. - */ -public class AuthenticationError extends DmException { - - /** - * Default constructor. - */ - public AuthenticationError() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public AuthenticationError(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public AuthenticationError(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public AuthenticationError(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_AUTHENTICATION_ERROR; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/AuthorizationError.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/AuthorizationError.java deleted file mode 100644 index 6a6fbab808344816fb82b8ba46dfe5a62c578cfc..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/AuthorizationError.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Authorization error exception. - */ -public class AuthorizationError extends DmException { - - /** - * Default constructor. - */ - public AuthorizationError() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public AuthorizationError(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public AuthorizationError(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public AuthorizationError(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_AUTHORIZATION_ERROR; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/CommunicationError.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/CommunicationError.java deleted file mode 100644 index bd202cef54f0d691f9568b46007328415e5d7f6e..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/CommunicationError.java +++ /dev/null @@ -1,50 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Communication error exception. - */ -public class CommunicationError extends DmException { - - /** - * Default constructor. - */ - public CommunicationError() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public CommunicationError(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public CommunicationError(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public CommunicationError(String message, Throwable throwable) { - super(message, throwable); - } - - - @Override - public int getErrorCode() { - return DmStatus.DM_COMMUNICATION_ERROR; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ConfigurationError.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ConfigurationError.java deleted file mode 100644 index acd8c938071e2e6c85e961638a7257c5cbd73523..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ConfigurationError.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Configuration error exception. - */ -public class ConfigurationError extends DmException { - - /** - * Default constructor. - */ - public ConfigurationError() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public ConfigurationError(String message) { - super(message); - } - - /** - * Constructor sing throwable object. - * - * @param throwable throwable object - */ - public ConfigurationError(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public ConfigurationError(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_CONFIGURATION_ERROR; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DbError.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DbError.java deleted file mode 100644 index a07885db9ea31e2c3ccb932db03385c3ab8202b5..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DbError.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * DB error exception. - */ -public class DbError extends DmException { - - /** - * Default constructor. - */ - public DbError() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public DbError(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public DbError(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public DbError(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_DB_ERROR; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DmException.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DmException.java deleted file mode 100644 index ae88da18e66f6e254caeee6a0ebc4ec2f7f95662..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DmException.java +++ /dev/null @@ -1,84 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Generic DM exception, used as base class for all DM exceptions. - */ -public class DmException extends Exception { - - /** - * Exception keys. - */ - public static final String SIGNATURE_KEY = "__dm_exception__"; - public static final String TYPE_KEY = "type"; - public static final String CODE_KEY = "code"; - public static final String ARGS_KEY = "args"; - - private String error = null; - - /** - * Default constructor. - */ - public DmException() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public DmException(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public DmException(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public DmException(String message, Throwable throwable) { - super(message, throwable); - } - - public int getErrorCode() { - return DmStatus.DM_ERROR; - } - - public void setErrorMessage(String error) { - this.error = error; - } - - public String getErrorMessage() { - if (error != null) { - return error; - } - return super.getMessage(); - } - - /** - * Convert exception to string, overriding string output if error message is - * set. - * - * @return exception string - */ - @Override - public String toString() { - if (error != null) { - return error; - } else { - return super.toString(); - } - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DmExceptionFactory.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DmExceptionFactory.java deleted file mode 100644 index d067c3a7cc389f9051f091ef1fe45a801a5cc1b5..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/DmExceptionFactory.java +++ /dev/null @@ -1,92 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; -import org.apache.log4j.Logger; - -/** - * DM exception factory class. - * - */ -public class DmExceptionFactory { - - private static final Logger logger - = Logger.getLogger(DmExceptionFactory.class.getName()); - - /** - * Generate DM exception. - * - * @param type exception type - * @param code exception code - * @param error exception error message - * @return generated DM exception - */ - public static DmException generateDmException(String type, int code, String error) { - DmException exc = new DmException(); - try { - String fullType = "gov.anl.aps.dm.common.exceptions." + type; - // Having trouble getting code below to work in all cases, so - // use code for now. - // exc = (DmException) Class.forName(fullType).newInstance(); - switch (code) { - - case DmStatus.DM_AUTHORIZATION_ERROR: - exc = new AuthorizationError(); - break; - case DmStatus.DM_COMMUNICATION_ERROR: - exc = new CommunicationError(); - break; - case DmStatus.DM_CONFIGURATION_ERROR: - exc = new ConfigurationError(); - break; - case DmStatus.DM_INTERNAL_ERROR: - exc = new InternalError(); - break; - case DmStatus.DM_DB_ERROR: - exc = new DbError(); - break; - case DmStatus.DM_INVALID_ARGUMENT: - exc = new InvalidArgument(); - break; - case DmStatus.DM_INVALID_REQUEST: - exc = new InvalidRequest(); - break; - case DmStatus.DM_INVALID_SESSION: - exc = new InvalidSession(); - break; - case DmStatus.DM_OBJECT_ALREADY_EXISTS: - exc = new ObjectAlreadyExists(); - break; - case DmStatus.DM_OBJECT_NOT_FOUND: - exc = new ObjectNotFound(); - break; - case DmStatus.DM_INVALID_OBJECT_STATE: - exc = new InvalidObjectState(); - break; - case DmStatus.DM_TIMEOUT_ERROR: - exc = new TimeoutError(); - break; - default: - exc = (DmException) Class.forName(fullType).newInstance(); - } - } catch (ClassNotFoundException | IllegalAccessException | InstantiationException ex) { - String err = "Cannot generate exception of type " + type + ": " + ex; - logger.error(err); - } - exc.setErrorMessage(error); - return exc; - } - - /** - * Throw DM exception. - * - * @param type exception type - * @param code exception code - * @param error exception error message - * @throws DmException generated DM exception whenever this method is - * called - */ - public static void throwDmException(String type, int code, String error) throws DmException { - DmException exc = generateDmException(type, code, error); - throw exc; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InternalError.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InternalError.java deleted file mode 100644 index 955b18b66e098d910e250d47d39058147977aafa..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InternalError.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Internal error exception. - */ -public class InternalError extends DmException { - - /** - * Default constructor. - */ - public InternalError() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public InternalError(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public InternalError(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public InternalError(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_INTERNAL_ERROR; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidArgument.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidArgument.java deleted file mode 100644 index feb1990d9ebe43116afdecc7d764663ec42d92c1..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidArgument.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Invalid argument exception. - */ -public class InvalidArgument extends DmException { - - /** - * Default constructor. - */ - public InvalidArgument() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public InvalidArgument(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public InvalidArgument(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public InvalidArgument(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_INVALID_ARGUMENT; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidObjectState.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidObjectState.java deleted file mode 100644 index 97700d6847b77a031f525bf00fec8827f7526ed3..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidObjectState.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Invalid object state exception. - */ -public class InvalidObjectState extends DmException { - - /** - * Default constructor. - */ - public InvalidObjectState() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public InvalidObjectState(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public InvalidObjectState(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public InvalidObjectState(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_INVALID_OBJECT_STATE; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidRequest.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidRequest.java deleted file mode 100644 index fccb3c6eee1d363a1a7053553de78ad88a4d8ec8..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidRequest.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Invalid request exception. - */ -public class InvalidRequest extends DmException { - - /** - * Default constructor. - */ - public InvalidRequest() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public InvalidRequest(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public InvalidRequest(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public InvalidRequest(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_INVALID_REQUEST; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidSession.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidSession.java deleted file mode 100644 index 569fe7897cadf90f840172b6449092331c0fc2f8..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/InvalidSession.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Invalid session exception. - */ -public class InvalidSession extends DmException { - - /** - * Default constructor. - */ - public InvalidSession() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public InvalidSession(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public InvalidSession(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public InvalidSession(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_INVALID_SESSION; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ObjectAlreadyExists.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ObjectAlreadyExists.java deleted file mode 100644 index 6e5edf45d512d127f92b72d168abe6e158ef2c71..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ObjectAlreadyExists.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Object already exists exception. - */ -public class ObjectAlreadyExists extends DmException { - - /** - * Default constructor. - */ - public ObjectAlreadyExists() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public ObjectAlreadyExists(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public ObjectAlreadyExists(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public ObjectAlreadyExists(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_OBJECT_ALREADY_EXISTS; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ObjectNotFound.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ObjectNotFound.java deleted file mode 100644 index 1ad72872968912155f5d70a3085b9c1862149ffe..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/ObjectNotFound.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Object not found exception. - */ -public class ObjectNotFound extends DmException { - - /** - * Default constructor. - */ - public ObjectNotFound() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public ObjectNotFound(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public ObjectNotFound(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public ObjectNotFound(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_OBJECT_NOT_FOUND; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/TimeoutError.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/TimeoutError.java deleted file mode 100644 index 446ee6d25cf6d686bbee7a3fa585f2405b9d7297..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/exceptions/TimeoutError.java +++ /dev/null @@ -1,49 +0,0 @@ -package gov.anl.aps.dm.common.exceptions; - -import gov.anl.aps.dm.common.constants.DmStatus; - -/** - * Timeout error. - */ -public class TimeoutError extends DmException { - - /** - * Default constructor. - */ - public TimeoutError() { - super(); - } - - /** - * Constructor using error message. - * - * @param message error message - */ - public TimeoutError(String message) { - super(message); - } - - /** - * Constructor using throwable object. - * - * @param throwable throwable object - */ - public TimeoutError(Throwable throwable) { - super(throwable); - } - - /** - * Constructor using error message and throwable object. - * - * @param message error message - * @param throwable throwable object - */ - public TimeoutError(String message, Throwable throwable) { - super(message, throwable); - } - - @Override - public int getErrorCode() { - return DmStatus.DM_TIMEOUT_ERROR; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/DmObject.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/DmObject.java deleted file mode 100644 index 82c9d1b2915547f60257e0f50d36cbbdc6f5e92b..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/DmObject.java +++ /dev/null @@ -1,69 +0,0 @@ -package gov.anl.aps.dm.common.objects; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import gov.anl.aps.dm.common.exceptions.DmException; -import java.io.Serializable; - -/** - * Base DM object class. - */ -public class DmObject implements Serializable { - - protected Long id = null; - protected String name = null; - protected String description = null; - - public DmObject() { - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - /** - * Conversion to JSON string representation. - * - * @return JSON string - */ - public String toJson() { - Gson gson = new GsonBuilder().create(); - return gson.toJson(this); - } - - /** - * Encode object. - * - * @throws DmException in case of any errors - */ - public void encode() throws DmException { - } - - /** - * Decode object. - * - * @throws DmException in case of any errors - */ - public void decode() throws DmException { - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/DmObjectFactory.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/DmObjectFactory.java deleted file mode 100644 index f003a16daf5872ef033e473d4961713e3984bad5..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/DmObjectFactory.java +++ /dev/null @@ -1,81 +0,0 @@ -package gov.anl.aps.dm.common.objects; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.reflect.TypeToken; -import gov.anl.aps.dm.common.exceptions.DmException; -import java.lang.reflect.Type; -import java.util.LinkedList; -import java.util.List; -import org.apache.log4j.Logger; - -/** - * DM object factory class. - */ -public class DmObjectFactory { - - private static final Logger logger = Logger.getLogger(DmObjectFactory.class.getName()); - private static final Gson gson = new GsonBuilder().create(); - - /** - * Create object from JSON string. - * - * @param <T> template class - * @param jsonString JSON string - * @param objectClass object class - * @return generated object - */ - public static <T extends Object> T createObject(String jsonString, Class<T> objectClass) { - logger.debug("Converting JSON string to object " + objectClass + ": " + jsonString); - T object = gson.fromJson(jsonString, objectClass); - return object; - } - - /** - * Create DM object from JSON string. - * - * @param <T> template class - * @param jsonString JSON string - * @param dmClass DM object class - * @return generated DM object - * @throws DmException in case of any errors - */ - public static <T extends DmObject> T createDmObject(String jsonString, Class<T> dmClass) throws DmException { - logger.debug("Converting JSON string to DM object " + dmClass + ": " + jsonString); - T dmObject = gson.fromJson(jsonString, dmClass); - dmObject.decode(); - return dmObject; - } - - /** - * Create list of DM objects from JSON string. - * - * @param <T> template class - * @param jsonString DM string - * @return generated list of DM objects - */ - public static <T extends DmObject> List<T> createDmObjectList(String jsonString) { - // This method does not appear to work as template, so we have - // to write specific methods for each object type. - logger.debug("Converting JSON string to dm object list: " + jsonString); - Type dmType = new TypeToken<LinkedList<T>>() { - }.getType(); - List<T> dmObjectList = gson.fromJson(jsonString, dmType); - return dmObjectList; - } - - /** - * Create list of string objects from JSON string. - * - * @param jsonString JSON string - * @return generated list of string objects - */ - public static List<String> createStringObjectList(String jsonString) { - logger.debug("Converting JSON string to string object list: " + jsonString); - Type dmType = new TypeToken<LinkedList<String>>() { - }.getType(); - List<String> dmObjectList = gson.fromJson(jsonString, dmType); - return dmObjectList; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/Experiment.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/Experiment.java deleted file mode 100644 index cf334be86cfea04490c54ccba1dcbf5813b90d54..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/objects/Experiment.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.common.objects; - -/** - * Experiment class. - */ -public class Experiment extends DmObject { - - public Experiment() { - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/ArgumentUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/ArgumentUtility.java deleted file mode 100644 index eca2ae81414350156f500e968d64d09a77c1931e..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/ArgumentUtility.java +++ /dev/null @@ -1,181 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -import gov.anl.aps.dm.common.exceptions.InvalidArgument; -import gov.anl.aps.dm.common.exceptions.DmException; -import java.util.Map; -import javax.xml.bind.DatatypeConverter; - -/** - * Utility class for processing and checking function arguments. - */ -public class ArgumentUtility { - - /** - * Check that input string is not null and not empty. - * - * @param arg input argument to be checked - * @return true if input string is not null and not empty, false otherwise - */ - public static boolean isNonEmptyString(String arg) { - return arg != null && !arg.isEmpty(); - } - - /** - * Convert input argument to string. - * - * @param arg input argument to be checked - * @return original argument string representation, or empty string if - * argument is null - */ - public static String toNonNullString(Object arg) { - if (arg == null) { - return ""; - } - return arg.toString(); - } - - /** - * Verify that input string is not null and not empty. - * - * @param argName name of the argument to be verified; used for error - * message - * @param arg input argument to be checked - * @throws InvalidArgument if input string is null or empty - */ - public static void verifyNonEmptyString(String argName, String arg) throws InvalidArgument { - if (arg == null || arg.isEmpty()) { - throw new InvalidArgument(argName + " must be non-empty string."); - } - } - - /** - * Verify that input string contains given pattern. - * - * @param argName name of the argument to be verified; used for error - * message - * @param arg input argument to be checked - * @param pattern string that must be contained in the input argument - * @throws InvalidArgument if input string is null or empty, or if it does - * not contain specified pattern - */ - public static void verifyStringContainsPattern(String argName, String arg, String pattern) throws InvalidArgument { - verifyNonEmptyString(argName, arg); - verifyNonEmptyString("Pattern", pattern); - if (!arg.contains(pattern)) { - throw new InvalidArgument(argName + " must contain pattern " + pattern + "."); - } - } - - /** - * Verify that input integer is not null and greater than zero. - * - * @param argName name of the argument to be verified; used for error - * message - * @param arg input argument to be checked - * @throws InvalidArgument if input number is null or not positive - */ - public static void verifyPositiveInteger(String argName, Integer arg) throws InvalidArgument { - if (arg == null || arg <= 0) { - throw new InvalidArgument(argName + " must be a positive number."); - } - } - - /** - * Verify that input double is not null and greater than zero. - * - * @param argName name of the argument to be verified; used for error - * message - * @param arg input argument to be checked - * @throws InvalidArgument if input number is null or not positive - */ - public static void verifyPositiveDouble(String argName, Double arg) throws InvalidArgument { - if (arg == null || arg <= 0) { - throw new InvalidArgument(argName + " must be a positive number."); - } - } - - /** - * Verify that input object is not null. - * - * @param argName name of the argument to be verified; used for error - * message - * @param arg input argument to be checked - * @throws InvalidArgument if input string is null or empty - */ - public static void verifyNonNullObject(String argName, Object arg) throws InvalidArgument { - if (arg == null) { - throw new InvalidArgument(argName + " cannot be null."); - } - } - - /** - * Add (key,value) pair to map if value is not null or empty. - * - * @param map target map - * @param key key - * @param value string that will be added to map if it is not null or empty - */ - public static void addNonEmptyKeyValuePair(Map<String, String> map, String key, String value) { - if (value != null && !value.isEmpty()) { - map.put(key, value); - } - } - - /** - * Add (key,value) pair to map if value is not null or empty. - * - * @param map target map - * @param key key - * @param valueObject object that will be added to map if it has non-empty - * string representation - */ - public static void addNonEmptyKeyValuePair(Map<String, String> map, String key, Object valueObject) { - if (valueObject != null) { - String value = valueObject.toString(); - if (!value.isEmpty()) { - map.put(key, value); - } - } - } - - /** - * Base 64 encode. - * - * @param input input string - * @return base 64 encoded string - * @throws DmException in case of any errors - */ - public static String encode(String input) throws DmException { - try { - // Input is twice encoded in order to avoid issues like - // '+' being interpreted as space - if (input == null) { - return input; - } - String s1 = DatatypeConverter.printBase64Binary(input.getBytes()); - String s2 = DatatypeConverter.printBase64Binary(s1.getBytes()); - return s2; - } catch (Exception ex) { - throw new DmException(ex); - } - } - - /** - * Base 64 decode. - * - * @param input base 64 encoded string - * @return decoded string - * @throws DmException in case of any errors - */ - public static String decode(String input) throws DmException { - try { - // Input is twice encoded in order to avoid issues like - // '+' being interpreted as space - byte[] ba1 = DatatypeConverter.parseBase64Binary(input); - byte[] ba2 = DatatypeConverter.parseBase64Binary(new String(ba1)); - return new String(ba2); - } catch (Exception ex) { - throw new DmException(ex); - } - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/CollectionUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/CollectionUtility.java deleted file mode 100644 index e6138960ebbf40f55f5b7432cc7edae5ccac1397..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/CollectionUtility.java +++ /dev/null @@ -1,101 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -import java.util.List; -import java.util.ListIterator; -import javax.faces.model.SelectItem; - -/** - * Utility class for manipulating collections. - */ -public class CollectionUtility { - - /** - * Prepare array of SelectItem objects for menus - * - * @param entities list of objects - * @param selectOne true if resulting array should contain "Select" string - * @return array of SelectItem objects - */ - public static SelectItem[] getSelectItems(List<?> entities, boolean selectOne) { - int size = selectOne ? entities.size() + 1 : entities.size(); - SelectItem[] items = new SelectItem[size]; - int i = 0; - if (selectOne) { - items[0] = new SelectItem("", "Select"); - i++; - } - for (Object x : entities) { - items[i++] = new SelectItem(x, x.toString()); - } - return items; - } - - /** - * Prepare display string for a list of objects. - * - * @param list object list - * @param beginDelimiter beginning delimiter - * @param itemDelimiter item delimiter - * @param endDelimiter ending delimiter - * @return list display string - */ - public static String displayItemList(List<?> list, String beginDelimiter, String itemDelimiter, String endDelimiter) { - String result = beginDelimiter; - boolean addItemDelimiter = false; - if (list != null) { - for (Object item : list) { - if (!addItemDelimiter) { - addItemDelimiter = true; - } else { - result += itemDelimiter; - } - result += item.toString(); - } - } - result += endDelimiter; - return result; - } - - /** - * Prepare display string for a list of objects without outside delimiters. - * - * @param list object list - * @param itemDelimiter item delimiter - * @return list display string - */ - public static String displayItemListWithoutOutsideDelimiters(List<?> list, String itemDelimiter) { - String beginDelimiter = ""; - String endDelimiter = ""; - return displayItemList(list, beginDelimiter, itemDelimiter, endDelimiter); - } - - /** - * Prepare display string for a list of objects with spaces as delimiters. - * - * @param list object list - * @return list display string - */ - public static String displayItemListWithoutDelimiters(List<?> list) { - String beginDelimiter = ""; - String itemDelimiter = ""; - String endDelimiter = ""; - return displayItemList(list, beginDelimiter, itemDelimiter, endDelimiter); - } - - /** - * Remove null references from list of objects. - * - * @param list object list - */ - public static void removeNullReferencesFromList(List<?> list) { - if (list == null) { - return; - } - ListIterator iterator = list.listIterator(); - while (iterator.hasNext()) { - if (iterator.next() == null) { - iterator.remove(); - } - } - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/CryptUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/CryptUtility.java deleted file mode 100644 index 426fc8574d3b34262d734c8d7017ef376ce35e63..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/CryptUtility.java +++ /dev/null @@ -1,110 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.security.spec.InvalidKeySpecException; -import java.util.Random; -import javax.crypto.SecretKeyFactory; -import javax.crypto.spec.PBEKeySpec; -import org.apache.log4j.Logger; -import org.primefaces.util.Base64; - -/** - * Utility class for encrypting and verifying passwords. - */ -public class CryptUtility { - - private static final String SecretKeyFactoryType = "PBKDF2WithHmacSHA1"; - private static final int Pbkdf2Iterations = 1003; - private static final int Pbkdf2KeyLengthInBits = 192; - private static final int SaltLengthInBytes = 4; - private static final char[] SaltCharset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".toCharArray(); - private static final String SaltDelimiter = "$"; - - private static final Logger logger = Logger.getLogger(CryptUtility.class.getName()); - - /** - * Generate random string. - * - * @param characterSet set to draw characters from - * @param length string length - * @return generated string - */ - public static String randomString(char[] characterSet, int length) { - Random random = new SecureRandom(); - char[] result = new char[length]; - for (int i = 0; i < result.length; i++) { - // picks a random index out of character set > random character - int randomCharIndex = random.nextInt(characterSet.length); - result[i] = characterSet[randomCharIndex]; - } - return new String(result); - } - - /** - * Encrypt password using PBKDF2 key derivation function. - * - * @param password input password - * @return encrypted password - */ - public static String cryptPasswordWithPbkdf2(String password) { - String salt = randomString(SaltCharset, SaltLengthInBytes); - return saltAndCryptPasswordWithPbkdf2(password, salt); - } - - /** - * Apply salt string and encrypt password using PBKDF2 standard. - * - * @param password input password - * @param salt salt string - * @return encrypted password - */ - public static String saltAndCryptPasswordWithPbkdf2(String password, String salt) { - char[] passwordChars = password.toCharArray(); - byte[] saltBytes = salt.getBytes(); - - PBEKeySpec spec = new PBEKeySpec( - passwordChars, - saltBytes, - Pbkdf2Iterations, - Pbkdf2KeyLengthInBits - ); - SecretKeyFactory key; - try { - key = SecretKeyFactory.getInstance(SecretKeyFactoryType); - byte[] hashedPassword = key.generateSecret(spec).getEncoded(); - String encodedPassword = Base64.encodeToString(hashedPassword, true); - return salt + SaltDelimiter + encodedPassword; - } catch (NoSuchAlgorithmException | InvalidKeySpecException ex) { - // Should not happen - logger.error("Password cannot be crypted: " + ex); - } - return null; - } - - /** - * Verify encrypted password. - * - * @param password password to be verified - * @param cryptedPassword original encrypted password - * @return true if passwords match, false otherwise - */ - public static boolean verifyPasswordWithPbkdf2(String password, String cryptedPassword) { - int saltEnd = cryptedPassword.indexOf(SaltDelimiter); - String salt = cryptedPassword.substring(0, saltEnd); - return cryptedPassword.equals(saltAndCryptPasswordWithPbkdf2(password, salt)); - } - - /* - * Main method, used for simple testing. - * - * @param args main arguments - */ - public static void main(String[] args) { - String password = "dm"; - System.out.println("Original password: " + password); - String cryptedPassword = cryptPasswordWithPbkdf2(password); - System.out.println("Crypted password: " + cryptedPassword); - System.out.println("Verified: " + verifyPasswordWithPbkdf2(password, cryptedPassword)); - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/DateUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/DateUtility.java deleted file mode 100644 index d1a063fda016fbce291460f4a5ace57e41dc16b6..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/DateUtility.java +++ /dev/null @@ -1,21 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * Utility class for manipulating dates. - */ -public class DateUtility { - - private static final SimpleDateFormat DateTimeFormat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - - /** - * Format current date. - * - * @return formatted date string - */ - public static String getCurrentDateTime() { - return DateTimeFormat.format(new Date()); - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/FileUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/FileUtility.java deleted file mode 100644 index 669dd712c6da59bb666bd88adb4edddb9a60e0d5..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/FileUtility.java +++ /dev/null @@ -1,26 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -/** - * Utility class for manipulating files. - */ -public class FileUtility { - - /** - * Get file extension. - * - * @param fileName file name - * @return file extension - */ - public static String getFileExtension(String fileName) { - String extension = ""; - if (fileName != null && !fileName.isEmpty()) { - int extIndex = fileName.lastIndexOf('.'); - int dirIndex = Math.max(fileName.lastIndexOf('/'), fileName.lastIndexOf('\\')); - if (extIndex > dirIndex) { - extension = fileName.substring(extIndex + 1); - } - } - return extension.toLowerCase(); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/LdapUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/LdapUtility.java deleted file mode 100644 index 336caf28fe78130d79f49219b0125c9da739ddbd..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/LdapUtility.java +++ /dev/null @@ -1,63 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -import gov.anl.aps.dm.portal.utilities.ConfigurationUtility; -import java.util.Hashtable; -import javax.naming.Context; -import javax.naming.NamingException; -import javax.naming.directory.DirContext; -import javax.naming.directory.InitialDirContext; -import org.apache.log4j.Logger; - -/** - * LDAP utility class for verifying user credentials. - * - * @see NoServerVerificationSSLSocketFactory - */ -public class LdapUtility { - - private static final String LdapUrlPropertyName = "dm.portal.ldapUrl"; - private static final String LdapDnStringPropertyName = "dm.portal.ldapDnString"; - private static final String ldapUrl = ConfigurationUtility.getPortalProperty(LdapUrlPropertyName); - private static final String ldapDnString = ConfigurationUtility.getPortalProperty(LdapDnStringPropertyName); - - private static final Logger logger = Logger.getLogger(LdapUtility.class.getName()); - - /** - * Validate user credentials. - * - * Use username and password to attempt initial connection and bind with - * LDAP server. Successful connection implies that credentials are accepted. - * - * @param username username - * @param password password - * - * @return true if credentials are valid, false otherwise - */ - public static boolean validateCredentials(String username, String password) { - - // dump out immediately if not given password - if (password.isEmpty()) { - return false; - } - - boolean validated = false; - Hashtable env = new Hashtable(); - String dn = ldapDnString.replace("USERNAME", username); - logger.debug("Authenticating: " + dn); - env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); - env.put(Context.PROVIDER_URL, ldapUrl); - env.put(Context.SECURITY_AUTHENTICATION, "simple"); - env.put(Context.SECURITY_PRINCIPAL, dn); - env.put(Context.SECURITY_CREDENTIALS, password); - // the below property allows us to circumvent server certificate checks - env.put("java.naming.ldap.factory.socket", "gov.anl.aps.dm.common.utilities.NoServerVerificationSSLSocketFactory"); - try { - DirContext ctx = new InitialDirContext(env); - validated = true; - } catch (NamingException ex) { - logger.error(ex); - } - return validated; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/NoOpTrustManager.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/NoOpTrustManager.java deleted file mode 100644 index e0a4936240b064bdc5ac76c4547d14bea1e82808..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/NoOpTrustManager.java +++ /dev/null @@ -1,30 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -import java.security.cert.X509Certificate; -import javax.net.ssl.X509TrustManager; - -/** - * Dummy trust manager class. - * - * A trivial implementation of <code>X509TrustManager</code> that doesn't - * actually check the validity of a certificate. This allows us to make SSL - * connections to internal servers without requiring the installation and - * maintenance of certificates in the client keystore. - * - * @see NoServerVerificationSSLSocketFactory - */ -public class NoOpTrustManager implements X509TrustManager { - - @Override - public void checkClientTrusted(X509Certificate[] cert, String authType) { - } - - @Override - public void checkServerTrusted(X509Certificate[] cert, String authType) { - } - - @Override - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/NoServerVerificationSSLSocketFactory.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/NoServerVerificationSSLSocketFactory.java deleted file mode 100644 index 96088b175ebd41a7f3bdf769e2bcf230f80be2e8..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/NoServerVerificationSSLSocketFactory.java +++ /dev/null @@ -1,153 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.Socket; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import javax.net.SocketFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.TrustManager; -import org.apache.log4j.Logger; - -/** - * SSL socket factory that does not verify server credentials. - * - * A minor extension of <code>SSLSocketFactory</code> that installs a dummy - * trust manager. This allows creation of SSL sockets that don't verify the - * server certificates. - * - * @see NoOpTrustManager - */ -public class NoServerVerificationSSLSocketFactory extends SSLSocketFactory { - - private static final Logger logger = Logger.getLogger(NoServerVerificationSSLSocketFactory.class.getName()); - - private SSLSocketFactory factory; - - /** - * Default constructor. - */ - public NoServerVerificationSSLSocketFactory() { - try { - TrustManager tm = new NoOpTrustManager(); - SSLContext sslcontext = SSLContext.getInstance("TLS"); - sslcontext.init(null, // No KeyManager required - new TrustManager[]{tm}, - new java.security.SecureRandom()); - - factory = (SSLSocketFactory) sslcontext.getSocketFactory(); - } catch (KeyManagementException | NoSuchAlgorithmException ex) { - logger.error(ex); - } - } - - /** - * Get default (no server verification) socket factory. - * - * @return socket factory - */ - public static SocketFactory getDefault() { - return new NoServerVerificationSSLSocketFactory(); - } - - /** - * Create SSL socket layered over an existing socket connected to the named - * host, at a given port. - * - * @param socket existing socket - * @param host - * @param port - * @param autoClose - * @return created socket - * @throws IOException in case of IO errors - */ - @Override - public Socket createSocket(Socket socket, String host, int port, boolean autoClose) - throws IOException { - return factory.createSocket(socket, host, port, autoClose); - } - - /** - * Create a socket and connect it to the specified remote address/port, and - * bind it to the specified local address/port. - * - * @param address server network address - * @param port server port - * @param localAddress client network address - * @param localPort client port - * @return created socket - * @throws IOException in case of IO errors - */ - @Override - public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) - throws IOException { - return factory.createSocket(address, port, localAddress, localPort); - } - - /** - * Create a socket and connect it to the specified remote address/port. - * - * @param address server network address - * @param port server port - * @return created socket - * @throws IOException in case of IO errors - */ - @Override - public Socket createSocket(InetAddress address, int port) throws IOException { - return factory.createSocket(address, port); - } - - /** - * Create a socket and connect it to the specified remote host/port, and - * bind it to the specified local address/port. - * - * @param host server host - * @param port server port - * @param localAddress client network address - * @param localPort client port - * @return created socket - * @throws IOException in case of IO errors - */ - @Override - public Socket createSocket(String host, int port, InetAddress localAddress, int localPort) - throws IOException { - return factory.createSocket(host, port, localAddress, localPort); - } - - /** - * Create a socket and connect it to the specified remote host/port, and - * bind it to the specified local address/port. - * - * @param host server host - * @param port server port - * @return created socket - * @throws IOException in case of IO errors - */ - @Override - public Socket createSocket(String host, int port) throws IOException { - return factory.createSocket(host, port); - } - - /** - * Get default cipher suites from socket factory. - * - * @return list of default ciphers - */ - @Override - public String[] getDefaultCipherSuites() { - return factory.getSupportedCipherSuites(); - } - - /** - * Get supported cipher suites from socket factory. - * - * @return list of supported ciphers - */ - @Override - public String[] getSupportedCipherSuites() { - return factory.getSupportedCipherSuites(); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/ObjectUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/ObjectUtility.java deleted file mode 100644 index 41788da35bc4004910a997881ef4d9d9447c5736..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/ObjectUtility.java +++ /dev/null @@ -1,27 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -/** - * Object utility class. - */ -public class ObjectUtility { - - /** - * Verify that two objects are the same. - * - * Object references can be null. - * - * @param <Type> template type of given objects - * @param object1 first object - * @param object2 second object - * @return true if objects are equal, false otherwise - */ - public static <Type> boolean equals(Type object1, Type object2) { - if (object1 == null && object2 == null) { - return true; - } - if (object1 == null || object2 == null) { - return false; - } - return object1.equals(object2); - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/StringUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/StringUtility.java deleted file mode 100644 index e418496b9351999c34169e14f40de0b4e7bdc7da..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/common/utilities/StringUtility.java +++ /dev/null @@ -1,36 +0,0 @@ -package gov.anl.aps.dm.common.utilities; - -/** - * String utility class. - */ -public class StringUtility { - - /** - * Verify that two char sequences are the same. - * - * Input string references can be null. - * - * @param cs1 first sequence - * @param cs2 second sequence - * @return true if char sequences are the same, false otherwise - */ - public static boolean equals(CharSequence cs1, CharSequence cs2) { - if (cs1 == null && cs2 == null) { - return true; - } - if (cs1 == null || cs2 == null) { - return false; - } - return cs1.equals(cs2); - } - - /** - * Capitalize first letter of a given string. - * - * @param input input string - * @return capitalized string - */ - public static String capitalize(String input) { - return input.substring(0, 1).toUpperCase() + input.substring(1); - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/constants/DmStatus.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/constants/DmStatus.java deleted file mode 100644 index c2bdc586f2d45cbc420757dff64dc9a18e0555f0..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/constants/DmStatus.java +++ /dev/null @@ -1,19 +0,0 @@ - -package gov.anl.aps.dm.portal.constants; - -/** - * Status codes. - */ -public class DmStatus -{ - public static final int DM_OK = 0; - public static final int DM_ERROR = 1; - public static final int DM_DB_ERROR = 2; - public static final int DM_TIMEOUT = 3; - public static final int DM_INVALID_ARGUMENT = 4; - public static final int DM_INVALID_OBJECT_STATE = 5; - public static final int DM_OBJECT_ALREADY_EXISTS = 6; - public static final int DM_OBJECT_NOT_FOUND = 7; - public static final int DM_INVALID_DATE = 8; - public static final int DM_MISSING_PROPERTY = 9; -} \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/constants/RoleTypeName.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/constants/RoleTypeName.java deleted file mode 100644 index 1a3a809eee711561383d3be44fc9838b7a917a6a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/constants/RoleTypeName.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.constants; - -/** - * - * @author bfrosik - */ -public class RoleTypeName { - public static final String ADMIN = "Administrator"; - public static final String EXPERIMENT_ADMIN = "Experiment_Administrator"; - public static final String MANAGER = "Manager"; - public static final String PI = "PI"; - public static final String USER = "User"; -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/AllowedPolicyValueController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/AllowedPolicyValueController.java deleted file mode 100644 index 106c109349f07ff7eb26aad9402ab560c101e7ca..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/AllowedPolicyValueController.java +++ /dev/null @@ -1,247 +0,0 @@ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.exceptions.MissingProperty; -import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists; -import gov.anl.aps.dm.portal.model.entities.AllowedPolicyValue; -import gov.anl.aps.dm.portal.model.beans.AllowedPolicyValueFacade; -import gov.anl.aps.dm.portal.model.entities.PolicyProperty; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import javax.ejb.EJB; -import javax.inject.Named; -import javax.enterprise.context.SessionScoped; -import javax.faces.model.DataModel; -import javax.faces.model.ListDataModel; - -import org.apache.log4j.Logger; - -@Named("allowedPolicyValueController") -@SessionScoped -public class AllowedPolicyValueController extends CrudEntityController<AllowedPolicyValue, AllowedPolicyValueFacade> -{ - private static final Logger logger = Logger.getLogger(AllowedPolicyValueController.class.getName()); - - class ValueCopy { - private final String value; - private final String description; - - ValueCopy(String value, String description) { - this.value = value; - this.description = description; - } - - boolean isUpdated(AllowedPolicyValue editedAllowedPolicyValue) { - return (!editedAllowedPolicyValue.getPolicyValue().equals(value) || !editedAllowedPolicyValue.getDescription().equals(description)); - } - - String getValue() { - return value; - } - - String getDescription() { - return description; - } - } - - @EJB - private AllowedPolicyValueFacade allowedPolicyValueFacade; - - private final Map<AllowedPolicyValue, ValueCopy> editMap = new HashMap<>(); - - class AllowedPolicyValueInfoTable extends DataTableController<AllowedPolicyValue> { - - @Override - public String getEntityName() { - return "AllowedPolicyValue"; - } - - @Override - public List<AllowedPolicyValue> findAll() { - return allowedPolicyValueFacade.findByPolicyPropertyId(getPolicyProperty().getId()); - } - - @Override - public String getTableName() { - return "allowedPolicyValueInfoTable"; - } - } - - private AllowedPolicyValueInfoTable allowedPolicyValueInfoTable = new AllowedPolicyValueInfoTable(); - private PolicyProperty policyProperty; - private int rows = 25; - - public AllowedPolicyValueController() { - } - - public AllowedPolicyValueInfoTable getAllowedPolicyValueInfoTable() { - return allowedPolicyValueInfoTable; - } - - public void setAllowedPolicyValueInfoTable(AllowedPolicyValueInfoTable allowedPolicyValueInfoTable) { - this.allowedPolicyValueInfoTable = allowedPolicyValueInfoTable; - } - - public PolicyProperty getPolicyProperty() { - return policyProperty; - } - - public void setPolicyProperty(PolicyProperty policyProperty) { - clear(); - this.policyProperty = policyProperty; - } - - public int getRows() { - return rows; - } - - public void setRows(int rows) { - this.rows = rows; - } - - @Override - protected AllowedPolicyValueFacade getFacade() { - return allowedPolicyValueFacade; - } - - @Override - public DataModel createListDataModel() { - List<AllowedPolicyValue> allowedValueList = allowedPolicyValueFacade.findByPolicyPropertyId(policyProperty.getId()); - for (AllowedPolicyValue allowedPolicyValue : allowedValueList) { - editMap.put(allowedPolicyValue, new ValueCopy(allowedPolicyValue.getPolicyValue(), allowedPolicyValue.getDescription())); - } - return new ListDataModel((List) allowedValueList); - } - - @Override - public List<AllowedPolicyValue> getAvailableItems() { - List<AllowedPolicyValue> allowedValueList = allowedPolicyValueFacade.findByPolicyPropertyId(policyProperty.getId()); - return (allowedValueList); - } - - @Override - protected AllowedPolicyValue createEntityInstance() { - return new AllowedPolicyValue(); - } - - @Override - public String getEntityTypeName() { - return "AllowedPolicyValue"; - } - - @Override - public String getCurrentEntityInstanceName() { - if (getCurrent() != null) { - return getCurrent().getPolicyValue(); - } - return ""; - } - - @Override - public String prepareEdit(AllowedPolicyValue allowedPolicyValue) { - super.prepareEdit(allowedPolicyValue); - return "/views/allowedPolicyValue/edit?faces-redirect=true"; - } - - @Override - public String prepareView(AllowedPolicyValue allowedPolicyValue) { - current = allowedPolicyValue; - super.prepareView(allowedPolicyValue); - return "/views/allowedPolicyValue/view?faces-redirect=true"; - } - - @Override - public String prepareCreate() { - super.prepareCreate(); - return "/views/allowedPolicyValue/create?faces-redirect=true"; - } - - @Override - public String create() { - AllowedPolicyValue newValue = current; - if (super.create() == null) { - return null; - } - policyProperty.getAllowedPolicyValueList().add(newValue); - allowedPolicyValueInfoTable.resetList(); - return null; - } - - @Override - public String destroy() { - AllowedPolicyValue propertyValue = current; - super.destroy(); - policyProperty.getAllowedPolicyValueList().remove(propertyValue); - clear(); - return null; - } - - @Override - public void prepareEntityInsert(AllowedPolicyValue allowedPolicyValue) throws ObjectAlreadyExists, MissingProperty { - current.setPolicyProperty(policyProperty); - if ((allowedPolicyValue.getPolicyValue() == null) || (allowedPolicyValue.getPolicyValue().length() == 0)) { - throw new MissingProperty("Policy Value is missing."); - } - List<AllowedPolicyValue> propertyAllowedPolicyValueList = allowedPolicyValueFacade.findByPolicyPropertyId(policyProperty.getId()); - for (AllowedPolicyValue policyValue : propertyAllowedPolicyValueList) { - if ((allowedPolicyValue.getPolicyValue().equals(policyValue.getPolicyValue()))) { - throw new ObjectAlreadyExists("allowed policy value " + allowedPolicyValue.getPolicyValue() + " already exists for this property."); - } - } - } - - @Override - public void prepareEntityUpdate(AllowedPolicyValue allowedPolicyValue) throws DmPortalException { - if ((allowedPolicyValue.getPolicyValue() == null) || (allowedPolicyValue.getPolicyValue().length() == 0)) { - throw new MissingProperty("Policy Value is missing."); - } - ValueCopy tempValueCopy = editMap.get(allowedPolicyValue); - editMap.remove(allowedPolicyValue); - Collection<ValueCopy> propertyAllowedPolicyValueList = editMap.values(); - for (ValueCopy valueCopy : propertyAllowedPolicyValueList) { - if ((valueCopy.getValue().equals(allowedPolicyValue.getPolicyValue()))) { - throw new ObjectAlreadyExists("allowed policy value " + allowedPolicyValue.getPolicyValue() + " already exists for this property."); - } - } - editMap.put(allowedPolicyValue, tempValueCopy); - } - - @Override - public String prepareList() { - logger.debug("Preparing list"); - resetListDataModel(); - return "/views/policyProperty/view?faces-redirect=true"; - } - - @Override - protected String getObjectAlreadyExistMessage(AllowedPolicyValue entity) { - return null; - } - - @Override - public void clear() { - allowedPolicyValueInfoTable.resetList(); - resetList(); - editMap.clear(); - } - - @Override - public String update() { - Iterator<AllowedPolicyValue> iterator = getListDataModel().iterator(); - while (iterator.hasNext()) { - AllowedPolicyValue editedAllowedPolicyValue = iterator.next(); - ValueCopy valueCopy = editMap.get(editedAllowedPolicyValue); - if ((valueCopy != null) && (valueCopy.isUpdated(editedAllowedPolicyValue))) { - current = editedAllowedPolicyValue; - super.update(); - } - } - clear(); - return null; - } - -} - \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/CrudEntityController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/CrudEntityController.java deleted file mode 100644 index 475125afef6afa49a8745d224a35a0a91e792014..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/CrudEntityController.java +++ /dev/null @@ -1,306 +0,0 @@ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.model.beans.AbstractFacade; -import gov.anl.aps.dm.portal.model.entities.CloneableEntity; -import gov.anl.aps.dm.common.utilities.CollectionUtility; -import gov.anl.aps.dm.portal.utilities.SessionUtility; - -import java.io.Serializable; - -import java.util.List; -import javax.annotation.PostConstruct; -import javax.faces.model.DataModel; -import javax.faces.model.ListDataModel; -import javax.faces.model.SelectItem; -import org.apache.log4j.Logger; -import org.primefaces.component.datatable.DataTable; - -public abstract class CrudEntityController<EntityType extends CloneableEntity, FacadeType extends AbstractFacade<EntityType>> implements Serializable -{ - - private static final Logger logger = Logger.getLogger(CrudEntityController.class.getName()); - - - protected EntityType current = null; - - private DataModel listDataModel = null; - private DataTable listDataTable = null; - private List<EntityType> filteredObjectList = null; - - - private DataModel selectDataModel = null; - private DataTable selectDataTable = null; - private List<EntityType> selectedObjectList = null; - - - public CrudEntityController() { - } - - @PostConstruct - public void initialize() { - } - - protected abstract FacadeType getFacade(); - - protected abstract EntityType createEntityInstance(); - - public abstract String getEntityTypeName(); - - public String getDisplayEntityTypeName() { - return getEntityTypeName(); - } - - public abstract String getCurrentEntityInstanceName(); - - public EntityType getCurrent() { - return current; - } - - public void setCurrent(EntityType current) { - this.current = current; - } - - public void selectByRequestParams() { - } - - public EntityType getSelected() { - if (current == null) { - current = createEntityInstance(); - } - return current; - } - - public String resetList() { - logger.debug("Resetting list"); - return prepareList(); - } - - public String prepareList() { - logger.debug("Preparing list"); - resetListDataModel(); - return "list?faces-redirect=true"; - } - - - public DataTable getListDataTable() { - if (listDataTable == null) { - logger.debug("Recreating data table"); - listDataTable = new DataTable(); - } - return listDataTable; - } - - public void setListDataTable(DataTable listDataTable) { - this.listDataTable = listDataTable; - } - - public DataTable getSelectDataTable() { - return selectDataTable; - } - - public void setSelectDataTable(DataTable selectDataTable) { - this.selectDataTable = selectDataTable; - } - - public String prepareView(EntityType entity) { - clear(); - logger.debug("Preparing view"); - current = entity; - return "view?faces-redirect=true"; - } - - public void clear() { - - } - - public String view() { - return "view?faces-redirect=true"; - } - - public String prepareCreate() { - current = createEntityInstance(); - return "create?faces-redirect=true"; - } - - protected void prepareEntityInsert(EntityType entity) throws DmPortalException { - } - - public String create() { - try { - EntityType newEntity = current; - prepareEntityInsert(current); - getFacade().create(current); - SessionUtility.addInfoMessage("Success", "Created " + getDisplayEntityTypeName() + " " + getCurrentEntityInstanceName() + "."); - resetListDataModel(); - current = newEntity; - return prepareList(); - } - catch (DmPortalException | RuntimeException ex) { - SessionUtility.addErrorMessage("Error", "Could not create " + getDisplayEntityTypeName() + ": " + ex.getMessage()); - return null; - } - } - - public String prepareEdit(EntityType entity) { - current = entity; - return edit(); - } - - public String edit() { - resetSelectDataModel(); - return "edit?faces-redirect=true"; - } - - protected void prepareEntityUpdate(EntityType entity) throws DmPortalException { - } - - public String update() { - try { - logger.debug("Updating " + getDisplayEntityTypeName() + " " + getCurrentEntityInstanceName()); - prepareEntityUpdate(current); - EntityType updatedEntity = getFacade().edit(current); - SessionUtility.addInfoMessage("Success", "Updated " + getDisplayEntityTypeName() + " " + getCurrentEntityInstanceName() + "."); - resetListDataModel(); - current = updatedEntity; - return view(); - } - catch (DmPortalException ex) { - SessionUtility.addErrorMessage("Error", "Could not update " + getDisplayEntityTypeName() + ": " + ex.getMessage()); - return null; - } - catch (RuntimeException ex) { - SessionUtility.addErrorMessage("Error", "Could not update " + getDisplayEntityTypeName() + ": " + getObjectAlreadyExistMessage(current)); - return null; - } - } - - abstract protected String getObjectAlreadyExistMessage(EntityType entity); - - public void destroy(EntityType entity) { - current = entity; - destroy(); - } - - public String destroy() { - if (current == null) { - logger.warn("Current item is not set"); - // Do nothing if current item is not set. - return null; - } - try { - logger.debug("Destroying " + getCurrentEntityInstanceName()); - getFacade().remove(current); - SessionUtility.addInfoMessage("Success", "Deleted " + getDisplayEntityTypeName() + " " + getCurrentEntityInstanceName() + "."); - resetListDataModel(); - return prepareList(); - } - catch (Exception ex) { - SessionUtility.addErrorMessage("Error", "Could not delete " + getDisplayEntityTypeName() + ": " + ex.getMessage()); - return null; - } - } - - public DataModel createListDataModel() { - return new ListDataModel(getFacade().findAll()); - } - - public DataModel getListDataModel() { - resetListDataModel(); - listDataModel = createListDataModel(); - return listDataModel; - } - - public void prepareEntityListForSelection(List<EntityType> selectEntityList) { - } - - public DataModel createSelectDataModel() { - List<EntityType> selectEntityList = getFacade().findAll(); - prepareEntityListForSelection(selectEntityList); - return new ListDataModel(selectEntityList); - } - - public DataModel getSelectDataModel() { - if (selectDataModel == null) { - selectDataModel = createSelectDataModel(); - } - return selectDataModel; - } - - public DataModel getItems() { - return getListDataModel(); - } - - public List<EntityType> getSelectedObjectListAndResetSelectDataModel() { - List<EntityType> returnList = selectedObjectList; - resetSelectDataModel(); - return returnList; - } - - public List<EntityType> getSelectedObjectList() { - return selectedObjectList; - } - - public List<EntityType> getFilteredObjectList() { - return filteredObjectList; - } - - public List<EntityType> getFilteredItems() { - return filteredObjectList; - } - - public void resetSelectedObjectList() { - selectedObjectList = null; - } - - public void setSelectedObjectList(List<EntityType> selectedObjectList) { - this.selectedObjectList = selectedObjectList; - } - - public void setFilteredObjectList(List<EntityType> filteredObjectList) { - this.filteredObjectList = filteredObjectList; - } - - public void setFilteredItems(List<EntityType> filteredItems) { - this.filteredObjectList = filteredItems; - } - - public void resetListDataModel() { - listDataModel = null; - listDataTable = null; - filteredObjectList = null; - current = null; - } - - public void resetSelectDataModel() { - selectDataModel = null; - selectDataTable = null; - selectedObjectList = null; - } - - public List<EntityType> getAvailableItems() { - return getFacade().findAll(); - } - - public EntityType getEntity(Integer id) { - return getFacade().find(id); - } - - public SelectItem[] getAvailableItemsForSelectMany() { - return CollectionUtility.getSelectItems(getFacade().findAll(), false); - } - - public SelectItem[] getAvailableItemsForSelectOne() { - return CollectionUtility.getSelectItems(getFacade().findAll(), true); - } - - public String getCurrentViewId() { - return SessionUtility.getCurrentViewId(); - } - - public static String displayEntityList(List<?> entityList) { - String itemDelimiter = ", "; - return CollectionUtility.displayItemListWithoutOutsideDelimiters(entityList, itemDelimiter); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/DataTableController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/DataTableController.java deleted file mode 100644 index 7312ab3a85268bbaf082d848982b93701a6852df..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/DataTableController.java +++ /dev/null @@ -1,98 +0,0 @@ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.model.entities.CloneableEntity; -import java.io.Serializable; -import java.util.List; -import javax.faces.model.DataModel; -import javax.faces.model.ListDataModel; -import org.apache.log4j.Logger; -import org.primefaces.component.datatable.DataTable; - -public abstract class DataTableController<EntityType extends CloneableEntity> implements Serializable -{ - - private static final Logger logger = Logger.getLogger(DataTableController.class.getName()); - - - protected EntityType currentObject = null; - - private DataModel listDataModel = null; - private DataTable listDataTable = null; - private List<EntityType> filteredObjectList = null; - private List<EntityType> selectedObjectList = null; - - public abstract List<EntityType> findAll(); - - public abstract String getTableName(); - - public abstract String getEntityName(); - - public EntityType getCurrentObject() { - return currentObject; - } - - public void setCurrentObject(EntityType current) { - this.currentObject = current; - } - - public DataModel createListDataModel() { - return new ListDataModel(findAll()); - } - - public DataModel getListDataModel() { - if (listDataModel == null) { - listDataModel = createListDataModel(); - } - return listDataModel; - } - - public void resetList() { - logger.debug("Resetting list"+" "+getTableName()); - listDataModel = null; - listDataTable = null; - filteredObjectList = null; - selectedObjectList = null; - currentObject = null; - } - - public DataTable getListDataTable() { - if (listDataTable == null) { - logger.debug("Recreating data table"+" "+getTableName()); - listDataTable = new DataTable(); - } - return listDataTable; - } - - public void setListDataTable(DataTable listDataTable) { - this.listDataTable = listDataTable; - } - - public List<EntityType> getFilteredObjectList() { - return filteredObjectList; - } - - public void setFilteredObjectList(List<EntityType> filteredObjectList) { - this.filteredObjectList = filteredObjectList; - } - - public List<EntityType> getFilteredItems() { - return filteredObjectList; - } - - public void setFilteredItems(List<EntityType> filteredItems) { - this.filteredObjectList = filteredItems; - } - - public void resetFilterList() { - filteredObjectList = null; - } - - public List<EntityType> getSelectedObjectList() { - return selectedObjectList; - } - - public void setSelectedObjectList(List<EntityType> selectedObjectList) { - this.selectedObjectList = selectedObjectList; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentController.java deleted file mode 100644 index edb47262408626e4ec98c9e267c979fcbd1b4aad..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentController.java +++ /dev/null @@ -1,968 +0,0 @@ - -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.api.ExperimentDsApi; -import gov.anl.aps.dm.common.exceptions.DmException; -import gov.anl.aps.dm.portal.constants.RoleTypeName; -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists; -import gov.anl.aps.dm.portal.exceptions.InvalidDate; -import gov.anl.aps.dm.portal.exceptions.MissingProperty; -import gov.anl.aps.dm.portal.model.entities.Experiment; -import gov.anl.aps.dm.portal.model.beans.ExperimentFacade; -import gov.anl.aps.dm.portal.model.beans.ExperimentPolicyFacade; -import gov.anl.aps.dm.portal.model.beans.ExperimentPolicyPropertyValueFacade; -import gov.anl.aps.dm.portal.model.beans.PolicyTypeFacade; -import gov.anl.aps.dm.portal.model.beans.RoleTypeFacade; -import gov.anl.aps.dm.portal.model.beans.UserExperimentRoleFacade; -import gov.anl.aps.dm.portal.model.beans.UserInfoFacade; -import gov.anl.aps.dm.portal.model.entities.CloneableEntity; -import gov.anl.aps.dm.portal.model.entities.ExperimentPolicy; -import gov.anl.aps.dm.portal.model.entities.ExperimentPolicyPropertyValue; -import gov.anl.aps.dm.portal.model.entities.PolicyProperty; -import gov.anl.aps.dm.portal.model.entities.PolicyType; -import gov.anl.aps.dm.portal.model.entities.RoleType; -import gov.anl.aps.dm.portal.model.entities.UserExperimentRole; -import gov.anl.aps.dm.portal.model.entities.UserInfo; -import gov.anl.aps.dm.common.utilities.CollectionUtility; -import gov.anl.aps.dm.portal.utilities.DmApiFactory; -import gov.anl.aps.dm.portal.utilities.SessionUtility; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.ejb.EJB; -import javax.inject.Named; -import javax.enterprise.context.SessionScoped; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.convert.Converter; -import javax.faces.convert.FacesConverter; -import javax.faces.model.DataModel; -import javax.faces.model.ListDataModel; -import javax.faces.model.SelectItem; -import org.apache.log4j.Logger; - -@Named("experimentController") -@SessionScoped -public class ExperimentController extends CrudEntityController<Experiment, ExperimentFacade> -{ - private static final Logger logger = Logger.getLogger(ExperimentController.class.getName()); - - @EJB - private ExperimentFacade experimentFacade; - - @EJB - private UserInfoFacade userInfoFacade; - - @EJB - private RoleTypeFacade roleTypeFacade; - - @EJB - private UserExperimentRoleFacade userExperimentRoleFacade; - - @EJB - private PolicyTypeFacade policyTypeFacade; - - @EJB - private ExperimentPolicyFacade experimentPolicyFacade; - - @EJB - private ExperimentPolicyPropertyValueFacade experimentPolicyPropertyValueFacade; - - public class ExperimentUser extends CloneableEntity { - - String name; - int experimentId; - private final UserInfo user; - private final boolean[] userRoles; - - public ExperimentUser(int experimentId, UserInfo user) { - userRoles = new boolean[maxExperimentRoleTypeId + 1]; - this.experimentId = experimentId; - this.user = user; - } - - public String getBadge() { - return user.getBadge(); - } - - public UserInfo getUser() { - return user; - } - - public String getGlobusUsername() { - return user.getGlobusUsername(); - } - - public String getUsername() { - return user.getUsername(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public boolean isIsManager() { - return userRoles[experimentRoles.get(RoleTypeName.MANAGER).getId()]; - } - - public void setIsManager(boolean isManager) { - userRoles[experimentRoles.get(RoleTypeName.MANAGER).getId()] = isManager; - } - - public boolean isIsPI() { - return userRoles[experimentRoles.get(RoleTypeName.PI).getId()]; - } - - public void setIsPI(boolean isPI) { - userRoles[experimentRoles.get(RoleTypeName.PI).getId()] = isPI; - } - - public boolean isIsUser() { - return userRoles[experimentRoles.get(RoleTypeName.USER).getId()]; - } - - public void setIsUser(boolean isUser) { - userRoles[experimentRoles.get(RoleTypeName.USER).getId()] = isUser; - } - - public void setIsInRole(RoleType role, boolean isInRole) { - userRoles[role.getId()] = isInRole; - } - - public boolean[] getRoles() { - return userRoles; - } - - @Override - public int hashCode() { - return user.getId() + experimentId * 100; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof ExperimentUser)) { - return false; - } - return ((user.getId() == ((ExperimentUser) object).user.getId()) && (experimentId == ((ExperimentUser) object).experimentId)); - } - } - - @SessionScoped - class ExperimentUsersTable extends DataTableController<ExperimentUser> { - - @Override - public String getEntityName() { - return "ExperimentUser"; - } - - @Override - public List<ExperimentUser> findAll() { - List<UserInfo> list = userInfoFacade.findUsersInExperiment(getCurrent().getId()); - return convertExperimentUsers(list); - } - - List<ExperimentUser> convertExperimentUsers(List<UserInfo> list) { - if (!initialized) { - initializeTables(); - } - logger.debug("converting ExperimentUser "); - ExperimentUser experimentUser; - for (UserInfo user : list) { - if ((experimentUser = experimentUsers.get(user)) == null) { - experimentUser = new ExperimentUser(getCurrent().getId(), user); - experimentUser.setName(user.getLastName() + ", " + user.getFirstName()); - experimentUsers.put(user, experimentUser); - } - for (RoleType roleType : experimentRoles.values()) { - boolean inRole = (user.getExperimentRole(roleType.getId(), getCurrent().getId()) != null); - experimentUser.setIsInRole(roleType, inRole); - } - } - return new ArrayList<>(experimentUsers.values()); - } - - @Override - public String getTableName() { - return "experimentUsersTable"; - } - } - - @SessionScoped - class NoExperimentUsersTypeTable extends DataTableController<UserInfo> { - - @Override - public String getEntityName() { - return "UserInfo"; - } - - @Override - public List<UserInfo> findAll() { - resetList(); - return userInfoFacade.findNoUsersInExperiment(getCurrent().getId()); - } - - @Override - public String getTableName() { - return "noExperimentUsersTable"; - } - } - - @SessionScoped - class ExperimentPolicyTable extends DataTableController<ExperimentPolicy> { - - boolean forEdit; - - ExperimentPolicyTable(boolean forEdit) { - this.forEdit = forEdit; - } - - @Override - public String getEntityName() { - return "ExperimentPolicy"; - } - - @Override - public List<ExperimentPolicy> findAll() { - resetList(); - List<ExperimentPolicy> experimentPolicies = experimentPolicyFacade.findByExperimentId(current.getId()); - if (forEdit) { - experimentPropertiesMap.clear(); - for (ExperimentPolicy experimentPolicy : experimentPolicies) { - for (ExperimentPolicyPropertyValue experimentPolicyPropertyValue : experimentPolicy.getExperimentPolicyPropertyValueList()) { - experimentPropertiesMap.put(experimentPolicyPropertyValue.getId(), experimentPolicyPropertyValue.getPolicyPropertyValue()); - } - } - } - return experimentPolicies; - } - - @Override - public String getTableName() { - return "experimentPolicyTable"; - } - } - - public class PolicyPropertyValue extends CloneableEntity { - - private PolicyProperty policyProperty; - private String value; - - public PolicyProperty getPolicyProperty() { - return policyProperty; - } - - public void setPolicyProperty(PolicyProperty policyProperty) { - this.policyProperty = policyProperty; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public boolean hasAllowedValues() { - return (policyProperty.getAllowedPolicyValueList() != null) && (policyProperty.getAllowedPolicyValueList().size() > 0); - } - - public int getId() { - return policyProperty.getId(); - } - } - - public class MissingPolicyType extends CloneableEntity { - - private List<PolicyPropertyValue> noPropertyList = new ArrayList<>(); - private final int id; - private final String name; - - MissingPolicyType(int id, String name) { - this.id = id; - this.name = name; - } - - public List<PolicyPropertyValue> getNoPropertyList() { - return noPropertyList; - } - - public void setNoPropertyList(List<PolicyPropertyValue> noPropertyList) { - this.noPropertyList = noPropertyList; - } - - public int getId() { - return id; - } - - public String getName() { - return name; - } - - protected void clear() { - noPropertyList.clear(); - } - - protected boolean isEmpty() { - return noPropertyList.isEmpty(); - } - } - - @SessionScoped - public class NoPolicyValueTable extends DataTableController<PolicyPropertyValue> { - - NoPolicyValueTable() { - } - - @Override - public String getEntityName() { - return "PolicyPropertyValue"; - } - - @Override - public List<PolicyPropertyValue> findAll() { - setMissingProperties(experimentPolicyFacade.findByExperimentId(current.getId()), policyTypeFacade.findAll()); - List<PolicyPropertyValue> missingProperties = new ArrayList<>(); - for (MissingPolicyType missingPolicyType : missingPolicyTypes) { - missingProperties.addAll(missingPolicyType.getNoPropertyList()); - } - return missingProperties; - } - - @Override - public String getTableName() { - return "noPolicyValueTable"; - } - } - - private final int rows = 25; - private ExperimentPolicyPropertyValue experimentPropertyToDelete; - private ExperimentController.ExperimentUsersTable experimentUsersListTable = new ExperimentController.ExperimentUsersTable(); - private ExperimentController.ExperimentUsersTable experimentUsersEditTable = new ExperimentController.ExperimentUsersTable(); - private ExperimentController.NoExperimentUsersTypeTable noExperimentUsersTypeTable = new ExperimentController.NoExperimentUsersTypeTable(); - private ExperimentController.ExperimentPolicyTable experimentPolicyListTable = new ExperimentController.ExperimentPolicyTable(false); - private ExperimentController.ExperimentPolicyTable experimentPolicyEditTable = new ExperimentController.ExperimentPolicyTable(true); - private ExperimentController.NoPolicyValueTable noPolicyValueTable = new ExperimentController.NoPolicyValueTable(); - final private Map<UserInfo, ExperimentUser> experimentUsers = new HashMap<>(); - final private Map<String, RoleType> experimentRoles = new HashMap<>(); - int maxExperimentRoleTypeId = 0; - boolean initialized = false; - private List<MissingPolicyType> missingPolicyTypes = new ArrayList<>(); - private final Map<Integer, String> experimentPropertiesMap = new HashMap<>(); - private final List<String> notEditableTypes = new ArrayList<>(); - { notEditableTypes.add("ESAF"); } - - public ExperimentController() { - } - - @Override - public void clear() { - experimentUsersListTable.resetList(); - experimentUsersEditTable.resetList(); - experimentUsers.clear(); - noExperimentUsersTypeTable.resetList(); - experimentPolicyListTable.resetList(); - missingPolicyTypes.clear(); - experimentPolicyEditTable.resetList(); - noPolicyValueTable.resetList(); - experimentPropertyToDelete = null; - } - - @Override - protected ExperimentFacade getFacade() { - return experimentFacade; - } - - @Override - protected Experiment createEntityInstance() { - Experiment newExperiment = new Experiment(); - if (!initialized) { - initializeTables(); - } - return newExperiment; - } - - @Override - public String getEntityTypeName() { - return "experiment"; - } - - @Override - public String getCurrentEntityInstanceName() { - if (getCurrent() != null) { - return getCurrent().getName(); - } - return ""; - } - - private boolean isAdmin(String username) { - return roleTypeFacade.findByName(RoleTypeName.ADMIN).isAdmin(username); - } - - @Override - public DataModel createListDataModel() { - UserInfo logged = (UserInfo) SessionUtility.getUser(); - if (logged == null) { - return null; - } - if (isAdmin(logged.getUsername())) { - return new ListDataModel(getFacade().findAll()); - } else { - return new ListDataModel(userInfoFacade.findExperimentsInUser(logged.getId())); - } - } - - @Override - public List<Experiment> getAvailableItems() { - UserInfo logged = (UserInfo) SessionUtility.getUser(); - if (logged == null) { - return null; - } - if (isAdmin(logged.getUsername())) { - return getFacade().findAll(); - } else { - return userInfoFacade.findExperimentsInUser(logged.getId()); - } - } - - @Override - public DataModel createSelectDataModel() { - UserInfo logged = (UserInfo) SessionUtility.getUser(); - if (logged == null) { - return null; - } - List<Experiment> selectEntityList; - if (isAdmin(logged.getUsername())) { - selectEntityList = getFacade().findAll(); - } else { - selectEntityList = userInfoFacade.findExperimentsInUser(logged.getId()); - } - prepareEntityListForSelection(selectEntityList); - return new ListDataModel(selectEntityList); - } - - @Override - public SelectItem[] getAvailableItemsForSelectMany() { - UserInfo logged = (UserInfo) SessionUtility.getUser(); - if (logged == null) { - return null; - } - if (isAdmin(logged.getUsername())) { - return CollectionUtility.getSelectItems(getFacade().findAll(), false); - } else { - return CollectionUtility.getSelectItems(userInfoFacade.findExperimentsInUser(logged.getId()), false); - } - } - - @Override - public SelectItem[] getAvailableItemsForSelectOne() { - UserInfo logged = (UserInfo) SessionUtility.getUser(); - if (logged == null) { - return null; - } - if (isAdmin(logged.getUsername())) { - return CollectionUtility.getSelectItems(getFacade().findAll(), true); - } else { - return CollectionUtility.getSelectItems(userInfoFacade.findExperimentsInUser(logged.getId()), true); - } - } - - @Override - public String prepareEdit(Experiment experiment) { - clear(); - if (!initialized) { - initializeTables(); - } - return super.prepareEdit(experiment); - } - - private void initializeTables() { - List<RoleType> roleTypesList = roleTypeFacade.findAll(); - for (RoleType roleType : roleTypesList) { - if (!roleType.isIsSystemRole()) { - experimentRoles.put(roleType.getName(), roleType); - if (roleType.getId() > maxExperimentRoleTypeId) { - maxExperimentRoleTypeId = roleType.getId(); - } - } - } - initialized = true; - } - - @Override - public void prepareEntityInsert(Experiment experiment) throws ObjectAlreadyExists, InvalidDate, MissingProperty { - if ((experiment.getName() == null) || (experiment.getName().length() == 0)){ - throw new MissingProperty("Experiment name is missing."); - } - Experiment existingExperiment = experimentFacade.findByName(experiment.getName()); - if (existingExperiment != null) { - throw new ObjectAlreadyExists("Experiment " + experiment.getName() + " already exists."); - } - - verifyExperiment(experiment); - logger.debug("Inserting new experiment " + experiment.getName()); - } - - @Override - public void prepareEntityUpdate(Experiment experiment) throws DmPortalException { - if ((experiment.getName() == null) || (experiment.getName().length() == 0)) { - throw new MissingProperty("Experiment name is missing."); - } - verifyExperiment(experiment); - logger.debug("Updating experiment " + experiment.getName()); - } - - @Override - protected String getObjectAlreadyExistMessage(Experiment experiment) { - if (experiment == null) { - return null; - } - return "Experiment " + experiment.getName() + " already exists."; - } - - private void verifyExperiment(Experiment experiment) throws InvalidDate, MissingProperty { - if (experiment.getExperimentType() == null) { - throw new MissingProperty("Experiment Type is missing."); - } - - if ((experiment.getStartDate() != null) && (experiment.getEndDate() != null) && (experiment.getEndDate().before(experiment.getStartDate()))) { - throw new InvalidDate("Experiment end date is before start date."); - } - } - - @Override - public String update() { - boolean updated; - for (UserInfo user : experimentUsers.keySet()) { - updated = false; - ExperimentUser experimentUser = experimentUsers.get(user); - for (RoleType roleType : experimentRoles.values()) { - if (!roleType.isIsSystemRole()) { - int roleId = roleType.getId(); - if (user.getExperimentRole(roleId, experimentUser.experimentId) == null) { - if (experimentUser.userRoles[roleId]) { - UserExperimentRole userExperimentRole = new UserExperimentRole(user.getId(), experimentUser.experimentId, roleId); - user.addUserExperimentRole(userExperimentRole); - updated = true; - logger.debug("adding userExperimentRole " + user.getId() + " " + experimentUser.experimentId + " " + roleId); - } - } else if (!experimentUser.userRoles[roleId]) { - user.removeExperimentRole(roleId, experimentUser.experimentId); - updated = true; - logger.debug("adding userExperimentRole " + user.getId() + " " + experimentUser.experimentId + " " + roleId); - } - } - if (updated) { - userInfoFacade.edit(user); - } - } - } - - Iterator<ExperimentPolicy> iterator = experimentPolicyEditTable.getListDataModel().iterator(); - while (iterator.hasNext()) { - ExperimentPolicy experimentPolicy = iterator.next(); - for (ExperimentPolicyPropertyValue experimentPolicyPropertyValue : experimentPolicy.getExperimentPolicyPropertyValueList()) { - String oldValue = experimentPropertiesMap.get(experimentPolicyPropertyValue.getId()); - String newValue = experimentPolicyPropertyValue.getPolicyPropertyValue(); - if ((oldValue != null) && !oldValue.equals(experimentPolicyPropertyValue.getPolicyPropertyValue())) { - experimentPolicyPropertyValue.setModifiedBy(((UserInfo) SessionUtility.getUser()).getUsername()); - experimentPolicyPropertyValue.setModifiedDate(new Date()); - experimentPolicyPropertyValue.setPolicyPropertyValue(newValue); - experimentPolicyPropertyValueFacade.edit(experimentPolicyPropertyValue); - } - } - } - - // Notify DS Web Service - try { - ExperimentDsApi api = DmApiFactory.getExperimentDsApi(); - api.updateExperiment(getCurrent().getName()); - } - catch (DmException ex) { - logger.error("Could not notify Data Storage Service: " + ex); - SessionUtility.addErrorMessage("Error", "Unable to notify Data Storage Service: " + ex.getErrorMessage()); - } - clear(); - return super.update(); - } - - void setMissingProperties(List<ExperimentPolicy> experimentPolicies, List<PolicyType> policyTypes) { - for (PolicyType policyType : policyTypes) { - ExperimentPolicy theExperimentPolicy = null; - boolean missingProperties = true; - for (ExperimentPolicy experimentPolicy : experimentPolicies) { - if (experimentPolicy.getPolicyType().getId() == policyType.getId()) { - theExperimentPolicy = experimentPolicy; - if (theExperimentPolicy.getExperimentPolicyPropertyValueList().size() == policyType.getPolicyPropertyList().size()) { - missingProperties = false; - } - break; - } - } - if (missingProperties) { - MissingPolicyType missingPolicyType = new MissingPolicyType(policyType.getId(), policyType.getName()); - missingPolicyTypes.add(missingPolicyType); - for (PolicyProperty policyProperty : policyType.getPolicyPropertyList()) { - if ((theExperimentPolicy == null) || (!hasProperty(theExperimentPolicy, policyProperty))) { - PolicyPropertyValue policyPropertyValue = new PolicyPropertyValue(); - policyPropertyValue.policyProperty = policyProperty; - policyPropertyValue.value = policyProperty.getDefaultValue(); - missingPolicyType.getNoPropertyList().add(policyPropertyValue); - } - } - } - } - } - - private boolean hasProperty(ExperimentPolicy experimentPolicy, PolicyProperty policyProperty) { - for (ExperimentPolicyPropertyValue experimentPolicyPropertyValue : experimentPolicy.getExperimentPolicyPropertyValueList()) { - if (experimentPolicyPropertyValue.getPolicyProperty().equals(policyProperty)) { - return true; - } - } - return false; - } - - public void updateRemovedExperimentRoles() { - UserExperimentRole userExperimentRole; - for (UserInfo user : experimentUsers.keySet()) { - ExperimentUser experimentUser = experimentUsers.get(user); - for (RoleType roleType : experimentRoles.values()) { - int roleId = roleType.getId(); - userExperimentRole = user.getExperimentRole(roleId, experimentUser.experimentId); - if ((userExperimentRole != null ) && (!experimentUser.userRoles[roleId]) ) { - userExperimentRoleFacade.remove(userExperimentRole); - } - } - } - } - - public String getRemovedUserName() { - if (experimentUsersEditTable.getCurrentObject() != null) { - return experimentUsersEditTable.getCurrentObject().getUsername(); - } - return ""; - } - - public String getRemovedPolicyName() { - if (experimentPropertyToDelete != null) { - return experimentPropertyToDelete.getPolicyProperty().getName(); - } - return ""; - } - - public void removeUserRoles() { - ExperimentUser experimentUser = experimentUsersEditTable.getCurrentObject(); - UserInfo user = experimentUser.getUser(); - List<UserExperimentRole> roleList = user.getUserExperimentRoles(experimentUser.experimentId); - for (UserExperimentRole userExperimentRole : roleList) { - userExperimentRoleFacade.remove(userExperimentRole); - } - } - - public String removeUser() { - ExperimentUser experimentUser = experimentUsersEditTable.getCurrentObject(); - UserInfo user = experimentUser.getUser(); - for (RoleType roleType : experimentRoles.values()) { - int roleId = roleType.getId(); - if (experimentUser.userRoles[roleId]) { - user.removeExperimentRole(roleId, experimentUser.experimentId); - } - } - userInfoFacade.edit(user); - - experimentUsersListTable.resetList(); - experimentUsersEditTable.resetList(); - experimentUsers.clear(); - noExperimentUsersTypeTable.resetList(); - - return "edit?faces-redirect=true"; - } - - public void removePolicy() { - experimentPolicyPropertyValueFacade.remove(experimentPropertyToDelete); - } - - public String updateRemovedExperimentPolicy() { - ExperimentPolicy experimentPolicy = experimentPropertyToDelete.getExperimentPolicy(); - experimentPropertiesMap.remove(experimentPropertyToDelete.getId()); - experimentPolicy.getExperimentPolicyPropertyValueList().remove(experimentPropertyToDelete); - experimentPolicyFacade.edit(experimentPolicy); - current = experimentFacade.find(current.getId()); - experimentPolicyListTable.resetList(); - missingPolicyTypes.clear(); - experimentPolicyEditTable.resetList(); - noPolicyValueTable.resetList(); - return "edit?faces-redirect=true"; - } - - public String addExperimentUser() { - List<UserInfo> newUsers = noExperimentUsersTypeTable.getSelectedObjectList(); - if (newUsers == null) { - logger.debug("null selected list"); - return null; - } else if (newUsers.isEmpty()) { - logger.debug("empty selected list"); - return null; - } else { - try { - UserExperimentRole userExperimentRole; - for (UserInfo user : newUsers) { - userExperimentRole = new UserExperimentRole(user.getId(), current.getId(), experimentRoles.get(RoleTypeName.USER).getId()); // set the User - user.getUserExperimentRoleList().add(userExperimentRole); - userInfoFacade.edit(user); - } - experimentUsersListTable.resetList(); - experimentUsersEditTable.resetList(); - experimentUsers.clear(); - noExperimentUsersTypeTable.resetList(); - return "edit?faces-redirect=true"; - } catch (RuntimeException ex) { - SessionUtility.addErrorMessage("Error", "Could not update UserInfo" + ": " + ex.getMessage()); - return null; - } - } - } - - public String addExperimentPolicyPropertyValues() { - List<PolicyPropertyValue> newProperties = noPolicyValueTable.getSelectedObjectList(); - if (newProperties == null) { - logger.debug("null selected list"); - return null; - } else if (newProperties.isEmpty()) { - logger.debug("empty selected list"); - return null; - } else { - try { - ExperimentPolicyPropertyValue experimentPolicyPropertyValue; - for (PolicyPropertyValue property : newProperties) { - PolicyProperty policyProperty = property.getPolicyProperty(); - experimentPolicyPropertyValue = new ExperimentPolicyPropertyValue(); - experimentPolicyPropertyValue.setPolicyProperty(policyProperty); - experimentPolicyPropertyValue.setPolicyPropertyValue(property.getValue()); - experimentPolicyPropertyValue.setModifiedBy(((UserInfo) SessionUtility.getUser()).getUsername()); - experimentPolicyPropertyValue.setModifiedDate(new Date()); - ExperimentPolicy experimentPolicy = getOrCreateExperimentPolicy(policyProperty.getPolicyType()); - experimentPolicyPropertyValue.setExperimentPolicy(experimentPolicy); - experimentPolicy.getExperimentPolicyPropertyValueList().add(experimentPolicyPropertyValue); - } - super.update(); - current = experimentFacade.find(current.getId()); - experimentPolicyListTable.resetList(); - missingPolicyTypes.clear(); - experimentPolicyEditTable.resetList(); - noPolicyValueTable.resetList(); - - return "edit?faces-redirect=true"; - } catch (RuntimeException ex) { - SessionUtility.addErrorMessage("Error", "Could not update Experiment Policy" + ": " + ex.getMessage()); - return null; - } - } - } - - private ExperimentPolicy getOrCreateExperimentPolicy(PolicyType policyType) { - List<ExperimentPolicy> experimentPolicyList = current.getExperimentPolicyList(); - for (ExperimentPolicy experimentPolicy: experimentPolicyList) { - if (experimentPolicy.getPolicyType().equals(policyType)) { - return experimentPolicy; - } - } - ExperimentPolicy newExperimentPolicy = new ExperimentPolicy(); - newExperimentPolicy.setExperiment(current); - newExperimentPolicy.setPolicyType(policyType); - experimentPolicyList.add(newExperimentPolicy); - policyType.getExperimentPolicyList().add(newExperimentPolicy); - experimentPolicyFacade.create(newExperimentPolicy); - return newExperimentPolicy; - } - - public boolean canEditExperiment(Experiment experiment) { - UserInfo logged = (UserInfo) SessionUtility.getUser(); - if (logged == null) { - return false; - } - if (experiment == null) { - return false; - } - if (!initialized) { - initializeTables(); - } - // user that is Manager or PI can edit experiment - int managerRoleId = experimentRoles.get(RoleTypeName.MANAGER).getId(); - int piRoleId = experimentRoles.get(RoleTypeName.PI).getId(); - return (logged.getExperimentRole(managerRoleId, experiment.getId()) != null) || (logged.getExperimentRole(piRoleId, experiment.getId()) != null); - } - - public boolean isRestricted() { - UserInfo logged = (UserInfo) SessionUtility.getUser(); - if (logged == null) { - return false; - } - if (current == null) { - return true; - } - int managerRoleId = experimentRoles.get(RoleTypeName.MANAGER).getId(); - int piRoleId = experimentRoles.get(RoleTypeName.PI).getId(); - return (logged.getExperimentRole(managerRoleId, current.getId()) == null) && (logged.getExperimentRole(piRoleId, current.getId()) == null); - } - - public boolean canDeleteExperiment(Experiment experiment) { - UserInfo logged = (UserInfo) SessionUtility.getUser(); - if (logged == null) { - return false; - } - if (experiment == null) { - return false; - } - if (!initialized) { - initializeTables(); - } - int managerRoleId = experimentRoles.get(RoleTypeName.MANAGER).getId(); - return logged.getExperimentRole(managerRoleId, experiment.getId()) != null; - } - - public boolean canAddManager() { - ExperimentUser logged = experimentUsers.get((UserInfo) SessionUtility.getUser()); - if (logged == null) { - return false; - } - return logged.isIsManager(); - } - - public boolean canAddPiAndUser() { - ExperimentUser logged = experimentUsers.get((UserInfo) SessionUtility.getUser()); - if (logged == null) { - return false; - } - return logged.isIsManager() || logged.isIsPI(); - } - - public boolean notSelected() { - return (current == null); - } - - public int getRows() { - return rows; - } - - public ExperimentController.ExperimentUsersTable getExperimentUsersListTable() { - return experimentUsersListTable; - } - - public void setExperimentUsersListTable(ExperimentController.ExperimentUsersTable experimentUsersTable) { - this.experimentUsersListTable = experimentUsersTable; - } - - public ExperimentController.ExperimentUsersTable getExperimentUsersEditTable() { - return experimentUsersEditTable; - } - - public void setExperimentUsersEditTable(ExperimentController.ExperimentUsersTable experimentUsersTable) { - this.experimentUsersEditTable = experimentUsersTable; - } - - public ExperimentController.NoExperimentUsersTypeTable getNoExperimentUsersTypeTable() { - return noExperimentUsersTypeTable; - } - - public void setNoExperimentUsersTypeTable(ExperimentController.NoExperimentUsersTypeTable noExperimentUsersTypeTable) { - this.noExperimentUsersTypeTable = noExperimentUsersTypeTable; - } - - public ExperimentPolicyTable getExperimentPolicyListTable() { - return experimentPolicyListTable; - } - - public void setExperimentPolicyListTable(ExperimentPolicyTable experimentPolicyTable) { - this.experimentPolicyListTable = experimentPolicyTable; - } - - public ExperimentPolicyTable getExperimentPolicyEditTable() { - return experimentPolicyEditTable; - } - - public void setExperimentPolicyEditTable(ExperimentPolicyTable experimentPolicyEditTable) { - this.experimentPolicyEditTable = experimentPolicyEditTable; - } - - public NoPolicyValueTable getNoPolicyValueTable() { - return noPolicyValueTable; - } - - public void setNoPolicyValueTable(NoPolicyValueTable noPolicyValueTable) { - this.noPolicyValueTable = noPolicyValueTable; - } - - public List<MissingPolicyType> getMissingPolicyTypes() { - return missingPolicyTypes; - } - - public void setMissingPolicyTypes(List<MissingPolicyType> missingPolicyTypes) { - this.missingPolicyTypes = missingPolicyTypes; - } - - public ExperimentPolicyPropertyValue getExperimentPropertyToDelete() { - return experimentPropertyToDelete; - } - - public void setExperimentPropertyToDelete(ExperimentPolicyPropertyValue experimentPropertyToDelete) { - this.experimentPropertyToDelete = experimentPropertyToDelete; - } - - public boolean isEditable() { - return notEditableTypes.contains(current.getExperimentType().getName()); - } - - @FacesConverter(forClass = Experiment.class) - public static class ExperimentControllerConverter implements Converter { - - @Override - public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { - if (value == null || value.length() == 0) { - return null; - } - ExperimentController controller = (ExperimentController) facesContext.getApplication().getELResolver(). - getValue(facesContext.getELContext(), null, "experimentController"); - return controller.getEntity(getKey(value)); - } - - java.lang.Integer getKey(String value) { - java.lang.Integer key; - key = Integer.valueOf(value); - return key; - } - - String getStringKey(java.lang.Integer value) { - StringBuilder sb = new StringBuilder(); - sb.append(value); - return sb.toString(); - } - - @Override - public String getAsString(FacesContext facesContext, UIComponent component, Object object) { - if (object == null) { - return null; - } - if (object instanceof Experiment) { - Experiment o = (Experiment) object; - return getStringKey(o.getId()); - } - else { - throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: " + Experiment.class.getName()); - } - } - - } - -} \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentPolicyController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentPolicyController.java deleted file mode 100644 index dc4565dfc6792ba069ad588bdf72ac926510fbf1..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentPolicyController.java +++ /dev/null @@ -1,120 +0,0 @@ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.exceptions.MissingProperty; -import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists; -import gov.anl.aps.dm.portal.model.entities.ExperimentPolicy; -import gov.anl.aps.dm.portal.model.beans.ExperimentPolicyFacade; -import java.util.List; - -import javax.ejb.EJB; -import javax.inject.Named; -import javax.enterprise.context.SessionScoped; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.convert.Converter; -import javax.faces.convert.FacesConverter; -import org.apache.log4j.Logger; - -@Named("experimentPolicyController") -@SessionScoped -public class ExperimentPolicyController extends CrudEntityController<ExperimentPolicy, ExperimentPolicyFacade> -{ - - private static final Logger logger = Logger.getLogger(ExperimentPolicyController.class.getName()); - - @EJB - private ExperimentPolicyFacade experimentPolicyFacade; - - public ExperimentPolicyController() { - } - - @Override - protected ExperimentPolicyFacade getFacade() { - return experimentPolicyFacade; - } - - @Override - protected ExperimentPolicy createEntityInstance() { - return new ExperimentPolicy(); - } - - @Override - public String getEntityTypeName() { - return "experimentPolicy"; - } - - @Override - public String getCurrentEntityInstanceName() { - return ""; - } - - @Override - public List<ExperimentPolicy> getAvailableItems() { - return super.getAvailableItems(); - } - - @Override - public String prepareEdit(ExperimentPolicy experimentPolicy) { - return super.prepareEdit(experimentPolicy); - } - - @Override - public void prepareEntityInsert(ExperimentPolicy experimentPolicy) throws ObjectAlreadyExists, MissingProperty { - logger.debug("Inserting new experiment policy "); - } - - @Override - public void prepareEntityUpdate(ExperimentPolicy experimentPolicy) throws DmPortalException { - } - - @Override - protected String getObjectAlreadyExistMessage(ExperimentPolicy experimentPolicy) { - if (experimentPolicy == null) { - return null; - } - return "Experiment Policy " + " already exists."; - } - - @FacesConverter(forClass = ExperimentPolicy.class) - public static class ExperimentPolicyControllerConverter implements Converter - { - - @Override - public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { - if (value == null || value.length() == 0) { - return null; - } - ExperimentPolicyController controller = (ExperimentPolicyController) facesContext.getApplication().getELResolver(). - getValue(facesContext.getELContext(), null, "experimentPolicyController"); - return controller.getEntity(getKey(value)); - } - - java.lang.Integer getKey(String value) { - java.lang.Integer key; - key = Integer.valueOf(value); - return key; - } - - String getStringKey(java.lang.Integer value) { - StringBuilder sb = new StringBuilder(); - sb.append(value); - return sb.toString(); - } - - @Override - public String getAsString(FacesContext facesContext, UIComponent component, Object object) { - if (object == null) { - return null; - } - if (object instanceof ExperimentPolicy) { - ExperimentPolicy o = (ExperimentPolicy) object; - return getStringKey(o.getId()); - } - else { - throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: " + ExperimentPolicy.class.getName()); - } - } - } - -} \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentTypeController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentTypeController.java deleted file mode 100644 index 2ac77a6aaf610bdefa1d90c5b868c3748ece2e85..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/ExperimentTypeController.java +++ /dev/null @@ -1,142 +0,0 @@ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.exceptions.MissingProperty; -import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists; -import gov.anl.aps.dm.portal.model.entities.ExperimentType; -import gov.anl.aps.dm.portal.model.beans.ExperimentTypeFacade; -import java.util.List; - -import javax.ejb.EJB; -import javax.inject.Named; -import javax.enterprise.context.SessionScoped; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.convert.Converter; -import javax.faces.convert.FacesConverter; -import org.apache.log4j.Logger; - -@Named("experimentTypeController") -@SessionScoped -public class ExperimentTypeController extends CrudEntityController<ExperimentType, ExperimentTypeFacade> -{ - - private static final Logger logger = Logger.getLogger(ExperimentTypeController.class.getName()); - private final int rows = 25; - - @EJB - private ExperimentTypeFacade experimentTypeFacade; - - public ExperimentTypeController() { - } - - public int getRows() { - return rows; - } - - @Override - protected ExperimentTypeFacade getFacade() { - return experimentTypeFacade; - } - - @Override - protected ExperimentType createEntityInstance() { - return new ExperimentType(); - } - - @Override - public String getEntityTypeName() { - return "experimentType"; - } - - @Override - public String getCurrentEntityInstanceName() { - if (getCurrent() != null) { - return getCurrent().getName(); - } - return ""; - } - - @Override - public List<ExperimentType> getAvailableItems() { - return super.getAvailableItems(); - } - - @Override - public String prepareEdit(ExperimentType experimentType) { - return super.prepareEdit(experimentType); - } - - @Override - public void prepareEntityInsert(ExperimentType experimentType) throws ObjectAlreadyExists, MissingProperty { - if ((experimentType.getName() == null) || (experimentType.getName().length() == 0)) { - throw new MissingProperty("Name is missing."); - } - ExperimentType existingExperimentType = experimentTypeFacade.findByName(experimentType.getName()); - if (existingExperimentType != null) { - throw new ObjectAlreadyExists("Experiment type " + experimentType.getName() + " already exists."); - } - logger.debug("Inserting new experiment type " + experimentType.getName()); - } - - @Override - public void prepareEntityUpdate(ExperimentType experimentType) throws DmPortalException { - if ((experimentType.getName() == null) || (experimentType.getName().length() == 0)) { - throw new MissingProperty("Name is missing."); - } - } - - @Override - protected String getObjectAlreadyExistMessage(ExperimentType experimentType) { - if (experimentType == null) { - return null; - } - return "Experiment Type " + experimentType.getName() + " already exists."; - } - - public boolean notSelected() { - return current == null; - } - - @FacesConverter(forClass = ExperimentType.class) - public static class ExperimentTypeControllerConverter implements Converter - { - - @Override - public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { - if (value == null || value.length() == 0) { - return null; - } - ExperimentTypeController controller = (ExperimentTypeController) facesContext.getApplication().getELResolver(). - getValue(facesContext.getELContext(), null, "experimentTypeController"); - return controller.getEntity(getKey(value)); - } - - java.lang.Integer getKey(String value) { - java.lang.Integer key; - key = Integer.valueOf(value); - return key; - } - - String getStringKey(java.lang.Integer value) { - StringBuilder sb = new StringBuilder(); - sb.append(value); - return sb.toString(); - } - - @Override - public String getAsString(FacesContext facesContext, UIComponent component, Object object) { - if (object == null) { - return null; - } - if (object instanceof ExperimentType) { - ExperimentType o = (ExperimentType) object; - return getStringKey(o.getId()); - } - else { - throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: " + ExperimentType.class.getName()); - } - } - } - -} \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/LoginController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/LoginController.java deleted file mode 100644 index 36b0299b4ceaa159ec0fad0c993af25e6fb4db26..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/LoginController.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.constants.RoleTypeName; -import gov.anl.aps.dm.portal.model.beans.RoleTypeFacade; -import gov.anl.aps.dm.portal.model.beans.UserInfoFacade; -import gov.anl.aps.dm.portal.model.entities.UserInfo; -import gov.anl.aps.dm.common.utilities.CryptUtility; -import gov.anl.aps.dm.common.utilities.LdapUtility; -import gov.anl.aps.dm.portal.utilities.SessionUtility; -import java.io.Serializable; -import javax.ejb.EJB; -import javax.enterprise.context.SessionScoped; -import javax.faces.context.ExternalContext; -import javax.faces.context.FacesContext; -import javax.inject.Named; -import org.apache.log4j.Logger; - -/** - * Login controller. - */ -@Named("loginController") -@SessionScoped -public class LoginController implements Serializable -{ - - @EJB - private UserInfoFacade userInfoFacade; - - @EJB - private RoleTypeFacade roleTypeFacade; - - private String username = null; - private String password = null; - private boolean loggedIn = false; - private UserInfo user = null; - private boolean isAdmin; - - private static final Logger logger = Logger.getLogger(LoginController.class.getName()); - - /** - * Constructor. - */ - public LoginController() { - } - - /** - * Get password. - * - * @return login password - */ - public String getPassword() { - return password; - } - - /** - * Set password. - * - * @param password login password - */ - public void setPassword(String password) { - this.password = password; - } - - /** - * Get username. - * - * @return login username - */ - public String getUsername() { - return username; - } - - /** - * Set username. - * - * @param username login username - */ - public void setUsername(String username) { - this.username = username; - } - - /** - * Check if user is logged in. - * - * @return true if admin is logged in, false otherwise - */ - public boolean isLoggedIn() { - return loggedIn; - } - - /** - * Login action. - * - * @return url to service home page if login is successful, or null in case - * of errors - */ - public String login() { - loggedIn = false; - if (username == null || password == null || username.isEmpty() || password.isEmpty()) { - SessionUtility.addWarningMessage(null, "Incomplete Input. Please enter both username and password."); - return (username = password = null); - } - - user = userInfoFacade.findByUsername(username); - if (user == null) { - SessionUtility.addErrorMessage(null, "Username " + username + " is not registered. Contact administrator."); - return (username = password = null); - } - - boolean validCredentials = false; - if (user.getPassword() != null && CryptUtility.verifyPasswordWithPbkdf2(password, user.getPassword())) { - logger.debug("User " + username + " is authorized by DM DB"); - validCredentials = true; - } - else if (LdapUtility.validateCredentials(username, password)) { - logger.debug("User " + username + " is authorized by DM LDAP"); - validCredentials = true; - } - else { - logger.debug("User " + username + " is not authorized."); - } - - if (validCredentials) { - SessionUtility.setUser(user); - - loggedIn = true; - SessionUtility.addInfoMessage("Successful Login", "User " + username + " is logged in."); - isAdmin = roleTypeFacade.findByName(RoleTypeName.ADMIN).isAdmin(username); - return getLandingPage(); - } - else { - SessionUtility.addErrorMessage(null, "Invalid Credentials. Username/password combination could not be verified."); - SessionUtility.addErrorMessage(null, "If you are having difficulty logging in, please see our <a href=\"/dm/views/loginHelp.xhtml\">login help</a> page."); - return (username = password = null); - } - - } - - public String getLandingPage() { - String landingPage = SessionUtility.getCurrentViewId() + "?faces-redirect=true"; - if (landingPage.contains("login")) { - landingPage = "/views/home?faces-redirect=true"; - } - logger.debug("Landing page: " + landingPage); - return landingPage; - } - - public String displayUsername() { - if (isLoggedIn()) { - return username; - } - else { - return "Not Logged In"; - } - } - - public boolean isUserWriteable(UserInfo user) { - if (!isLoggedIn()) { - return false; - } - return isLoggedIn() || this.user.getId() == user.getId(); - } - - /** - * Logout action. - * - * @return url to logout page - */ - public String logout() { - SessionUtility.clearSession(); - ExternalContext context = FacesContext.getCurrentInstance().getExternalContext(); - context.invalidateSession(); - loggedIn = false; - user = null; - return "/views/login?faces-redirect=true"; - } - - public boolean isAdmin() { - return isAdmin; - } - - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/PolicyPropertyController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/PolicyPropertyController.java deleted file mode 100644 index 3bf30fd2c4d1fdd0aa09c6c01cb6510b0cfbaf67..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/PolicyPropertyController.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.exceptions.MissingProperty; -import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists; -import gov.anl.aps.dm.portal.model.beans.PolicyPropertyFacade; -import gov.anl.aps.dm.portal.model.entities.PolicyProperty; -import gov.anl.aps.dm.portal.model.entities.PolicyType; -import java.util.List; -import javax.ejb.EJB; -import javax.enterprise.context.SessionScoped; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.convert.Converter; -import javax.faces.convert.FacesConverter; -import javax.faces.model.DataModel; -import javax.faces.model.ListDataModel; -import javax.inject.Named; -import org.apache.log4j.Logger; - -/** - * - * @author bfrosik - */ -@Named("policyPropertyController") -@SessionScoped -public class PolicyPropertyController extends CrudEntityController<PolicyProperty, PolicyPropertyFacade> -{ - - private PolicyType policyType; - private int rows = 25; - - private static final Logger logger = Logger.getLogger(PolicyPropertyController.class.getName()); - - @EJB - private PolicyPropertyFacade policyPropertyFacade; - - class PolicyPropertyInfoTable extends DataTableController<PolicyProperty> { - - @Override - public String getEntityName() { - return "PolicyProperty"; - } - - @Override - public List<PolicyProperty> findAll() { - return policyPropertyFacade.findByPolicyTypeId(policyType.getId()); - } - - @Override - public String getTableName() { - return "policyPropertyInfoTable"; - } - } - - private PolicyPropertyInfoTable policyPropertyInfoTable = new PolicyPropertyInfoTable(); - - public PolicyPropertyController() { - } - - public PolicyPropertyInfoTable getPolicyPropertyInfoTable() { - return policyPropertyInfoTable; - } - - public void setPolicyPropertyInfoTable(PolicyPropertyInfoTable policyPropertyInfoTable) { - this.policyPropertyInfoTable = policyPropertyInfoTable; - } - - @Override - protected PolicyPropertyFacade getFacade() { - return policyPropertyFacade; - } - - @Override - protected PolicyProperty createEntityInstance() { - return new PolicyProperty(); - } - - @Override - public String getCurrentEntityInstanceName() { - if (getCurrent() != null) { - return getCurrent().getName(); - } - return ""; - } - - @Override - public DataModel createListDataModel() { - return new ListDataModel((List) policyPropertyFacade.findByPolicyTypeId(policyType.getId())); - } - - @Override - public List<PolicyProperty> getAvailableItems() { - return (List<PolicyProperty>) policyPropertyFacade.findByPolicyTypeId(policyType.getId()); - } - - @Override - public String prepareEdit(PolicyProperty policyProperty) { - super.prepareEdit(policyProperty); - return "/views/policyProperty/edit?faces-redirect=true"; - } - - @Override - public String prepareView(PolicyProperty policyProperty) { - super.prepareView(policyProperty); - return "/views/policyProperty/view?faces-redirect=true"; - } - - public String prepareView() { - return super.prepareView(current); - } - - @Override - public void prepareEntityInsert(PolicyProperty policyProperty) throws ObjectAlreadyExists, MissingProperty { - current.setPolicyType(policyType); - if ((policyProperty.getName() == null) || (policyProperty.getName().length() == 0)) { - throw new MissingProperty("Name is missing."); - } - List<PolicyProperty> policyPropertyList = policyPropertyFacade.findByPolicyTypeId(policyType.getId()); - for (PolicyProperty property : policyPropertyList) { - if ((property.getName().equals(policyProperty.getName()))) { - throw new ObjectAlreadyExists("policy property " + policyProperty.getName() + " already exists for this policy type."); - } - } - logger.debug("Inserting new policy property " + policyProperty.getName()); - } - - @Override - public void prepareEntityUpdate(PolicyProperty policyProperty) throws DmPortalException { - current.setPolicyType(policyType); - } - - @Override - protected String getObjectAlreadyExistMessage(PolicyProperty policyProperty) { - if (policyProperty == null) { - return null; - } - return "Policy Property " + policyProperty.getName() + " already exists."; - } - - @Override - public String getEntityTypeName() { - return "PolicyProperty"; - } - - @Override - public void clear() { - policyPropertyInfoTable.resetList(); - resetList(); - } - - @Override - public String prepareCreate() { - super.prepareCreate(); - return "/views/policyProperty/create?faces-redirect=true"; - } - - @Override - public String create() { - if (super.create() == null) { - return null; - } - policyPropertyInfoTable.resetList(); - return "/views/policyType/view?faces-redirect=true"; - } - - @Override - public String prepareList() { - logger.debug("Preparing list"); - resetListDataModel(); - return "/views/policyType/view?faces-redirect=true"; - } - -// @Override -// public String destroy() { -// String view = super.destroy(); -// clear(); -// return view; -// } - - public PolicyType getPolicyType() { - return policyType; - } - - public void setPolicyType(PolicyType policyType) { - logger.info("setting policy type "); - clear(); - this.policyType = policyType; - } - - public int getRows() { - return rows; - } - - public void setRows(int rows) { - this.rows = rows; - } - - public boolean hasAllowedValues(PolicyProperty policyProperty) { - return ((policyProperty.getAllowedPolicyValueList() != null) && !policyProperty.getAllowedPolicyValueList().isEmpty()); - } - - public String updateAllowedValueList() { - policyPropertyFacade.edit(current); - return "/views/policyProperty/edit?faces-redirect=true"; - } - - public boolean notSelected() { - return current == null; - } - - - @FacesConverter(forClass = PolicyProperty.class) - public static class PolicyPropertyControllerConverter implements Converter - { - - @Override - public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { - if (value == null || value.length() == 0) { - return null; - } - PolicyPropertyController controller = (PolicyPropertyController) facesContext.getApplication().getELResolver(). - getValue(facesContext.getELContext(), null, "policyPropertyController"); - return controller.getEntity(getKey(value)); - } - - java.lang.Integer getKey(String value) { - java.lang.Integer key; - key = Integer.valueOf(value); - return key; - } - - String getStringKey(java.lang.Integer value) { - StringBuilder sb = new StringBuilder(); - sb.append(value); - return sb.toString(); - } - - @Override - public String getAsString(FacesContext facesContext, UIComponent component, Object object) { - if (object == null) { - return null; - } - if (object instanceof PolicyProperty) { - PolicyProperty o = (PolicyProperty) object; - return getStringKey(o.getId()); - } - else { - throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: " + PolicyProperty.class.getName()); - } - } - } -} - diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/PolicyTypeController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/PolicyTypeController.java deleted file mode 100644 index 241fe43184165f7dbc883a9b1d32fa9b94dd390f..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/PolicyTypeController.java +++ /dev/null @@ -1,141 +0,0 @@ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.exceptions.MissingProperty; -import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists; -import gov.anl.aps.dm.portal.model.entities.PolicyType; -import gov.anl.aps.dm.portal.model.beans.PolicyTypeFacade; -import java.util.List; - -import javax.ejb.EJB; -import javax.inject.Named; -import javax.enterprise.context.SessionScoped; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.convert.Converter; -import javax.faces.convert.FacesConverter; -import org.apache.log4j.Logger; - -@Named("policyTypeController") -@SessionScoped -public class PolicyTypeController extends CrudEntityController<PolicyType, PolicyTypeFacade> -{ - - private static final Logger logger = Logger.getLogger(PolicyTypeController.class.getName()); - - @EJB - private PolicyTypeFacade policyTypeFacade; - - public PolicyTypeController() { - } - - @Override - protected PolicyTypeFacade getFacade() { - return policyTypeFacade; - } - - @Override - protected PolicyType createEntityInstance() { - return new PolicyType(); - } - - @Override - public String getEntityTypeName() { - return "policyType"; - } - - @Override - public String getCurrentEntityInstanceName() { - if (getCurrent() != null) { - return getCurrent().getName(); - } - return ""; - } - - @Override - public List<PolicyType> getAvailableItems() { - return super.getAvailableItems(); - } - - @Override - public String prepareEdit(PolicyType policyType) { - return super.prepareEdit(policyType); - } - - @Override - public void prepareEntityInsert(PolicyType policyType) throws ObjectAlreadyExists, MissingProperty { - if ((policyType.getName() == null) || (policyType.getName().length() == 0)) { - throw new MissingProperty("Name is missing."); - } - PolicyType existingPolicyType = policyTypeFacade.findByName(policyType.getName()); - if (existingPolicyType != null) { - throw new ObjectAlreadyExists("Experiment type " + policyType.getName() + " already exists."); - } - logger.debug("Inserting new experiment type " + policyType.getName()); - } - - @Override - public void prepareEntityUpdate(PolicyType policyType) throws DmPortalException { - if ((policyType.getName() == null) || (policyType.getName().length() == 0)) { - throw new MissingProperty("Name is missing."); - } - } - - @Override - protected String getObjectAlreadyExistMessage(PolicyType policyType) { - if (policyType == null) { - return null; - } - return "Experiment Policy " + policyType.getName() + " already exists."; - } - - public String prepareView() { - return super.prepareView(current); - } - - public boolean notSelected() { - return current == null; - } - - @FacesConverter(forClass = PolicyType.class) - public static class PolicyTypeControllerConverter implements Converter - { - - @Override - public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { - if (value == null || value.length() == 0) { - return null; - } - PolicyTypeController controller = (PolicyTypeController) facesContext.getApplication().getELResolver(). - getValue(facesContext.getELContext(), null, "policyTypeController"); - return controller.getEntity(getKey(value)); - } - - java.lang.Integer getKey(String value) { - java.lang.Integer key; - key = Integer.valueOf(value); - return key; - } - - String getStringKey(java.lang.Integer value) { - StringBuilder sb = new StringBuilder(); - sb.append(value); - return sb.toString(); - } - - @Override - public String getAsString(FacesContext facesContext, UIComponent component, Object object) { - if (object == null) { - return null; - } - if (object instanceof PolicyType) { - PolicyType o = (PolicyType) object; - return getStringKey(o.getId()); - } - else { - throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: " + PolicyType.class.getName()); - } - } - } - -} \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/RoleTypeController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/RoleTypeController.java deleted file mode 100644 index 7f66224a3c907cdde4f250fd44418f0ca617753a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/RoleTypeController.java +++ /dev/null @@ -1,151 +0,0 @@ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.exceptions.MissingProperty; -import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists; -import gov.anl.aps.dm.portal.model.beans.RoleTypeFacade; -import gov.anl.aps.dm.portal.model.entities.RoleType; -import java.util.List; -import javax.ejb.EJB; -import javax.enterprise.context.SessionScoped; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.convert.Converter; -import javax.faces.convert.FacesConverter; -import javax.inject.Named; -import org.apache.log4j.Logger; - -@Named("roleTypeController") -@SessionScoped -public class RoleTypeController extends CrudEntityController<RoleType, RoleTypeFacade> -{ - private static final Logger logger = Logger.getLogger(RoleTypeController.class.getName()); - private final int rows = 25; - - @EJB - private RoleTypeFacade roleTypeFacade; - - public RoleTypeController() { - } - - public int getRows() { - return rows; - } - - @Override - protected RoleTypeFacade getFacade() { - return roleTypeFacade; - } - - @Override - protected RoleType createEntityInstance() { - return new RoleType(); - } - - @Override - public String getEntityTypeName() { - return "roleType"; - } - - @Override - public String getCurrentEntityInstanceName() { - if (getCurrent() != null) { - return getCurrent().getName(); - } - return ""; - } - - @Override - public List<RoleType> getAvailableItems() { - return super.getAvailableItems(); - } - - @Override - public String prepareEdit(RoleType roleType) { - return super.prepareEdit(roleType); - } - - @Override - public void prepareEntityInsert(RoleType roleType) throws ObjectAlreadyExists, MissingProperty { - if ((roleType.getName() == null) || (roleType.getName().length() == 0)) { - throw new MissingProperty("Name is missing."); - } - RoleType existingRoleType = roleTypeFacade.findByName(roleType.getName()); - if (existingRoleType != null) { - throw new ObjectAlreadyExists("Role Type " + roleType.getName() + " already exists."); - } - logger.debug("Inserting new roleType " + roleType.getName()); - } - - @Override - public void prepareEntityUpdate(RoleType roleType) throws DmPortalException { - if ((roleType.getName() == null) || (roleType.getName().length() == 0)) { - throw new MissingProperty("Name is missing."); - } - } - - @Override - protected String getObjectAlreadyExistMessage(RoleType roleType) { - if (roleType == null) { - return null; - } - return "Role Type " + roleType.getName() + " already exists."; - } - - - public boolean isRoleSystemType(RoleType roleType) { - if (roleType == null) { - logger.warn("Current row is not set"); - // Do nothing if current item is not set. - return false; - } - - return roleType.isIsSystemRole(); - } - - public boolean notSelected() { - return current == null; - } - - @FacesConverter(forClass = RoleType.class) - public static class RoleTypeControllerConverter implements Converter { - - @Override - public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { - if (value == null || value.length() == 0) { - return null; - } - RoleTypeController controller = (RoleTypeController) facesContext.getApplication().getELResolver(). - getValue(facesContext.getELContext(), null, "roleTypeController"); - return controller.getEntity(getKey(value)); - } - - java.lang.Integer getKey(String value) { - java.lang.Integer key; - key = Integer.valueOf(value); - return key; - } - - String getStringKey(java.lang.Integer value) { - StringBuilder sb = new StringBuilder(); - sb.append(value); - return sb.toString(); - } - - @Override - public String getAsString(FacesContext facesContext, UIComponent component, Object object) { - if (object == null) { - return null; - } - if (object instanceof RoleType) { - RoleType o = (RoleType) object; - return getStringKey(o.getId()); - } - else { - throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: " + RoleType.class.getName()); - } - } - - } - -} \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserInfoController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserInfoController.java deleted file mode 100644 index aece20b6fe83726c4143858586acd85855572ff4..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserInfoController.java +++ /dev/null @@ -1,353 +0,0 @@ -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.constants.RoleTypeName; -import gov.anl.aps.dm.portal.exceptions.DmPortalException; -import gov.anl.aps.dm.portal.exceptions.MissingProperty; -import gov.anl.aps.dm.portal.exceptions.ObjectAlreadyExists; -import gov.anl.aps.dm.portal.model.beans.RoleTypeFacade; -import gov.anl.aps.dm.portal.model.entities.UserInfo; -import gov.anl.aps.dm.portal.model.beans.UserInfoFacade; -import gov.anl.aps.dm.portal.model.entities.CloneableEntity; -import gov.anl.aps.dm.portal.model.entities.Experiment; -import gov.anl.aps.dm.portal.model.entities.RoleType; -import gov.anl.aps.dm.common.utilities.CryptUtility; -import gov.anl.aps.dm.portal.utilities.SessionUtility; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; - -import java.util.List; -import java.util.Map; -import javax.ejb.EJB; -import javax.enterprise.context.SessionScoped; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.convert.Converter; -import javax.faces.convert.FacesConverter; -import javax.inject.Named; -import org.apache.log4j.Logger; - -@Named("userInfoController") -@SessionScoped -public class UserInfoController extends CrudEntityController<UserInfo, UserInfoFacade> { - - private static final Logger logger = Logger.getLogger(UserInfoController.class.getName()); - private final int rows = 25; - - @EJB - private UserInfoFacade userInfoFacade; - - @EJB - private RoleTypeFacade roleTypeFacade; - - private String passwordEntry = null; - - public class ExperimentUser extends CloneableEntity { - - String experimentName; - String description; - int userId; - int experimentId; - private final boolean[] userRoles; - - public ExperimentUser(int experimentId, int userId) { - userRoles = new boolean[maxExperimentRoleTypeId + 1]; - this.experimentId = experimentId; - this.userId = userId; - } - - void setExperimentName(String experimentName) { - this.experimentName = experimentName; - } - - void setDescription(String description) { - this.description = description; - } - - public String getExperimentName() { - return experimentName; - } - - public String getDescription() { - return description; - } - - public boolean isIsManager() { - return userRoles[experimentRoles.get(RoleTypeName.MANAGER).getId()]; - } - - public boolean isIsPI() { - return userRoles[experimentRoles.get(RoleTypeName.PI).getId()]; - } - - public boolean isIsUser() { - return userRoles[experimentRoles.get(RoleTypeName.USER).getId()]; - } - - public void setIsInRole(RoleType role, boolean isInRole) { - userRoles[role.getId()] = isInRole; - } - - public boolean[] getRoles() { - return userRoles; - } - - @Override - public int hashCode() { - return userId + experimentId * 100; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof ExperimentUser)) { - return false; - } - return ((userId == ((ExperimentUser) object).userId) && (experimentId == ((ExperimentUser) object).experimentId)); - } - } - - class UserExperimentsTable extends DataTableController<ExperimentUser> { - - @Override - public String getEntityName() { - return "UserExperiments"; - } - - @Override - public List<ExperimentUser> findAll() { - List<Experiment> list = userInfoFacade.findExperimentsInUser(getCurrent().getId()); - return convertUserExperiments(list); - } - - List<ExperimentUser> convertUserExperiments(List<Experiment> list) { - if (!initialized) { - initializeRoleTypes(); - } - userExperiments.clear(); - logger.debug("converting UserExperiments "); - Collection<RoleType> roleTypes; - roleTypes = experimentRoles.values(); - ExperimentUser experimentUser; - for (Experiment experiment : list) { - experimentUser = new ExperimentUser(experiment.getId(), getCurrent().getId()); - experimentUser.setExperimentName(experiment.getName()); - experimentUser.setDescription(experiment.getDescription()); - userExperiments.add(experimentUser); - for (RoleType roleType : roleTypes) { - boolean inRole = (getCurrent().getExperimentRole(roleType.getId(), experiment.getId()) != null); - experimentUser.setIsInRole(roleType, inRole); - } - } - return userExperiments; - } - - @Override - public String getTableName() { - return "UserExperimentsTable"; - } - } - - private UserInfoController.UserExperimentsTable userExperimentsListTable = new UserInfoController.UserExperimentsTable(); - - private final List<ExperimentUser> userExperiments = new ArrayList<>(); - private final Map<String, RoleType> experimentRoles = new HashMap<>(); - int maxExperimentRoleTypeId; - boolean initialized = false; - - public UserInfoController() { - } - - public int getRows() { - return rows; - } - - private void initializeRoleTypes() { - List<RoleType> roleTypesList = roleTypeFacade.findAll(); - for (RoleType roleType : roleTypesList) { - if (!roleType.isIsSystemRole()) { - experimentRoles.put(roleType.getName(), roleType); - if (roleType.getId() > maxExperimentRoleTypeId) { - maxExperimentRoleTypeId = roleType.getId(); - } - } - } - initialized = true; - } - - @Override - public void clear() { - userExperimentsListTable.resetList(); - userExperiments.clear(); - } - - public UserExperimentsTable getUserExperimentsListTable() { - return userExperimentsListTable; - } - - public void setUserExperimentsListTable(UserExperimentsTable userExperimentsListTable) { - this.userExperimentsListTable = userExperimentsListTable; - } - - @Override - protected UserInfoFacade getFacade() { - return userInfoFacade; - } - - @Override - protected UserInfo createEntityInstance() { - return new UserInfo(); - } - - @Override - public String getEntityTypeName() { - return "userInfo"; - } - - @Override - public String getCurrentEntityInstanceName() { - if (getCurrent() != null) { - return getCurrent().getUsername(); - } - return ""; - } - - @Override - public List<UserInfo> getAvailableItems() { - return super.getAvailableItems(); - } - - @Override - public String prepareEdit(UserInfo user) { - passwordEntry = null; - return super.prepareEdit(user); - } - - @Override - public void prepareEntityInsert(UserInfo user) throws ObjectAlreadyExists, MissingProperty { - verifyMandatoryParam(user); - UserInfo existingUser = userInfoFacade.findByUsername(user.getUsername()); - if (existingUser != null) { - throw new ObjectAlreadyExists("User " + user.getUsername() + " already exists."); - } - if (passwordEntry != null && !passwordEntry.isEmpty()) { - logger.debug("Will crypt provided password for user " + user.getUsername()); - String cryptedPassword = CryptUtility.cryptPasswordWithPbkdf2(passwordEntry); - user.setPassword(cryptedPassword); - } - passwordEntry = null; - logger.debug("Inserting new user " + user.getUsername()); - } - - private void verifyMandatoryParam(UserInfo user) throws MissingProperty { - int missing = 0; - if ((user.getUsername() == null) || (user.getUsername().length() == 0)) { - missing = 1; - } - if ((user.getLastName() == null) || (user.getLastName().length() == 0)) { - missing += 2; - } - if ((user.getFirstName() == null) || (user.getFirstName().length() == 0)) { - missing += 4; - } - if (missing > 0) { - switch (missing) { - case 7: - throw new MissingProperty("Username, last name, and first name are missing."); - case 6: - throw new MissingProperty("last name, and first name are missing."); - case 5: - throw new MissingProperty("Username and first name are missing."); - case 4: - throw new MissingProperty("first name is missing."); - case 3: - throw new MissingProperty("Username and last name are missing."); - case 2: - throw new MissingProperty("last name is missing."); - case 1: - throw new MissingProperty("Username is missing."); - } - } - } - - @Override - public void prepareEntityUpdate(UserInfo user) throws DmPortalException { - verifyMandatoryParam(user); - if (passwordEntry != null && !passwordEntry.isEmpty()) { - logger.debug("Will crypt provided password for user " + user.getUsername()); - String cryptedPassword = CryptUtility.cryptPasswordWithPbkdf2(passwordEntry); - user.setPassword(cryptedPassword); - } - passwordEntry = null; - } - - @Override - protected String getObjectAlreadyExistMessage(UserInfo user) { - if (user == null) { - return null; - } - return "User " + user.getUsername() + " already exists."; - } - - public String prepareSessionUserEdit(String viewPath) { - UserInfo sessionUser = (UserInfo) SessionUtility.getUser(); - if (sessionUser == null) { - return null; - } - prepareEdit(sessionUser); - return viewPath + "?faces-redirect=true"; - } - - public String getPasswordEntry() { - return passwordEntry; - } - - public void setPasswordEntry(String passwordEntry) { - this.passwordEntry = passwordEntry; - } - - public boolean notSelected() { - return current == null; - } - - @FacesConverter(forClass = UserInfo.class) - public static class UserInfoControllerConverter implements Converter { - - @Override - public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { - if (value == null || value.length() == 0) { - return null; - } - UserInfoController controller = (UserInfoController) facesContext.getApplication().getELResolver(). - getValue(facesContext.getELContext(), null, "userInfoController"); - return controller.getEntity(getKey(value)); - } - - java.lang.Integer getKey(String value) { - java.lang.Integer key; - key = Integer.valueOf(value); - return key; - } - - String getStringKey(java.lang.Integer value) { - StringBuilder sb = new StringBuilder(); - sb.append(value); - return sb.toString(); - } - - @Override - public String getAsString(FacesContext facesContext, UIComponent component, Object object) { - if (object == null) { - return null; - } - if (object instanceof UserInfo) { - UserInfo o = (UserInfo) object; - return getStringKey(o.getId()); - } else { - throw new IllegalArgumentException("object " + object + " is of type " + object.getClass().getName() + "; expected type: " + UserInfo.class.getName()); - } - } - - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserSystemRoleController.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserSystemRoleController.java deleted file mode 100644 index 0a331fc24e9c6adcbe663bf65651023ffc580f16..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/controllers/UserSystemRoleController.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.controllers; - -import gov.anl.aps.dm.portal.model.beans.RoleTypeFacade; -import gov.anl.aps.dm.portal.model.beans.UserInfoFacade; -import gov.anl.aps.dm.portal.model.entities.RoleType; -import gov.anl.aps.dm.portal.model.entities.UserInfo; -import gov.anl.aps.dm.portal.utilities.SessionUtility; -import java.io.Serializable; -import java.util.List; -import javax.ejb.EJB; -import javax.enterprise.context.SessionScoped; -import javax.inject.Named; -import org.apache.log4j.Logger; - -@Named("userSystemRoleController") -@SessionScoped -public class UserSystemRoleController implements Serializable -{ - - @EJB - private UserInfoFacade userInfoFacade; - - @EJB - private RoleTypeFacade roleTypeFacade; - - private int rows = 25; - - class SystemRoleTypeTable extends DataTableController<UserInfo> { - @Override - public String getEntityName() { - return "UserInfo"; - } - - @Override - public List<UserInfo> findAll() { - return userInfoFacade.findSystemRoleUsers(systemRole.getId()); - } - - @Override - public String getTableName() { - return "systemRoleTable"; - } - } - - class NoSystemRoleTypeTable extends DataTableController<UserInfo> { - - @Override - public String getEntityName() { - return "UserInfo"; - } - - @Override - public List<UserInfo> findAll() { - return userInfoFacade.findNoSystemRoleUsers(systemRole.getId()); - } - - @Override - public String getTableName() { - return "noSystemRoleTable"; - } - - } - - private SystemRoleTypeTable systemRoleTable; - private NoSystemRoleTypeTable noSystemRoleTable; - - private RoleType systemRole; - - private static final Logger logger = Logger.getLogger(UserSystemRoleController.class.getName()); - - public UserSystemRoleController() { - this.systemRoleTable = new SystemRoleTypeTable(); - this.noSystemRoleTable = new NoSystemRoleTypeTable(); - } - - public int getRows() { - return rows; - } - - public RoleType getSystemRole() { - return systemRole; - } - - public void setSystemRole(RoleType systemRole) { - this.systemRole = systemRole; - } - - public SystemRoleTypeTable getSystemRoleTable() { - return systemRoleTable; - } - - public void setSystemRoleTable(SystemRoleTypeTable systemRoleTable) { - this.systemRoleTable = systemRoleTable; - } - - public NoSystemRoleTypeTable getNoSystemRoleTable() { - return noSystemRoleTable; - } - - public void setNoSystemRoleTable(NoSystemRoleTypeTable noSystemRoleTable) { - this.noSystemRoleTable = noSystemRoleTable; - } - - public String getSystemRoleName() { - return systemRole.getName(); - } - - public String resetSystemRoleUserList() { - logger.debug("Resetting System Role User list"); - systemRoleTable.resetList(); - return "/views/userSystemRole/list?faces-redirect=true"; - } - - public void resetNoSystemRoleUserList() { - logger.debug("Resetting System Role Add User list"); - noSystemRoleTable.resetList(); - } - - public String prepareSystemRoleView() { - logger.debug("Preparing system role view"); - noSystemRoleTable.resetList(); - return resetSystemRoleUserList(); - } - - public String addSystemRole() { - List<UserInfo> uiList = noSystemRoleTable.getSelectedObjectList(); - - if (uiList == null) { - logger.debug("null selected list"); - } else if (uiList.isEmpty()) { - logger.debug("empty selected list"); - } else { - for (UserInfo userInfo : uiList) { - systemRole.addRoleTypeToUser(userInfo); - } - } - try { - roleTypeFacade.edit(systemRole); - resetNoSystemRoleUserList(); - return resetSystemRoleUserList(); - } catch (RuntimeException ex) { - SessionUtility.addErrorMessage("Error", "Could not update RoleType" + ": " + ex.getMessage()); - return null; - } - } - - public String removeSystemRole() { - logger.debug("removing system role from user"); - systemRole.removeRoleTypeFromUser(systemRoleTable.currentObject); - try { - roleTypeFacade.edit(systemRole); - resetNoSystemRoleUserList(); - return resetSystemRoleUserList(); - } - catch (RuntimeException ex) { - SessionUtility.addErrorMessage("Error", "Could not update RoleType" + ": " + ex.getMessage()); - return null; - } - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/DmPortalException.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/DmPortalException.java deleted file mode 100644 index 96540d9f2732be302f60703fffd2a9654196dfc5..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/DmPortalException.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.exceptions; - -import gov.anl.aps.dm.portal.constants.DmStatus; - - -/** - * Generic DAQ exception. - */ -public class DmPortalException extends Exception -{ - - /** - * Exception signature key. - */ - public static final String SignatureKey = "__dm_portal_exception__"; - - /** - * Exception type key. - */ - public static final String TypeKey = "type"; - - /** - * Exception code key. - */ - public static final String CodeKey = "code"; - - /** - * Exception args key. - */ - public static final String ArgsKey = "args"; - - /** - * Error code. - */ - private int errorCode = DmStatus.DM_ERROR; - - - /** - * Error message. - */ - private String error = null; - - /** - * Constructor. - */ - public DmPortalException() - { - super(); - } - - /** - * Constructor. - * - * @param message Error message - */ - public DmPortalException(String message) - { - super(message); - } - - /** - * Constructor. - * - * @param message Error message - * @param errorCode Error code - */ - public DmPortalException(String message, int errorCode) - { - super(message); - this.errorCode = errorCode; - } - - /** - * Constructor. - * - * @param throwable Throwable object - */ - public DmPortalException(Throwable throwable) - { - super(throwable); - } - - /** - * Constructor. - * - * @param message Error message - * @param throwable Throwable object - */ - public DmPortalException(String message, Throwable throwable) - { - super(message, throwable); - } - - /** - * Set error code. - * - * @param errorCode Error code - */ - public void setErrorCode(int errorCode) - { - this.errorCode = errorCode; - } - - /** - * Get error code. - * - * @return Error code - */ - public int getErrorCode() - { - return errorCode; - } - - /** - * Set error message. - * - * @param error Error message - */ - public void setErrorMessage(String error) - { - this.error = error; - } - - /** - * Get error message. - * - * @return Error message - */ - public String getErrorMessage() - { - return error; - } - - /** - * Override string output if error message is set. - * - * @return error message - */ - @Override - public String toString() - { - if(error != null) { - return error; - } - else { - return super.toString(); - } - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/InvalidDate.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/InvalidDate.java deleted file mode 100644 index ffe8accfd7ff50b07caea2412889699f25490f88..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/InvalidDate.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.exceptions; - - -import gov.anl.aps.dm.portal.constants.DmStatus; - -/** - * Object already exists exception class. - */ -public class InvalidDate extends DmPortalException -{ - - /** - * Constructor. - */ - public InvalidDate() - { - super(); - setErrorCode(DmStatus.DM_INVALID_DATE); - } - - /** - * Constructor. - * - * @param message Error message - */ - public InvalidDate(String message) - { - super(message); - setErrorCode(DmStatus.DM_INVALID_DATE); - } - - /** - * Constructor. - * - * @param throwable Throwable object - */ - public InvalidDate(Throwable throwable) - { - super(throwable); - setErrorCode(DmStatus.DM_INVALID_DATE); - } - - /** - * Constructor. - * - * @param message Error message - * @param throwable Throwable object - */ - public InvalidDate(String message, Throwable throwable) - { - super(message, throwable); - setErrorCode(DmStatus.DM_INVALID_DATE); - } - -} \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/MissingProperty.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/MissingProperty.java deleted file mode 100644 index ee8f99142a00e7d3c1ade65de28b09cd240ea638..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/MissingProperty.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.exceptions; - -import gov.anl.aps.dm.portal.constants.DmStatus; - -/** - * - * @author bfrosik - */ -public class MissingProperty extends DmPortalException -{ - /** - * Constructor. - */ - public MissingProperty() - { - super(); - setErrorCode(DmStatus.DM_MISSING_PROPERTY); - } - - /** - * Constructor. - * - * @param message Error message - */ - public MissingProperty(String message) - { - super(message); - setErrorCode(DmStatus.DM_MISSING_PROPERTY); - } - - /** - * Constructor. - * - * @param throwable Throwable object - */ - public MissingProperty(Throwable throwable) - { - super(throwable); - setErrorCode(DmStatus.DM_MISSING_PROPERTY); - } - - /** - * Constructor. - * - * @param message Error message - * @param throwable Throwable object - */ - public MissingProperty(String message, Throwable throwable) - { - super(message, throwable); - setErrorCode(DmStatus.DM_MISSING_PROPERTY); - } -} - diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/ObjectAlreadyExists.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/ObjectAlreadyExists.java deleted file mode 100644 index 7f255fd1f8033a899eab97ecc4f4bfb4f3d305e3..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/exceptions/ObjectAlreadyExists.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.exceptions; - - -import gov.anl.aps.dm.portal.constants.DmStatus; - -/** - * Object already exists exception class. - */ -public class ObjectAlreadyExists extends DmPortalException -{ - - /** - * Constructor. - */ - public ObjectAlreadyExists() - { - super(); - setErrorCode(DmStatus.DM_OBJECT_ALREADY_EXISTS); - } - - /** - * Constructor. - * - * @param message Error message - */ - public ObjectAlreadyExists(String message) - { - super(message); - setErrorCode(DmStatus.DM_OBJECT_ALREADY_EXISTS); - } - - /** - * Constructor. - * - * @param throwable Throwable object - */ - public ObjectAlreadyExists(Throwable throwable) - { - super(throwable); - setErrorCode(DmStatus.DM_OBJECT_ALREADY_EXISTS); - } - - /** - * Constructor. - * - * @param message Error message - * @param throwable Throwable object - */ - public ObjectAlreadyExists(String message, Throwable throwable) - { - super(message, throwable); - setErrorCode(DmStatus.DM_OBJECT_ALREADY_EXISTS); - } - -} \ No newline at end of file diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AbstractFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AbstractFacade.java deleted file mode 100644 index 475e760afc824e356ac5205d6bf7f63d7c0bf688..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AbstractFacade.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import java.util.List; -import javax.persistence.EntityManager; - -/** - * - * @author sveseli - */ -public abstract class AbstractFacade<T> -{ - private Class<T> entityClass; - - public AbstractFacade(Class<T> entityClass) { - this.entityClass = entityClass; - } - - protected abstract EntityManager getEntityManager(); - - public void create(T entity) { - getEntityManager().persist(entity); - } - - public T edit(T entity) { - return getEntityManager().merge(entity); - } - - public void remove(T entity) { - getEntityManager().remove(getEntityManager().merge(entity)); - } - - public T find(Object id) { - return getEntityManager().find(entityClass, id); - } - - public List<T> findAll() { - javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery(); - cq.select(cq.from(entityClass)); - return getEntityManager().createQuery(cq).getResultList(); - } - - public List<T> findRange(int[] range) { - javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery(); - cq.select(cq.from(entityClass)); - javax.persistence.Query q = getEntityManager().createQuery(cq); - q.setMaxResults(range[1] - range[0] + 1); - q.setFirstResult(range[0]); - return q.getResultList(); - } - - public int count() { - javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery(); - javax.persistence.criteria.Root<T> rt = cq.from(entityClass); - cq.select(getEntityManager().getCriteriaBuilder().count(rt)); - javax.persistence.Query q = getEntityManager().createQuery(cq); - return ((Long) q.getSingleResult()).intValue(); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AllowedPolicyValueFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AllowedPolicyValueFacade.java deleted file mode 100644 index 5e325004dc4381c92ba79789274a6c85b29ddb77..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AllowedPolicyValueFacade.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.AllowedPolicyValue; -import java.util.List; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class AllowedPolicyValueFacade extends AbstractFacade<AllowedPolicyValue> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public AllowedPolicyValueFacade() { - super(AllowedPolicyValue.class); - } - - public AllowedPolicyValue findByName(String name) { - try { - return (AllowedPolicyValue) em.createNamedQuery("AllowedPolicyValue.findByPolicyValue") - .setParameter("policyValue", name) - .getSingleResult(); - } catch (NoResultException ex) { - } - return null; - } - - public AllowedPolicyValue findById(int id) { - try { - return (AllowedPolicyValue) em.createNamedQuery("AllowedPolicyValue.findById") - .setParameter("id", id) - .getSingleResult(); - } catch (NoResultException ex) { - } - return null; - } - - public List<AllowedPolicyValue> findByPolicyPropertyId(int id) { - try { - return (List<AllowedPolicyValue>) em.createNamedQuery("AllowedPolicyValue.findByPolicyPropertyId") - .setParameter("policyPropertyId", id) - .getResultList(); - } catch (NoResultException ex) { - } - return null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AllowedSettingValueFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AllowedSettingValueFacade.java deleted file mode 100644 index 2430b80703cd4325f7c270a70d9a9909a29bcc89..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/AllowedSettingValueFacade.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.AllowedSettingValue; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class AllowedSettingValueFacade extends AbstractFacade<AllowedSettingValue> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public AllowedSettingValueFacade() { - super(AllowedSettingValue.class); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/DataFolderFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/DataFolderFacade.java deleted file mode 100644 index 76be7494f44619fabf94d8cc89379e9ce36d6f2b..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/DataFolderFacade.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.DataFolder; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class DataFolderFacade extends AbstractFacade<DataFolder> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public DataFolderFacade() { - super(DataFolder.class); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/DataFolderPermissionFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/DataFolderPermissionFacade.java deleted file mode 100644 index bdcb44d5963ef4787a4aeaa929915dd0716def70..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/DataFolderPermissionFacade.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.DataFolderPermission; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class DataFolderPermissionFacade extends AbstractFacade<DataFolderPermission> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public DataFolderPermissionFacade() { - super(DataFolderPermission.class); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentFacade.java deleted file mode 100644 index ebf51d3f6bf4901e7a7c2b727fe6351bf32c7a95..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentFacade.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.Experiment; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class ExperimentFacade extends AbstractFacade<Experiment> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public ExperimentFacade() { - super(Experiment.class); - } - - public Experiment findByName(String name) { - try { - return (Experiment) em.createNamedQuery("Experiment.findByName") - .setParameter("name", name) - .getSingleResult(); - } - catch (NoResultException ex) { - } - return null; - } - - public boolean checkIfNameExists(String name) { - return findByName(name) != null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentPolicyFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentPolicyFacade.java deleted file mode 100644 index 758d6979d4b6507b828973d1f5d54fd9ae454f01..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentPolicyFacade.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.ExperimentPolicy; -import java.util.List; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class ExperimentPolicyFacade extends AbstractFacade<ExperimentPolicy> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public ExperimentPolicyFacade() { - super(ExperimentPolicy.class); - } - - public ExperimentPolicy findById(int id) { - try { - return (ExperimentPolicy) em.createNamedQuery("ExperimentPolicy.findById") - .setParameter("id", id) - .getSingleResult(); - } - catch (NoResultException ex) { - } - return null; - } - - public List<ExperimentPolicy> findByExperimentId(int id) { - try { - return (List<ExperimentPolicy>) em.createNamedQuery("ExperimentPolicy.findByExperimentId") - .setParameter("experimentId", id) - .getResultList(); - } - catch (NoResultException ex) { - } - return null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentPolicyPropertyValueFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentPolicyPropertyValueFacade.java deleted file mode 100644 index b1a539d1bc876362107fabce99e19b11b377fc7d..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentPolicyPropertyValueFacade.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.ExperimentPolicyPropertyValue; -import java.util.List; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author bfrosik - */ -@Stateless -public class ExperimentPolicyPropertyValueFacade extends AbstractFacade<ExperimentPolicyPropertyValue> -{ - - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public ExperimentPolicyPropertyValueFacade() { - super(ExperimentPolicyPropertyValue.class); - } - - public ExperimentPolicyPropertyValue findById(int id) { - try { - return (ExperimentPolicyPropertyValue) em.createNamedQuery("ExperimentPolicyPropertyValue.findById") - .setParameter("id", id) - .getSingleResult(); - } - catch (NoResultException ex) { - } - return null; - } - - public List<ExperimentPolicyPropertyValue> findByExperimentPolicyId(int id) { - try { - return (List<ExperimentPolicyPropertyValue>) em.createNamedQuery("ExperimentPolicyPropertyValue.findByExperimentPolicyId") - .setParameter("experimentPolicyId", id) - .getResultList(); - } - catch (NoResultException ex) { - } - return null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentTypeFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentTypeFacade.java deleted file mode 100644 index e7e3bfa56c37f212f5374630621292c1a0835a76..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/ExperimentTypeFacade.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.ExperimentType; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class ExperimentTypeFacade extends AbstractFacade<ExperimentType> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public ExperimentTypeFacade() { - super(ExperimentType.class); - } - - public ExperimentType findByName(String name) { - try { - return (ExperimentType) em.createNamedQuery("ExperimentType.findByName") - .setParameter("name", name) - .getSingleResult(); - } - catch (NoResultException ex) { - } - return null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/PolicyPropertyFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/PolicyPropertyFacade.java deleted file mode 100644 index 86ed4daa483922bddb6af94c26839084d98469c0..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/PolicyPropertyFacade.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.PolicyProperty; -import java.util.List; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author bfrosik - */ -@Stateless -public class PolicyPropertyFacade extends AbstractFacade<PolicyProperty> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - -// @Override -// public void remove(PolicyProperty entity) { -// Object o = em.merge(entity); -// em.remove(o); -// } - - - public PolicyPropertyFacade() { - super(PolicyProperty.class); - } - - public PolicyProperty findByName(String name) { - try { - return (PolicyProperty) em.createNamedQuery("PolicyProperty.findByName") - .setParameter("name", name) - .getSingleResult(); - } catch (NoResultException ex) { - } - return null; - } - - public PolicyProperty findById(int id) { - try { - return (PolicyProperty) em.createNamedQuery("PolicyProperty.findById") - .setParameter("id", id) - .getSingleResult(); - } catch (NoResultException ex) { - } - return null; - } - - public List<PolicyProperty> findByPolicyTypeId(int id) { - try { - return (List<PolicyProperty>) em.createNamedQuery("PolicyProperty.findByPolicyTypeId") - .setParameter("policyTypeId", id) - .getResultList(); - } - catch (NoResultException ex) { - } - return null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/PolicyTypeFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/PolicyTypeFacade.java deleted file mode 100644 index 05668708f03cae6fdbf2a71c5606f6ad9adfc570..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/PolicyTypeFacade.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.PolicyType; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class PolicyTypeFacade extends AbstractFacade<PolicyType> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public PolicyTypeFacade() { - super(PolicyType.class); - } - - public PolicyType findByName(String name) { - try { - return (PolicyType) em.createNamedQuery("PolicyType.findByName") - .setParameter("name", name) - .getSingleResult(); - } catch (NoResultException ex) { - } - return null; - } - - public PolicyType findById(int id) { - try { - return (PolicyType) em.createNamedQuery("PolicyType.findById") - .setParameter("id", id) - .getSingleResult(); - } catch (NoResultException ex) { - } - return null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/RoleTypeFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/RoleTypeFacade.java deleted file mode 100644 index 1ccb9885bfacb5d434b65a06ab49efdf468191cf..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/RoleTypeFacade.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.RoleType; -import java.util.List; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class RoleTypeFacade extends AbstractFacade<RoleType> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public RoleTypeFacade() { - super(RoleType.class); - } - - public RoleType findByName(String name) { - try { - return (RoleType) em.createNamedQuery("RoleType.findByName") - .setParameter("name", name) - .getSingleResult(); - } catch (NoResultException ex) { - } - return null; - } - - public RoleType findById(int id) { - try { - return (RoleType) em.createNamedQuery("RoleType.findById") - .setParameter("id", id) - .getSingleResult(); - } catch (NoResultException ex) { - } - return null; - } - - public boolean checkIfNameExists(String name) { - return findByName(name) != null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/SettingTypeFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/SettingTypeFacade.java deleted file mode 100644 index 058668044a4986051b8908a79dd897d7bc18618f..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/SettingTypeFacade.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.SettingType; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class SettingTypeFacade extends AbstractFacade<SettingType> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public SettingTypeFacade() { - super(SettingType.class); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserExperimentRoleFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserExperimentRoleFacade.java deleted file mode 100644 index 4d223067b891a5ac3cb11be0209498a07d67254a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserExperimentRoleFacade.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.UserExperimentRole; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class UserExperimentRoleFacade extends AbstractFacade<UserExperimentRole> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public UserExperimentRoleFacade() { - super(UserExperimentRole.class); - } - - public UserExperimentRole findByUserExperimentRole(int userId, int experimentId, int roleId) { - try { - return (UserExperimentRole) em.createNamedQuery("UserExperimentRole.findByUserExperimentRole") - .setParameter("userId", userId) - .setParameter("experimentId", experimentId) - .setParameter("roleTypeId", roleId) - .getSingleResult(); - } - catch (NoResultException ex) { - } - return null; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserInfoFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserInfoFacade.java deleted file mode 100644 index 57ec1bcb363a48bba943fe85dbc7996828f8aa27..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserInfoFacade.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.Experiment; -import gov.anl.aps.dm.portal.model.entities.UserInfo; -import java.util.List; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class UserInfoFacade extends AbstractFacade<UserInfo> -{ - - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public UserInfoFacade() { - super(UserInfo.class); - } - - public UserInfo findByUsername(String username) { - try { - return (UserInfo) em.createNamedQuery("UserInfo.findByUsername") - .setParameter("username", username) - .getSingleResult(); - } - catch (NoResultException ex) { - } - return null; - } - - public boolean checkIfUsernameExists(String username) { - return findByUsername(username) != null; - } - - public List<UserInfo> findNoSystemRoleUsers(Integer roleTypeId) { - try { - return (List<UserInfo>) em.createNamedQuery("UserInfo.findNonAdmins") - .setParameter("roleTypeId", roleTypeId) - .getResultList(); - } - catch (NoResultException ex) { - } - return null; - } - - public List<UserInfo> findSystemRoleUsers(int roleTypeId) { - try { - return (List<UserInfo>) em.createNamedQuery("UserInfo.findUsersInRole") - .setParameter("roleTypeId", roleTypeId) - .getResultList(); - } - catch (NoResultException ex) { - } - return null; - } - - public List<UserInfo> findUsersInExperiment(int experimentId) { - try { - return (List<UserInfo>) em.createNamedQuery("UserInfo.findUsersInExperiment") - .setParameter("experimentId", experimentId) - .getResultList(); - } catch (NoResultException ex) { - } - return null; - } - - public List<UserInfo> findNoUsersInExperiment(int experimentId) { - try { - return (List<UserInfo>) em.createNamedQuery("UserInfo.findNoUsersInExperiment") - .setParameter("experimentId", experimentId) - .getResultList(); - } catch (NoResultException ex) { - } - return null; - } - - public List<Experiment> findExperimentsInUser(int userId) { - try { - return (List<Experiment>) em.createNamedQuery("UserInfo.findExperimentsInUser") - .setParameter("userId", userId) - .getResultList(); - } catch (NoResultException ex) { - } - return null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserSettingFacade.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserSettingFacade.java deleted file mode 100644 index 6d4a00e2a98de265e6e0fc3edecf7a9b945135cf..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/beans/UserSettingFacade.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.beans; - -import gov.anl.aps.dm.portal.model.entities.UserSetting; -import javax.ejb.Stateless; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -/** - * - * @author sveseli - */ -@Stateless -public class UserSettingFacade extends AbstractFacade<UserSetting> -{ - @PersistenceContext(unitName = "DmWebPortalPU") - private EntityManager em; - - @Override - protected EntityManager getEntityManager() { - return em; - } - - public UserSettingFacade() { - super(UserSetting.class); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/AllowedPolicyValue.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/AllowedPolicyValue.java deleted file mode 100644 index 42ea1347c2c6019b5efe4d7e3fd18f35aa201566..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/AllowedPolicyValue.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "allowed_policy_value") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "AllowedPolicyValue.findAll", query = "SELECT a FROM AllowedPolicyValue a"), - @NamedQuery(name = "AllowedPolicyValue.findById", query = "SELECT a FROM AllowedPolicyValue a WHERE a.id = :id"), - @NamedQuery(name = "AllowedPolicyValue.findByPolicyValue", query = "SELECT a FROM AllowedPolicyValue a WHERE a.policyValue = :policyValue"), - @NamedQuery(name = "AllowedPolicyValue.findByDescription", query = "SELECT a FROM AllowedPolicyValue a WHERE a.description = :description"), - @NamedQuery(name = "AllowedPolicyValue.findByPolicyPropertyId", query = "SELECT a FROM AllowedPolicyValue a WHERE a.policyProperty.id = :policyPropertyId")}) - -public class AllowedPolicyValue extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Size(max = 256) - @Column(name = "policy_value") - private String policyValue; - @Size(max = 256) - @Column(name = "description") - private String description; - @JoinColumn(name = "policy_property_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private PolicyProperty policyProperty; - - public AllowedPolicyValue() { - } - - public AllowedPolicyValue(Integer id) { - this.id = id; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getPolicyValue() { - return policyValue; - } - - public void setPolicyValue(String policyValue) { - this.policyValue = policyValue; - } - - public String getName() { - return policyValue; - } - - public void setName(String policyValue) { - this.policyValue = policyValue; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public PolicyProperty getPolicyProperty() { - return policyProperty; - } - - public void setPolicyProperty(PolicyProperty policyProperty) { - this.policyProperty = policyProperty; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof AllowedPolicyValue)) { - return false; - } - AllowedPolicyValue other = (AllowedPolicyValue) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.AllowedPolicyValue[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/AllowedSettingValue.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/AllowedSettingValue.java deleted file mode 100644 index fcbd725a532f10c5d6ef6ef3f13f3f3dbf3911fc..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/AllowedSettingValue.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "allowed_setting_value") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "AllowedSettingValue.findAll", query = "SELECT a FROM AllowedSettingValue a"), - @NamedQuery(name = "AllowedSettingValue.findById", query = "SELECT a FROM AllowedSettingValue a WHERE a.id = :id"), - @NamedQuery(name = "AllowedSettingValue.findBySettingValue", query = "SELECT a FROM AllowedSettingValue a WHERE a.settingValue = :settingValue"), - @NamedQuery(name = "AllowedSettingValue.findByDescription", query = "SELECT a FROM AllowedSettingValue a WHERE a.description = :description")}) -public class AllowedSettingValue extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Size(max = 256) - @Column(name = "setting_value") - private String settingValue; - @Size(max = 256) - @Column(name = "description") - private String description; - @JoinColumn(name = "setting_type_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private SettingType settingType; - - public AllowedSettingValue() { - } - - public AllowedSettingValue(Integer id) { - this.id = id; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getSettingValue() { - return settingValue; - } - - public void setSettingValue(String settingValue) { - this.settingValue = settingValue; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public SettingType getSettingType() { - return settingType; - } - - public void setSettingType(SettingType settingType) { - this.settingType = settingType; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof AllowedSettingValue)) { - return false; - } - AllowedSettingValue other = (AllowedSettingValue) object; - if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { - return false; - } - return true; - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.AllowedSettingValue[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/CloneableEntity.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/CloneableEntity.java deleted file mode 100644 index c66ccbccf8cc7fe415aefc8696283aaa2dcc1dcf..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/CloneableEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import gov.anl.aps.dm.portal.utilities.SearchResult; -import java.io.Serializable; -import java.util.regex.Pattern; - -/** - * - * @author sveseli - */ -public class CloneableEntity implements Serializable, Cloneable -{ - protected static final long serialVersionUID = 1L; - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public SearchResult search(Pattern searchPattern) { - return null; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/DataFolder.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/DataFolder.java deleted file mode 100644 index f15827db143c1dad9a4bd5ee5dc85837ab967de8..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/DataFolder.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "data_folder") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "DataFolder.findAll", query = "SELECT d FROM DataFolder d"), - @NamedQuery(name = "DataFolder.findById", query = "SELECT d FROM DataFolder d WHERE d.id = :id"), - @NamedQuery(name = "DataFolder.findByDataPath", query = "SELECT d FROM DataFolder d WHERE d.dataPath = :dataPath"), - @NamedQuery(name = "DataFolder.findByDescription", query = "SELECT d FROM DataFolder d WHERE d.description = :description")}) -public class DataFolder extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(min = 1, max = 1024) - @Column(name = "data_path") - private String dataPath; - @Size(max = 256) - @Column(name = "description") - private String description; - @JoinTable(name = "experiment_data_folder", joinColumns = { - @JoinColumn(name = "data_folder_id", referencedColumnName = "id")}, inverseJoinColumns = { - @JoinColumn(name = "experiment_id", referencedColumnName = "id")}) - @ManyToMany - private List<Experiment> experimentList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "dataFolder") - private List<DataFolderPermission> dataFolderPermissionList; - @OneToMany(mappedBy = "parentDataFolder") - private List<DataFolder> dataFolderList; - @JoinColumn(name = "parent_data_folder_id", referencedColumnName = "id") - @ManyToOne - private DataFolder parentDataFolder; - - public DataFolder() { - } - - public DataFolder(Integer id) { - this.id = id; - } - - public DataFolder(Integer id, String path) { - this.id = id; - this.dataPath = path; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getDataPath() { - return dataPath; - } - - public void setDataPath(String dataPath) { - this.dataPath = dataPath; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @XmlTransient - public List<Experiment> getExperimentList() { - return experimentList; - } - - public void setExperimentList(List<Experiment> experimentList) { - this.experimentList = experimentList; - } - - @XmlTransient - public List<DataFolderPermission> getDataFolderPermissionList() { - return dataFolderPermissionList; - } - - public void setDataFolderPermissionList(List<DataFolderPermission> dataFolderPermissionList) { - this.dataFolderPermissionList = dataFolderPermissionList; - } - - @XmlTransient - public List<DataFolder> getDataFolderList() { - return dataFolderList; - } - - public void setDataFolderList(List<DataFolder> dataFolderList) { - this.dataFolderList = dataFolderList; - } - - public DataFolder getParentDataFolder() { - return parentDataFolder; - } - - public void setParentDataFolder(DataFolder parentDataFolder) { - this.parentDataFolder = parentDataFolder; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof DataFolder)) { - return false; - } - DataFolder other = (DataFolder) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.DataFolder[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/DataFolderPermission.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/DataFolderPermission.java deleted file mode 100644 index 4e0dcbcd625fdb111b6004df5e2fcde47e19a251..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/DataFolderPermission.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "data_folder_permission") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "DataFolderPermission.findAll", query = "SELECT d FROM DataFolderPermission d"), - @NamedQuery(name = "DataFolderPermission.findById", query = "SELECT d FROM DataFolderPermission d WHERE d.id = :id"), - @NamedQuery(name = "DataFolderPermission.findByPermissionValue", query = "SELECT d FROM DataFolderPermission d WHERE d.permissionValue = :permissionValue"), - @NamedQuery(name = "DataFolderPermission.findByDescription", query = "SELECT d FROM DataFolderPermission d WHERE d.description = :description")}) -public class DataFolderPermission extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "permission_value") - private String permissionValue; - @Size(max = 256) - @Column(name = "description") - private String description; - @JoinColumn(name = "data_folder_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private DataFolder dataFolder; - - public DataFolderPermission() { - } - - public DataFolderPermission(Integer id) { - this.id = id; - } - - public DataFolderPermission(Integer id, String value) { - this.id = id; - this.permissionValue = value; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getPermissionValue() { - return permissionValue; - } - - public void setPermissionValue(String permissionValue) { - this.permissionValue = permissionValue; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public DataFolder getDataFolder() { - return dataFolder; - } - - public void setDataFolder(DataFolder dataFolder) { - this.dataFolder = dataFolder; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof DataFolderPermission)) { - return false; - } - DataFolderPermission other = (DataFolderPermission) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.DataFolderPermission[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/Experiment.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/Experiment.java deleted file mode 100644 index abd4f86ded6c8c15c6faa18aafed299b80530b00..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/Experiment.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.Date; -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "experiment") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "Experiment.findAll", query = "SELECT e FROM Experiment e"), - @NamedQuery(name = "Experiment.findById", query = "SELECT e FROM Experiment e WHERE e.id = :id"), - @NamedQuery(name = "Experiment.findByName", query = "SELECT e FROM Experiment e WHERE e.name = :name"), - @NamedQuery(name = "Experiment.findByDescription", query = "SELECT e FROM Experiment e WHERE e.description = :description"), - @NamedQuery(name = "Experiment.findByStartDate", query = "SELECT e FROM Experiment e WHERE e.startDate = :startDate"), - @NamedQuery(name = "Experiment.findByEndDate", query = "SELECT e FROM Experiment e WHERE e.endDate = :endDate")}) -public class Experiment extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(max = 64) - @Column(name = "name") - private String name; - @Size(max = 2000) - @Column(name = "description") - private String description; - @Column(name = "start_date", columnDefinition="TIMESTAMP WITH TIME ZONE") - @Temporal(TemporalType.TIMESTAMP) - private Date startDate; - @Column(name = "end_date", columnDefinition="TIMESTAMP WITH TIME ZONE") - @Temporal(TemporalType.TIMESTAMP) - private Date endDate; - @ManyToMany(mappedBy = "experimentList") - private List<DataFolder> dataFolderList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "experiment") - private List<UserExperimentRole> userExperimentRoleList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "experiment") - private List<ExperimentPolicy> experimentPolicyList; - @JoinColumn(name = "experiment_type_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private ExperimentType experimentType; - - public Experiment() { - } - - public Experiment(Integer id) { - this.id = id; - } - - public Experiment(Integer id, String name) { - this.id = id; - this.name = name; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Date getStartDate() { - return startDate; - } - - public void setStartDate(Date startDate) { - this.startDate = startDate; - } - - public Date getEndDate() { - return endDate; - } - - public void setEndDate(Date endDate) { - this.endDate = endDate; - } - - @XmlTransient - public List<DataFolder> getDataFolderList() { - return dataFolderList; - } - - public void setDataFolderList(List<DataFolder> dataFolderList) { - this.dataFolderList = dataFolderList; - } - - @XmlTransient - public List<UserExperimentRole> getUserExperimentRoleList() { - return userExperimentRoleList; - } - - public void setUserExperimentRoleList(List<UserExperimentRole> userExperimentRoleList) { - this.userExperimentRoleList = userExperimentRoleList; - } - - @XmlTransient - public List<ExperimentPolicy> getExperimentPolicyList() { - return experimentPolicyList; - } - - public void setExperimentPolicyList(List<ExperimentPolicy> experimentPolicyList) { - this.experimentPolicyList = experimentPolicyList; - } - - public ExperimentType getExperimentType() { - return experimentType; - } - - public void setExperimentType(ExperimentType experimentType) { - this.experimentType = experimentType; - } - - public ExperimentPolicy getPolicyForType(int typeId) { - for (ExperimentPolicy experimentPolicy : experimentPolicyList) { - if (experimentPolicy.getPolicyType().getId() == typeId) { - return experimentPolicy; - } - } - return null; - } - - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof Experiment)) { - return false; - } - Experiment other = (Experiment) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.Experiment[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentPolicy.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentPolicy.java deleted file mode 100644 index dbfb60fb28b4a7a2371171672cecaf943d0a4b78..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentPolicy.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "experiment_policy") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "ExperimentPolicy.findAll", query = "SELECT e FROM ExperimentPolicy e"), - @NamedQuery(name = "ExperimentPolicy.findById", query = "SELECT e FROM ExperimentPolicy e WHERE e.id = :id"), - @NamedQuery(name = "ExperimentPolicy.findByExperimentId", query = "SELECT e FROM ExperimentPolicy e WHERE e.experiment.id = :experimentId"), - @NamedQuery(name = "ExperimentPolicy.findByPolicyTypeId", query = "SELECT e FROM ExperimentPolicy e WHERE e.policyType.id = :policyTypeId")}) - -public class ExperimentPolicy extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @JoinColumn(name = "policy_type_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private PolicyType policyType; - @JoinColumn(name = "experiment_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private Experiment experiment; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "experimentPolicy") - private List<ExperimentPolicyPropertyValue> experimentPolicyPropertyValueList; - - - public ExperimentPolicy() { - } - - public ExperimentPolicy(Integer id) { - this.id = id; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public PolicyType getPolicyType() { - return policyType; - } - - public void setPolicyType(PolicyType policyType) { - this.policyType = policyType; - } - - public Experiment getExperiment() { - return experiment; - } - - public void setExperiment(Experiment experiment) { - this.experiment = experiment; - } - - @XmlTransient - public List<ExperimentPolicyPropertyValue> getExperimentPolicyPropertyValueList() { - return experimentPolicyPropertyValueList; - } - - public void setExperimentPolicyPropertyValue(List<ExperimentPolicyPropertyValue> experimentPolicyPropertyValueList) { - this.experimentPolicyPropertyValueList = experimentPolicyPropertyValueList; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof ExperimentPolicy)) { - return false; - } - ExperimentPolicy other = (ExperimentPolicy) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.ExperimentPolicy[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentPolicyPropertyValue.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentPolicyPropertyValue.java deleted file mode 100644 index 20324449a8ecaca5490efc2e41873e12a7d6b2d8..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentPolicyPropertyValue.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.Date; -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -/** - * - * @author bfrosik - */ -@Entity -@Table(name = "experiment_policy_property_value") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "ExperimentPolicyPropertyValue.findAll", query = "SELECT e FROM ExperimentPolicyPropertyValue e"), - @NamedQuery(name = "ExperimentPolicyPropertyValue.findById", query = "SELECT e FROM ExperimentPolicyPropertyValue e WHERE e.id = :id"), - @NamedQuery(name = "ExperimentPolicyPropertyValue.findByPolicyPropertyValue", query = "SELECT e FROM ExperimentPolicyPropertyValue e WHERE e.policyPropertyValue = :policyPropertyValue"), - @NamedQuery(name = "ExperimentPolicyPropertyValue.findByPolicyPropertyId", query = "SELECT e FROM ExperimentPolicyPropertyValue e WHERE e.policyProperty.id = :policyPropertyId"), - @NamedQuery(name = "ExperimentPolicyPropertyValue.findByExperimentPolicyId", query = "SELECT e FROM ExperimentPolicyPropertyValue e WHERE e.experimentPolicy.id = :experimentPolicyId")}) - -public class ExperimentPolicyPropertyValue extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @Size(max = 256) - @Column(name = "policy_property_value") - private String policyPropertyValue; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "modified_by") - private String modifiedBy; - @Basic(optional = false) - @NotNull - @Column(name = "modified_date") - @Temporal(TemporalType.DATE) - private Date modifiedDate; - @JoinColumn(name = "policy_property_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private PolicyProperty policyProperty; - @JoinColumn(name = "experiment_policy_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private ExperimentPolicy experimentPolicy; - - public ExperimentPolicyPropertyValue() { - } - - public ExperimentPolicyPropertyValue(Integer id) { - this.id = id; - } - - public ExperimentPolicyPropertyValue(Integer id, String value) { - this.id = id; - this.policyPropertyValue = value; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getPolicyPropertyValue() { - return policyPropertyValue; - } - - public void setPolicyPropertyValue(String policyPropertyValue) { - this.policyPropertyValue = policyPropertyValue; - } - - public PolicyProperty getPolicyProperty() { - return policyProperty; - } - - public void setPolicyProperty(PolicyProperty policyProperty) { - this.policyProperty = policyProperty; - } - - public ExperimentPolicy getExperimentPolicy() { - return experimentPolicy; - } - - public void setExperimentPolicy(ExperimentPolicy experimentPolicy) { - this.experimentPolicy = experimentPolicy; - } - - public String getModifiedBy() { - return modifiedBy; - } - - public void setModifiedBy(String modifiedBy) { - this.modifiedBy = modifiedBy; - } - - public Date getModifiedDate() { - return modifiedDate; - } - - public void setModifiedDate(Date modifiedDate) { - this.modifiedDate = modifiedDate; - } - - public String getUnits() { - return policyProperty.getUnits(); - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof ExperimentPolicyPropertyValue)) { - return false; - } - ExperimentPolicyPropertyValue other = (ExperimentPolicyPropertyValue) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.ExperimentPolicyPropertyValue[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentType.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentType.java deleted file mode 100644 index a36c2b5a4f0b8362873542a70bd30aad20f51fd1..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/ExperimentType.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "experiment_type") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "ExperimentType.findAll", query = "SELECT e FROM ExperimentType e"), - @NamedQuery(name = "ExperimentType.findById", query = "SELECT e FROM ExperimentType e WHERE e.id = :id"), - @NamedQuery(name = "ExperimentType.findByName", query = "SELECT e FROM ExperimentType e WHERE e.name = :name"), - @NamedQuery(name = "ExperimentType.findByDescription", query = "SELECT e FROM ExperimentType e WHERE e.description = :description"), - @NamedQuery(name = "ExperimentType.findByRootDataPath", query = "SELECT e FROM ExperimentType e WHERE e.rootDataPath = :rootDataPath")}) -public class ExperimentType extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(max = 64) - @Column(name = "name") - private String name; - @Size(max = 256) - @Column(name = "description") - private String description; - @Size(max = 256) - @Column(name = "root_data_path") - private String rootDataPath; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "experimentType") - private List<Experiment> experimentList; - - public ExperimentType() { - } - - public ExperimentType(Integer id) { - this.id = id; - } - - public ExperimentType(Integer id, String name) { - this.id = id; - this.name = name; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getRootDataPath() { - return rootDataPath; - } - - public void setRootDataPath(String rootDataPath) { - this.rootDataPath = rootDataPath; - } - - @XmlTransient - public List<Experiment> getExperimentList() { - return experimentList; - } - - public void setExperimentList(List<Experiment> experimentList) { - this.experimentList = experimentList; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof ExperimentType)) { - return false; - } - ExperimentType other = (ExperimentType) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.ExperimentType[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/PolicyProperty.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/PolicyProperty.java deleted file mode 100644 index dbc4f4d295ddd06b31ca6ebd6adecdb61927a0dc..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/PolicyProperty.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author bfrosik - */ -@Entity -@Table(name = "policy_property") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "PolicyProperty.findAll", query = "SELECT p FROM PolicyProperty p"), - @NamedQuery(name = "PolicyProperty.findById", query = "SELECT p FROM PolicyProperty p WHERE p.id = :id"), - @NamedQuery(name = "PolicyProperty.findByName", query = "SELECT p FROM PolicyProperty p WHERE p.name = :name"), - @NamedQuery(name = "PolicyProperty.findByDescription", query = "SELECT p FROM PolicyProperty p WHERE p.description = :description"), - @NamedQuery(name = "PolicyProperty.findByUnits", query = "SELECT p FROM PolicyProperty p WHERE p.units = :units"), - @NamedQuery(name = "PolicyProperty.findByPolicyTypeId", query = "SELECT p FROM PolicyProperty p WHERE p.policyType.id = :policyTypeId")}) - -public class PolicyProperty extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "name") - private String name; - @Size(max = 256) - @Column(name = "units") - private String units; - @Size(max = 256) - @Column(name = "lower_limit") - private String lowerLimit; - @Size(max = 256) - @Column(name = "upper_limit") - private String upperLimit; - @Size(max = 256) - @Column(name = "default_value") - private String defaultValue; - @Size(max = 256) - @Column(name = "description") - private String description; - @JoinColumn(name = "policy_type_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private PolicyType policyType; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "policyProperty") - private List<ExperimentPolicyPropertyValue> experimentPolicyPropertyValueList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "policyProperty") - private List<AllowedPolicyValue> allowedPolicyValueList; - - public PolicyProperty() { - } - - public PolicyProperty(Integer id) { - this.id = id; - } - - public PolicyProperty(Integer id, String name) { - this.id = id; - this.name = name; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getUnits() { - return units; - } - - public void setUnits(String units) { - this.units = units; - } - - public String getLowerLimit() { - return lowerLimit; - } - - public void setLowerLimit(String lowerLimit) { - this.lowerLimit = lowerLimit; - } - - public String getUpperLimit() { - return upperLimit; - } - - public void setUpperLimit(String upperLimit) { - this.upperLimit = upperLimit; - } - - public String getDefaultValue() { - return defaultValue; - } - - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - - public PolicyType getPolicyType() { - return policyType; - } - - public void setPolicyType(PolicyType policyType) { - this.policyType = policyType; - } - - @XmlTransient - public List<ExperimentPolicyPropertyValue> getExperimentPolicyPropertyValueList() { - return experimentPolicyPropertyValueList; - } - - public void setExperimentPolicyPropertyValueList(List<ExperimentPolicyPropertyValue> experimentPolicyPropertyValueList) { - this.experimentPolicyPropertyValueList = experimentPolicyPropertyValueList; - } - - @XmlTransient - public List<AllowedPolicyValue> getAllowedPolicyValueList() { - return allowedPolicyValueList; - } - - public void setAllowedPolicyValueList(List<AllowedPolicyValue> allowedPolicyValueList) { - this.allowedPolicyValueList = allowedPolicyValueList; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof PolicyProperty)) { - return false; - } - PolicyProperty other = (PolicyProperty) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.PolicyProperty[ id=" + id + " ]"; - } - - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/PolicyType.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/PolicyType.java deleted file mode 100644 index a0f4b3e01b4d7d32d416220d7211760668cf0843..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/PolicyType.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "policy_type") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "PolicyType.findAll", query = "SELECT p FROM PolicyType p"), - @NamedQuery(name = "PolicyType.findById", query = "SELECT p FROM PolicyType p WHERE p.id = :id"), - @NamedQuery(name = "PolicyType.findByName", query = "SELECT p FROM PolicyType p WHERE p.name = :name"), - @NamedQuery(name = "PolicyType.findByDescription", query = "SELECT p FROM PolicyType p WHERE p.description = :description")}) - -public class PolicyType extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "name") - private String name; - @Size(max = 256) - @Column(name = "description") - private String description; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "policyType") - private List<ExperimentPolicy> experimentPolicyList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "policyType") - private List<PolicyProperty> policyPropertyList; - - public PolicyType() { - } - - public PolicyType(Integer id) { - this.id = id; - } - - public PolicyType(Integer id, String name) { - this.id = id; - this.name = name; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - @XmlTransient - public List<ExperimentPolicy> getExperimentPolicyList() { - return experimentPolicyList; - } - - public void setExperimentPolicyList(List<ExperimentPolicy> experimentPolicyList) { - this.experimentPolicyList = experimentPolicyList; - } - - @XmlTransient - public List<PolicyProperty> getPolicyPropertyList() { - return policyPropertyList; - } - - public void setPolicyPropertyList(List<PolicyProperty> policyPropertyList) { - this.policyPropertyList = policyPropertyList; - } - - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof PolicyType)) { - return false; - } - PolicyType other = (PolicyType) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.PolicyType[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/RoleType.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/RoleType.java deleted file mode 100644 index add8bc95d5066421b9c84df37673dea7b4e09a40..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/RoleType.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.ArrayList; -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "role_type") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "RoleType.findAll", query = "SELECT r FROM RoleType r"), - @NamedQuery(name = "RoleType.findById", query = "SELECT r FROM RoleType r WHERE r.id = :id"), - @NamedQuery(name = "RoleType.findByName", query = "SELECT r FROM RoleType r WHERE r.name = :name"), - @NamedQuery(name = "RoleType.findByDescription", query = "SELECT r FROM RoleType r WHERE r.description = :description")}) - -public class RoleType extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "name") - private String name; - @Size(max = 3000) - @Column(name = "description") - private String description; - @NotNull - @Column(name = "is_system_role") - private boolean isSystemRole; - @JoinTable(name = "user_system_role", joinColumns = { - @JoinColumn(name = "role_type_id", referencedColumnName = "id")}, inverseJoinColumns = { - @JoinColumn(name = "user_id", referencedColumnName = "id")}) - @ManyToMany - private List<UserInfo> userInfoList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "roleType") - private List<UserExperimentRole> userExperimentRoleList; - - public RoleType() { - } - - public RoleType(Integer id) { - this.id = id; - } - - public RoleType(Integer id, String name) { - this.id = id; - this.name = name; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - - public boolean isIsSystemRole() { - return isSystemRole; - } - - public void setIsSystemRole(boolean isSystemRole) { - this.isSystemRole = isSystemRole; - } - - @XmlTransient - public List<UserInfo> getUserInfoList() { - return userInfoList; - } - - public void setUserInfoList(List<UserInfo> userInfoList) { - this.userInfoList = userInfoList; - } - - public void addRoleTypeToUser(UserInfo userInfo) { - if (userInfoList == null) - userInfoList = new ArrayList(); - if (!userInfoList.contains(userInfo)) { - userInfoList.add(userInfo); - } - } - - public void removeRoleTypeFromUser(UserInfo userInfo) { - userInfoList.remove(userInfo); - } - - public boolean isAdmin(String userName) { - for (UserInfo userInfo : getUserInfoList()) - { - if (userInfo.getUsername().equals(userName)) - return true; - } - return false; - } - - @XmlTransient - public List<UserExperimentRole> getUserExperimentRoleList() { - return userExperimentRoleList; - } - - public void setUserExperimentRoleList(List<UserExperimentRole> userExperimentRoleList) { - this.userExperimentRoleList = userExperimentRoleList; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof RoleType)) { - return false; - } - RoleType other = (RoleType) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.RoleType[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/SettingType.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/SettingType.java deleted file mode 100644 index b650ae7527235837116e4826e220b4020aec331a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/SettingType.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "setting_type") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "SettingType.findAll", query = "SELECT s FROM SettingType s"), - @NamedQuery(name = "SettingType.findById", query = "SELECT s FROM SettingType s WHERE s.id = :id"), - @NamedQuery(name = "SettingType.findByName", query = "SELECT s FROM SettingType s WHERE s.name = :name"), - @NamedQuery(name = "SettingType.findByDescription", query = "SELECT s FROM SettingType s WHERE s.description = :description"), - @NamedQuery(name = "SettingType.findByDefaultValue", query = "SELECT s FROM SettingType s WHERE s.defaultValue = :defaultValue"), - @NamedQuery(name = "SettingType.findByIsUserModifiable", query = "SELECT s FROM SettingType s WHERE s.isUserModifiable = :isUserModifiable")}) -public class SettingType extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "name") - private String name; - @Size(max = 256) - @Column(name = "description") - private String description; - @Size(max = 256) - @Column(name = "default_value") - private String defaultValue; - @Column(name = "is_user_modifiable") - private Boolean isUserModifiable; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "settingType") - private List<AllowedSettingValue> allowedSettingValueList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "settingType") - private List<UserSetting> userSettingList; - - public SettingType() { - } - - public SettingType(Integer id) { - this.id = id; - } - - public SettingType(Integer id, String name) { - this.id = id; - this.name = name; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getDefaultValue() { - return defaultValue; - } - - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - - public Boolean getIsUserModifiable() { - return isUserModifiable; - } - - public void setIsUserModifiable(Boolean isUserModifiable) { - this.isUserModifiable = isUserModifiable; - } - - @XmlTransient - public List<AllowedSettingValue> getAllowedSettingValueList() { - return allowedSettingValueList; - } - - public void setAllowedSettingValueList(List<AllowedSettingValue> allowedSettingValueList) { - this.allowedSettingValueList = allowedSettingValueList; - } - - @XmlTransient - public List<UserSetting> getUserSettingList() { - return userSettingList; - } - - public void setUserSettingList(List<UserSetting> userSettingList) { - this.userSettingList = userSettingList; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof SettingType)) { - return false; - } - SettingType other = (SettingType) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.SettingType[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserExperimentRole.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserExperimentRole.java deleted file mode 100644 index 58ea02bdb855720a46b8260ce5296b56cae5f4ff..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserExperimentRole.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "user_experiment_role") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "UserExperimentRole.findAll", query = "SELECT u FROM UserExperimentRole u"), - @NamedQuery(name = "UserExperimentRole.findByUserId", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.userId = :userId"), - @NamedQuery(name = "UserExperimentRole.findByExperimentId", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.experimentId = :experimentId"), - @NamedQuery(name = "UserExperimentRole.findByRoleTypeId", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.roleTypeId = :roleTypeId"), - @NamedQuery(name = "UserExperimentRole.findByUserExperimentRole", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.userId = :userId AND u.userExperimentRolePK.experimentId = :experimentId AND u.userExperimentRolePK.roleTypeId = :roleTypeId")}) - -public class UserExperimentRole extends CloneableEntity -{ - @EmbeddedId - protected UserExperimentRolePK userExperimentRolePK; - @JoinColumn(name = "user_id", referencedColumnName = "id", insertable = false, updatable = false) - @ManyToOne(optional = false) - private UserInfo userInfo; - @JoinColumn(name = "role_type_id", referencedColumnName = "id", insertable = false, updatable = false) - @ManyToOne(optional = false) - private RoleType roleType; - @JoinColumn(name = "experiment_id", referencedColumnName = "id", insertable = false, updatable = false) - @ManyToOne(optional = false) - private Experiment experiment; - - public UserExperimentRole() { - } - - public UserExperimentRole(UserExperimentRolePK userExperimentRolePK) { - this.userExperimentRolePK = userExperimentRolePK; - } - - public UserExperimentRole(int userId, int experimentId, int roleTypeId) { - this.userExperimentRolePK = new UserExperimentRolePK(userId, experimentId, roleTypeId); - } - - public UserExperimentRolePK getUserExperimentRolePK() { - return userExperimentRolePK; - } - - public void setUserExperimentRolePK(UserExperimentRolePK userExperimentRolePK) { - this.userExperimentRolePK = userExperimentRolePK; - } - - public UserInfo getUserInfo() { - return userInfo; - } - - public void setUserInfo(UserInfo userInfo) { - this.userInfo = userInfo; - } - - public RoleType getRoleType() { - return roleType; - } - - public void setRoleType(RoleType roleType) { - this.roleType = roleType; - } - - public Experiment getExperiment() { - return experiment; - } - - public void setExperiment(Experiment experiment) { - this.experiment = experiment; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (userExperimentRolePK != null ? userExperimentRolePK.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof UserExperimentRole)) { - return false; - } - UserExperimentRole other = (UserExperimentRole) object; - return (this.userExperimentRolePK != null || other.userExperimentRolePK == null) && (this.userExperimentRolePK == null || this.userExperimentRolePK.equals(other.userExperimentRolePK)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.UserExperimentRole[ userExperimentRolePK=" + userExperimentRolePK + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserExperimentRolePK.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserExperimentRolePK.java deleted file mode 100644 index 327c1ac1a9386fa1e25fda2de73872a78d2128b5..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserExperimentRolePK.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.io.Serializable; -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.validation.constraints.NotNull; - -/** - * - * @author sveseli - */ -@Embeddable -public class UserExperimentRolePK implements Serializable -{ - @Basic(optional = false) - @NotNull - @Column(name = "user_id") - private int userId; - @Basic(optional = false) - @NotNull - @Column(name = "experiment_id") - private int experimentId; - @Basic(optional = false) - @NotNull - @Column(name = "role_type_id") - private int roleTypeId; - - public UserExperimentRolePK() { - } - - public UserExperimentRolePK(int userId, int experimentId, int roleTypeId) { - this.userId = userId; - this.experimentId = experimentId; - this.roleTypeId = roleTypeId; - } - - public int getUserId() { - return userId; - } - - public void setUserId(int userId) { - this.userId = userId; - } - - public int getExperimentId() { - return experimentId; - } - - public void setExperimentId(int experimentId) { - this.experimentId = experimentId; - } - - public int getRoleTypeId() { - return roleTypeId; - } - - public void setRoleTypeId(int roleTypeId) { - this.roleTypeId = roleTypeId; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (int) userId; - hash += (int) experimentId * 100; - hash += (int) roleTypeId * 10000; - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof UserExperimentRolePK)) { - return false; - } - UserExperimentRolePK other = (UserExperimentRolePK) object; - if (this.userId != other.userId) { - return false; - } - if (this.experimentId != other.experimentId) { - return false; - } - return this.roleTypeId == other.roleTypeId; - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.UserExperimentRolePK[ userId=" + userId + ", experimentId=" + experimentId + ", roleTypeId=" + roleTypeId + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserInfo.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserInfo.java deleted file mode 100644 index c07873e88a5c1ffdd281f8d49ff45e02ba3812e6..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserInfo.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import java.util.ArrayList; -import java.util.List; -import javax.persistence.Basic; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "user_info") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "UserInfo.findAll", query = "SELECT u FROM UserInfo u"), - @NamedQuery(name = "UserInfo.findById", query = "SELECT u FROM UserInfo u WHERE u.id = :id"), - @NamedQuery(name = "UserInfo.findByUsername", query = "SELECT u FROM UserInfo u WHERE u.username = :username"), - @NamedQuery(name = "UserInfo.findByFirstName", query = "SELECT u FROM UserInfo u WHERE u.firstName = :firstName"), - @NamedQuery(name = "UserInfo.findByLastName", query = "SELECT u FROM UserInfo u WHERE u.lastName = :lastName"), - @NamedQuery(name = "UserInfo.findByMiddleName", query = "SELECT u FROM UserInfo u WHERE u.middleName = :middleName"), - @NamedQuery(name = "UserInfo.findByEmail", query = "SELECT u FROM UserInfo u WHERE u.email = :email"), - @NamedQuery(name = "UserInfo.findByDescription", query = "SELECT u FROM UserInfo u WHERE u.description = :description"), - @NamedQuery(name = "UserInfo.findByPassword", query = "SELECT u FROM UserInfo u WHERE u.password = :password"), - @NamedQuery(name = "UserInfo.findNonAdmins", query = "SELECT u FROM UserInfo u WHERE u.id NOT IN (SELECT u2.id from UserInfo u2 JOIN u2.roleTypeList rt WHERE rt.id = :roleTypeId)"), - @NamedQuery(name = "UserInfo.findUsersInRole", query = "SELECT u FROM UserInfo u WHERE u.id IN (SELECT u2.id from UserInfo u2 JOIN u2.roleTypeList rt WHERE rt.id = :roleTypeId)"), - @NamedQuery(name = "UserInfo.findUsersInExperiment", query = "SELECT DISTINCT u FROM UserInfo u WHERE u.id IN (SELECT u2.id from UserInfo u2 JOIN u2.userExperimentRoleList r WHERE r.experiment.id = :experimentId)"), - @NamedQuery(name = "UserInfo.findNoUsersInExperiment", query = "SELECT u FROM UserInfo u WHERE u.id NOT IN (SELECT u2.id from UserInfo u2 JOIN u2.userExperimentRoleList r WHERE r.experiment.id = :experimentId)"), - @NamedQuery(name = "UserInfo.findExperimentsInUser", query = "SELECT DISTINCT e FROM Experiment e WHERE e.id IN (SELECT e2.id from Experiment e2 JOIN e2.userExperimentRoleList r WHERE r.userInfo.id = :userId)")}) - -public class UserInfo extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "username") - private String username; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "first_name") - private String firstName; - @Basic(optional = false) - @NotNull - @Size(max = 256) - @Column(name = "last_name") - private String lastName; - @Size(max = 256) - @Column(name = "middle_name") - private String middleName; - // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation - @Size(max = 256) - @Column(name = "email") - private String email; - @Size(max = 256) - @Column(name = "badge") - private String badge; - @Size(max = 256) - @Column(name = "globus_username") - private String globusUsername; - @Size(max = 256) - @Column(name = "description") - private String description; - @Size(max = 256) - @Column(name = "password") - private String password; - @NotNull - @Column(name = "is_local_user") - private boolean isLocalUser = true; - @ManyToMany(mappedBy = "userInfoList") - private List<RoleType> roleTypeList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "userInfo") - private List<UserExperimentRole> userExperimentRoleList; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "userInfo") - private List<UserSetting> userSettingList; - - - public UserInfo() { - } - - public UserInfo(Integer id) { - this.id = id; - } - - public UserInfo(Integer id, String username, String firstName, String lastName) { - this.id = id; - this.username = username; - this.firstName = firstName; - this.lastName = lastName; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getMiddleName() { - return middleName; - } - - public void setMiddleName(String middleName) { - this.middleName = middleName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - public String getBadge() { - return badge; - } - - public void setBadge(String badge) { - this.badge = badge; - } - - public String getGlobusUsername() { - return globusUsername; - } - - public void setGlobusUsername(String globusUsername) { - this.globusUsername = globusUsername; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public boolean isLocalUser() { - return isLocalUser; - } - - public void setIsLocalUser(boolean isLocalUser) { - this.isLocalUser = isLocalUser; - } - - @XmlTransient - public List<RoleType> getRoleTypeList() { - return roleTypeList; - } - - public void setRoleTypeList(List<RoleType> roleTypeList) { - this.roleTypeList = roleTypeList; - } - - @XmlTransient - public List<UserExperimentRole> getUserExperimentRoleList() { - return userExperimentRoleList; - } - - public void setUserExperimentRoleList(List<UserExperimentRole> userExperimentRoleList) { - this.userExperimentRoleList = userExperimentRoleList; - } - - @XmlTransient - public List<UserSetting> getUserSettingList() { - return userSettingList; - } - - public void setUserSettingList(List<UserSetting> userSettingList) { - this.userSettingList = userSettingList; - } - - public void removeExperimentRole(int roleId, int experimentId) { - UserExperimentRole roleToRemove = null; - for (UserExperimentRole experimentRole : userExperimentRoleList) { - if ((experimentRole.getUserExperimentRolePK().getRoleTypeId() == roleId) && (experimentRole.getUserExperimentRolePK().getExperimentId() == experimentId)) { - roleToRemove = experimentRole; - break; - } - } - if (roleToRemove != null) { - userExperimentRoleList.remove(roleToRemove); - } - } - - public List<UserExperimentRole> getUserExperimentRoles(int experimentId) { - List<UserExperimentRole> roleList = new ArrayList<>(); - for (UserExperimentRole experimentRole : userExperimentRoleList) { - if (experimentRole.getUserExperimentRolePK().getExperimentId() == experimentId) { - roleList.add(experimentRole); - } - } - return roleList; - } - - public void addUserExperimentRole(UserExperimentRole userExperimentRole) { - userExperimentRoleList.add(userExperimentRole); - } - - public UserExperimentRole getExperimentRole(int roleId, int experimentId) { - for (UserExperimentRole experimentRole : userExperimentRoleList) { - if ((experimentRole.getUserExperimentRolePK().getRoleTypeId() == roleId) && (experimentRole.getUserExperimentRolePK().getExperimentId() == experimentId)) - return experimentRole; - } - return null; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof UserInfo)) { - return false; - } - UserInfo other = (UserInfo) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.UserInfo[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserSetting.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserSetting.java deleted file mode 100644 index 1eb68ac3025450e268221d897fdef765d2c56f56..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/model/entities/UserSetting.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package gov.anl.aps.dm.portal.model.entities; - -import javax.persistence.Basic; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlRootElement; - -/** - * - * @author sveseli - */ -@Entity -@Table(name = "user_setting") -@XmlRootElement -@NamedQueries({ - @NamedQuery(name = "UserSetting.findAll", query = "SELECT u FROM UserSetting u"), - @NamedQuery(name = "UserSetting.findById", query = "SELECT u FROM UserSetting u WHERE u.id = :id"), - @NamedQuery(name = "UserSetting.findBySettingValue", query = "SELECT u FROM UserSetting u WHERE u.settingValue = :settingValue")}) -public class UserSetting extends CloneableEntity -{ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Basic(optional = false) - @Column(name = "id") - private Integer id; - @Size(max = 256) - @Column(name = "setting_value") - private String settingValue; - @JoinColumn(name = "user_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private UserInfo userInfo; - @JoinColumn(name = "setting_type_id", referencedColumnName = "id") - @ManyToOne(optional = false) - private SettingType settingType; - - public UserSetting() { - } - - public UserSetting(Integer id) { - this.id = id; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getSettingValue() { - return settingValue; - } - - public void setSettingValue(String settingValue) { - this.settingValue = settingValue; - } - - public UserInfo getUserInfo() { - return userInfo; - } - - public void setUserInfo(UserInfo userInfo) { - this.userInfo = userInfo; - } - - public SettingType getSettingType() { - return settingType; - } - - public void setSettingType(SettingType settingType) { - this.settingType = settingType; - } - - @Override - public int hashCode() { - int hash = 0; - hash += (id != null ? id.hashCode() : 0); - return hash; - } - - @Override - public boolean equals(Object object) { - // TODO: Warning - this method won't work in the case the id fields are not set - if (!(object instanceof UserSetting)) { - return false; - } - UserSetting other = (UserSetting) object; - return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id)); - } - - @Override - public String toString() { - return "gov.anl.aps.dm.portal.model.entities.UserSetting[ id=" + id + " ]"; - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/ConfigurationUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/ConfigurationUtility.java deleted file mode 100644 index 23b2b0c758ae6d7467b1f9ad970dac747a9420f4..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/ConfigurationUtility.java +++ /dev/null @@ -1,103 +0,0 @@ -package gov.anl.aps.dm.portal.utilities; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; -import org.apache.log4j.Logger; - -public class ConfigurationUtility { - - public static final String PropertiesPath = "dm.portal.properties"; - public static final String PropertiesDelimiter = ","; - - private static final Logger logger = Logger.getLogger(ConfigurationUtility.class.getName()); - private static final Properties portalProperties = loadProperties(PropertiesPath); - - public Properties getPortalProperties() { - return portalProperties; - } - - public static String getPortalProperty(String propertyName) { - return portalProperties.getProperty(propertyName, ""); - } - - public static String getPortalProperty(String propertyName, String defaultValue) { - return portalProperties.getProperty(propertyName, defaultValue); - } - - public static List<String> getPortalPropertyList(String propertyName) { - return getPortalPropertyList(propertyName, ""); - } - - public static List<String> getPortalPropertyList(String propertyName, String defaultValue) { - String[] propertyArray = portalProperties.getProperty(propertyName, defaultValue).split(PropertiesDelimiter); - logger.debug("Looking for property " + propertyName); - ArrayList propertyList = new ArrayList(); - for (String property : propertyArray) { - String p = property.trim(); - if (p.length() > 0) { - propertyList.add(property.trim()); - } - } - logger.debug("Resulting property list: " + propertyList); - return propertyList; - } - - /** - * Load properties. - * - * @param path - * @return loaded properties - */ - public static Properties loadProperties(String path) { - Properties properties = new Properties(); - if (path != null) { - try { - logger.debug("Loading properties from " + path); - InputStream inputStream = ConfigurationUtility.class.getClassLoader().getResourceAsStream(path); - properties.load(inputStream); - } catch (IOException ex) { - logger.warn("Could not load properties from file " + path + ": " + ex); - } - } else { - logger.warn("Properties path not specified."); - } - return properties; - } - - /** - * Get system property. - * - * @param propertyName property name - * @return property value - */ - public static String getSystemProperty(String propertyName) { - Properties p = System.getProperties(); - return p.getProperty(propertyName); - } - - /** - * Get system property. - * - * @param propertyName property name - * @param defaultValue default property value - * @return property value - */ - public static String getSystemProperty(String propertyName, String defaultValue) { - Properties p = System.getProperties(); - return p.getProperty(propertyName, defaultValue); - } - - /** - * Get environment variable. - * - * @param name Environment variable name - * @return environment variable value, or null if it is not defined - */ - public static String getEnvVar(String name) { - return System.getenv(name); - } - -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/DmApiFactory.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/DmApiFactory.java deleted file mode 100644 index efd7fe283f8830c69e72dd561ba7d127a0e61d44..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/DmApiFactory.java +++ /dev/null @@ -1,27 +0,0 @@ -package gov.anl.aps.dm.portal.utilities; - -import gov.anl.aps.dm.api.ExperimentDsApi; -import gov.anl.aps.dm.common.constants.DmProperty; -import gov.anl.aps.dm.common.exceptions.ConfigurationError; -import gov.anl.aps.dm.common.exceptions.DmException; -import java.io.File; -import java.io.FileNotFoundException; -import java.util.Scanner; -import org.apache.log4j.Logger; - -public class DmApiFactory { - private static final Logger logger = Logger.getLogger(DmApiFactory.class.getName()); - - public static ExperimentDsApi getExperimentDsApi() throws DmException { - String webServiceUrl = ConfigurationUtility.getPortalProperty(DmProperty.DS_WEB_SERVICE_URL_PROPERTY_NAME); - String loginUsername = ConfigurationUtility.getPortalProperty(DmProperty.SYSTEM_USER_PROPERTY_NAME); - String loginPasswordFileName = ConfigurationUtility.getPortalProperty(DmProperty.SYSTEM_PASSWORD_FILE_PROPERTY_NAME); - try { - String loginPassword = new Scanner(new File(loginPasswordFileName)).useDelimiter("\\Z").next(); - return new ExperimentDsApi(webServiceUrl, loginUsername, loginPassword); - } catch (FileNotFoundException ex) { - logger.error("Cannot find system password file: " + loginPasswordFileName); - throw new ConfigurationError(ex); - } - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/SearchResult.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/SearchResult.java deleted file mode 100644 index 0529a8cfd266d0db71774fe82a2ba9e6e48c1e61..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/SearchResult.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package gov.anl.aps.dm.portal.utilities; - -import java.util.HashMap; -import java.util.regex.Pattern; - -/** - * - * @author sveseli - */ -public class SearchResult -{ - - private final Integer objectId; - private final String objectName; - private HashMap<String, String> objectAttributeMatchMap = new HashMap(); - - public SearchResult(Integer objectId, String objectName) { - this.objectId = objectId; - this.objectName = objectName; - } - - public Integer getObjectId() { - return objectId; - } - - public String getObjectName() { - return objectName; - } - - public void addAttributeMatch(String key, String value) { - objectAttributeMatchMap.put(key, value); - } - - public HashMap<String, String> getObjectAttributeMatchMap() { - return objectAttributeMatchMap; - } - - public void setObjectAttributeMatchMap(HashMap<String, String> objectAttributeMatchMap) { - this.objectAttributeMatchMap = objectAttributeMatchMap; - } - - public boolean isEmpty() { - return objectAttributeMatchMap.isEmpty(); - } - - public boolean doesValueContainPattern(String key, String value, Pattern searchPattern) { - if (value == null || value.isEmpty()) { - return false; - } - boolean searchResult = searchPattern.matcher(value).find(); - if (searchResult) { - addAttributeMatch(key, value); - } - return searchResult; - } - - public String getDisplay() { - String result = ""; - String keyDelimiter = ": "; - String entryDelimiter = ""; - for (String key : objectAttributeMatchMap.keySet()) { - result += entryDelimiter + key + keyDelimiter + objectAttributeMatchMap.get(key); - entryDelimiter = "; "; - } - return result; - } -} diff --git a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/SessionUtility.java b/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/SessionUtility.java deleted file mode 100644 index bf59cb2c40e2f0852d87960bed6bfbcb2531cd0f..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/gov/anl/aps/dm/portal/utilities/SessionUtility.java +++ /dev/null @@ -1,133 +0,0 @@ -package gov.anl.aps.dm.portal.utilities; - -import java.util.Map; -import java.util.Stack; -import javax.faces.application.FacesMessage; -import javax.faces.context.FacesContext; - -/** - * Session utility class. - */ -public class SessionUtility -{ - - /** - * Keys. - */ - public static final String MessagesKey = "messages"; - public static final String UserKey = "user"; - public static final String ViewStackKey = "viewStack"; - - /** - * Constructor. - */ - public SessionUtility() { - } - - /** - * Add error message. - * - * @param summary message summary - * @param detail detailed message - */ - public static void addErrorMessage(String summary, String detail) { - FacesContext context = FacesContext.getCurrentInstance(); - context.getExternalContext().getFlash().setKeepMessages(true); - context.addMessage(MessagesKey, new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, detail)); - } - - /** - * Add warning message. - * - * @param summary message summary - * @param detail detailed message - */ - public static void addWarningMessage(String summary, String detail) { - FacesContext context = FacesContext.getCurrentInstance(); - context.getExternalContext().getFlash().setKeepMessages(true); - context.addMessage(MessagesKey, new FacesMessage(FacesMessage.SEVERITY_WARN, summary, detail)); - } - - /** - * Add info message. - * - * @param summary message summary - * @param detail detailed message - */ - public static void addInfoMessage(String summary, String detail) { - FacesContext context = FacesContext.getCurrentInstance(); - context.getExternalContext().getFlash().setKeepMessages(true); - context.addMessage(MessagesKey, new FacesMessage(FacesMessage.SEVERITY_INFO, summary, detail)); - } - - /** - * Get request parameter value. - * - * @param parameterName parameter name - * @return parameter value - */ - public static String getRequestParameterValue(String parameterName) { - Map parameterMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap(); - return (String) parameterMap.get(parameterName); - } - - /** - * Set user. - * - * @param user user - */ - public static void setUser(Object user) { - Map sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap(); - sessionMap.put(UserKey, user); - } - - /** - * Get user. - * - * @return user - */ - public static Object getUser() { - Map sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap(); - return sessionMap.get(UserKey); - } - - public static void pushViewOnStack(String viewId) { - Map sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap(); - Stack<String> viewStack = (Stack) sessionMap.get(ViewStackKey); - if (viewStack == null) { - viewStack = new Stack<>(); - sessionMap.put(ViewStackKey, viewStack); - } - viewStack.push(viewId); - } - - public static String popViewFromStack() { - Map sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap(); - Stack<String> viewStack = (Stack) sessionMap.get(ViewStackKey); - if (viewStack != null && !viewStack.empty()) { - return viewStack.pop(); - } - return null; - } - - public static String getCurrentViewId() { - FacesContext context = FacesContext.getCurrentInstance(); - return context.getViewRoot().getViewId(); - } - - public static String getReferrerViewId() { - String referrer = FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap().get("referer"); - if (referrer != null) { - int beginViewId = referrer.indexOf("/views"); - if (beginViewId >= 0) { - return referrer.substring(beginViewId); - } - } - return null; - } - - public static void clearSession() { - Map sessionMap = FacesContext.getCurrentInstance().getExternalContext().getSessionMap(); - sessionMap.clear(); - } -} diff --git a/src/java/DmWebPortal/src/java/log4j.properties b/src/java/DmWebPortal/src/java/log4j.properties deleted file mode 100644 index 4fbd9dde38f2d565e9560f3055c5dae18601041d..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/log4j.properties +++ /dev/null @@ -1,11 +0,0 @@ -# Root logger option -log4j.rootCategory=ERROR,stdout - -# Direct log messages to stdout -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -#log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d{yyyy/MM/dd HH:mm:ss,SSS} %-5p %c{1} [%t]: %m%n - -# Log levels -log4j.category.gov.anl.aps.dm=DEBUG diff --git a/src/java/DmWebPortal/src/java/resources.properties b/src/java/DmWebPortal/src/java/resources.properties deleted file mode 100644 index d165d4847740cd4b4a1fa4d190e8db4ac0f82108..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/src/java/resources.properties +++ /dev/null @@ -1,932 +0,0 @@ -DatePattern=MM/dd/yyyy -DateTimePattern=MM/dd/yyyy hh:mm a -DateTimeZonePattern=MM/dd/yyyy hh:mm a z -Timezone=America/Chicago -PersistenceErrorOccured=A persistence error occurred. -Previous=Previous -Next=Next - -AllowedPolicyValueCreated=AllowedPolicyValue was successfully created. -AllowedPolicyValueUpdated=AllowedPolicyValue was successfully updated. -AllowedPolicyValueDeleted=AllowedPolicyValue was successfully deleted. -CreateAllowedPolicyValueTitle=Create New AllowedPolicyValue -CreateAllowedPolicyValueSaveLink=Save -CreateAllowedPolicyValueShowAllLink=Show All AllowedPolicyValue Items -CreateAllowedPolicyValueIndexLink=Index -CreateAllowedPolicyValueLabel_id=Id: -CreateAllowedPolicyValueRequiredMessage_id=The Id field is required. -CreateAllowedPolicyValueTitle_id=Id -CreateAllowedPolicyValueLabel_value=Value: -CreateAllowedPolicyValueTitle_value=Value -CreateAllowedPolicyValueLabel_description=Description: -CreateAllowedPolicyValueTitle_description=Description -CreateAllowedPolicyValueLabel_policyTypeId=PolicyTypeId: -CreateAllowedPolicyValueRequiredMessage_policyTypeId=The PolicyTypeId field is required. -CreateAllowedPolicyValueTitle_policyTypeId=PolicyTypeId -EditAllowedPolicyValueTitle=Edit AllowedPolicyValue -EditAllowedPolicyValueSaveLink=Save -EditAllowedPolicyValueViewLink=View -EditAllowedPolicyValueShowAllLink=Show All AllowedPolicyValue Items -EditAllowedPolicyValueIndexLink=Index -EditAllowedPolicyValueLabel_id=Id: -EditAllowedPolicyValueRequiredMessage_id=The Id field is required. -EditAllowedPolicyValueTitle_id=Id -EditAllowedPolicyValueLabel_value=Value: -EditAllowedPolicyValueTitle_value=Value -EditAllowedPolicyValueLabel_description=Description: -EditAllowedPolicyValueTitle_description=Description -EditAllowedPolicyValueLabel_policyTypeId=PolicyTypeId: -EditAllowedPolicyValueRequiredMessage_policyTypeId=The PolicyTypeId field is required. -EditAllowedPolicyValueTitle_policyTypeId=PolicyTypeId -ViewAllowedPolicyValueTitle=View -ViewAllowedPolicyValueDestroyLink=Destroy -ViewAllowedPolicyValueEditLink=Edit -ViewAllowedPolicyValueCreateLink=Create New AllowedPolicyValue -ViewAllowedPolicyValueShowAllLink=Show All AllowedPolicyValue Items -ViewAllowedPolicyValueIndexLink=Index -ViewAllowedPolicyValueLabel_id=Id: -ViewAllowedPolicyValueTitle_id=Id -ViewAllowedPolicyValueLabel_value=Value: -ViewAllowedPolicyValueTitle_value=Value -ViewAllowedPolicyValueLabel_description=Description: -ViewAllowedPolicyValueTitle_description=Description -ViewAllowedPolicyValueLabel_policyTypeId=PolicyTypeId: -ViewAllowedPolicyValueTitle_policyTypeId=PolicyTypeId -ListAllowedPolicyValueTitle=List -ListAllowedPolicyValueEmpty=(No AllowedPolicyValue Items Found) -ListAllowedPolicyValueDestroyLink=Destroy -ListAllowedPolicyValueEditLink=Edit -ListAllowedPolicyValueViewLink=View -ListAllowedPolicyValueCreateLink=Create New AllowedPolicyValue -ListAllowedPolicyValueIndexLink=Index -ListAllowedPolicyValueTitle_id=Id -ListAllowedPolicyValueTitle_value=Value -ListAllowedPolicyValueTitle_description=Description -ListAllowedPolicyValueTitle_policyTypeId=PolicyTypeId -AllowedSettingValueCreated=AllowedSettingValue was successfully created. -AllowedSettingValueUpdated=AllowedSettingValue was successfully updated. -AllowedSettingValueDeleted=AllowedSettingValue was successfully deleted. -CreateAllowedSettingValueTitle=Create New AllowedSettingValue -CreateAllowedSettingValueSaveLink=Save -CreateAllowedSettingValueShowAllLink=Show All AllowedSettingValue Items -CreateAllowedSettingValueIndexLink=Index -CreateAllowedSettingValueLabel_id=Id: -CreateAllowedSettingValueRequiredMessage_id=The Id field is required. -CreateAllowedSettingValueTitle_id=Id -CreateAllowedSettingValueLabel_value=Value: -CreateAllowedSettingValueTitle_value=Value -CreateAllowedSettingValueLabel_description=Description: -CreateAllowedSettingValueTitle_description=Description -CreateAllowedSettingValueLabel_settingTypeId=SettingTypeId: -CreateAllowedSettingValueRequiredMessage_settingTypeId=The SettingTypeId field is required. -CreateAllowedSettingValueTitle_settingTypeId=SettingTypeId -EditAllowedSettingValueTitle=Edit AllowedSettingValue -EditAllowedSettingValueSaveLink=Save -EditAllowedSettingValueViewLink=View -EditAllowedSettingValueShowAllLink=Show All AllowedSettingValue Items -EditAllowedSettingValueIndexLink=Index -EditAllowedSettingValueLabel_id=Id: -EditAllowedSettingValueRequiredMessage_id=The Id field is required. -EditAllowedSettingValueTitle_id=Id -EditAllowedSettingValueLabel_value=Value: -EditAllowedSettingValueTitle_value=Value -EditAllowedSettingValueLabel_description=Description: -EditAllowedSettingValueTitle_description=Description -EditAllowedSettingValueLabel_settingTypeId=SettingTypeId: -EditAllowedSettingValueRequiredMessage_settingTypeId=The SettingTypeId field is required. -EditAllowedSettingValueTitle_settingTypeId=SettingTypeId -ViewAllowedSettingValueTitle=View -ViewAllowedSettingValueDestroyLink=Destroy -ViewAllowedSettingValueEditLink=Edit -ViewAllowedSettingValueCreateLink=Create New AllowedSettingValue -ViewAllowedSettingValueShowAllLink=Show All AllowedSettingValue Items -ViewAllowedSettingValueIndexLink=Index -ViewAllowedSettingValueLabel_id=Id: -ViewAllowedSettingValueTitle_id=Id -ViewAllowedSettingValueLabel_value=Value: -ViewAllowedSettingValueTitle_value=Value -ViewAllowedSettingValueLabel_description=Description: -ViewAllowedSettingValueTitle_description=Description -ViewAllowedSettingValueLabel_settingTypeId=SettingTypeId: -ViewAllowedSettingValueTitle_settingTypeId=SettingTypeId -ListAllowedSettingValueTitle=List -ListAllowedSettingValueEmpty=(No AllowedSettingValue Items Found) -ListAllowedSettingValueDestroyLink=Destroy -ListAllowedSettingValueEditLink=Edit -ListAllowedSettingValueViewLink=View -ListAllowedSettingValueCreateLink=Create New AllowedSettingValue -ListAllowedSettingValueIndexLink=Index -ListAllowedSettingValueTitle_id=Id -ListAllowedSettingValueTitle_value=Value -ListAllowedSettingValueTitle_description=Description -ListAllowedSettingValueTitle_settingTypeId=SettingTypeId -DataFolderCreated=DataFolder was successfully created. -DataFolderUpdated=DataFolder was successfully updated. -DataFolderDeleted=DataFolder was successfully deleted. -CreateDataFolderTitle=Create New DataFolder -CreateDataFolderSaveLink=Save -CreateDataFolderShowAllLink=Show All DataFolder Items -CreateDataFolderIndexLink=Index -CreateDataFolderLabel_id=Id: -CreateDataFolderRequiredMessage_id=The Id field is required. -CreateDataFolderTitle_id=Id -CreateDataFolderLabel_path=Path: -CreateDataFolderRequiredMessage_path=The Path field is required. -CreateDataFolderTitle_path=Path -CreateDataFolderLabel_description=Description: -CreateDataFolderTitle_description=Description -CreateDataFolderLabel_parentDataFolderId=ParentDataFolderId: -CreateDataFolderTitle_parentDataFolderId=ParentDataFolderId -EditDataFolderTitle=Edit DataFolder -EditDataFolderSaveLink=Save -EditDataFolderViewLink=View -EditDataFolderShowAllLink=Show All DataFolder Items -EditDataFolderIndexLink=Index -EditDataFolderLabel_id=Id: -EditDataFolderRequiredMessage_id=The Id field is required. -EditDataFolderTitle_id=Id -EditDataFolderLabel_path=Path: -EditDataFolderRequiredMessage_path=The Path field is required. -EditDataFolderTitle_path=Path -EditDataFolderLabel_description=Description: -EditDataFolderTitle_description=Description -EditDataFolderLabel_parentDataFolderId=ParentDataFolderId: -EditDataFolderTitle_parentDataFolderId=ParentDataFolderId -ViewDataFolderTitle=View -ViewDataFolderDestroyLink=Destroy -ViewDataFolderEditLink=Edit -ViewDataFolderCreateLink=Create New DataFolder -ViewDataFolderShowAllLink=Show All DataFolder Items -ViewDataFolderIndexLink=Index -ViewDataFolderLabel_id=Id: -ViewDataFolderTitle_id=Id -ViewDataFolderLabel_path=Path: -ViewDataFolderTitle_path=Path -ViewDataFolderLabel_description=Description: -ViewDataFolderTitle_description=Description -ViewDataFolderLabel_parentDataFolderId=ParentDataFolderId: -ViewDataFolderTitle_parentDataFolderId=ParentDataFolderId -ListDataFolderTitle=List -ListDataFolderEmpty=(No DataFolder Items Found) -ListDataFolderDestroyLink=Destroy -ListDataFolderEditLink=Edit -ListDataFolderViewLink=View -ListDataFolderCreateLink=Create New DataFolder -ListDataFolderIndexLink=Index -ListDataFolderTitle_id=Id -ListDataFolderTitle_path=Path -ListDataFolderTitle_description=Description -ListDataFolderTitle_parentDataFolderId=ParentDataFolderId -DataFolderPermissionCreated=DataFolderPermission was successfully created. -DataFolderPermissionUpdated=DataFolderPermission was successfully updated. -DataFolderPermissionDeleted=DataFolderPermission was successfully deleted. -CreateDataFolderPermissionTitle=Create New DataFolderPermission -CreateDataFolderPermissionSaveLink=Save -CreateDataFolderPermissionShowAllLink=Show All DataFolderPermission Items -CreateDataFolderPermissionIndexLink=Index -CreateDataFolderPermissionLabel_id=Id: -CreateDataFolderPermissionRequiredMessage_id=The Id field is required. -CreateDataFolderPermissionTitle_id=Id -CreateDataFolderPermissionLabel_value=Value: -CreateDataFolderPermissionRequiredMessage_value=The Value field is required. -CreateDataFolderPermissionTitle_value=Value -CreateDataFolderPermissionLabel_description=Description: -CreateDataFolderPermissionTitle_description=Description -CreateDataFolderPermissionLabel_dataFolderId=DataFolderId: -CreateDataFolderPermissionRequiredMessage_dataFolderId=The DataFolderId field is required. -CreateDataFolderPermissionTitle_dataFolderId=DataFolderId -EditDataFolderPermissionTitle=Edit DataFolderPermission -EditDataFolderPermissionSaveLink=Save -EditDataFolderPermissionViewLink=View -EditDataFolderPermissionShowAllLink=Show All DataFolderPermission Items -EditDataFolderPermissionIndexLink=Index -EditDataFolderPermissionLabel_id=Id: -EditDataFolderPermissionRequiredMessage_id=The Id field is required. -EditDataFolderPermissionTitle_id=Id -EditDataFolderPermissionLabel_value=Value: -EditDataFolderPermissionRequiredMessage_value=The Value field is required. -EditDataFolderPermissionTitle_value=Value -EditDataFolderPermissionLabel_description=Description: -EditDataFolderPermissionTitle_description=Description -EditDataFolderPermissionLabel_dataFolderId=DataFolderId: -EditDataFolderPermissionRequiredMessage_dataFolderId=The DataFolderId field is required. -EditDataFolderPermissionTitle_dataFolderId=DataFolderId -ViewDataFolderPermissionTitle=View -ViewDataFolderPermissionDestroyLink=Destroy -ViewDataFolderPermissionEditLink=Edit -ViewDataFolderPermissionCreateLink=Create New DataFolderPermission -ViewDataFolderPermissionShowAllLink=Show All DataFolderPermission Items -ViewDataFolderPermissionIndexLink=Index -ViewDataFolderPermissionLabel_id=Id: -ViewDataFolderPermissionTitle_id=Id -ViewDataFolderPermissionLabel_value=Value: -ViewDataFolderPermissionTitle_value=Value -ViewDataFolderPermissionLabel_description=Description: -ViewDataFolderPermissionTitle_description=Description -ViewDataFolderPermissionLabel_dataFolderId=DataFolderId: -ViewDataFolderPermissionTitle_dataFolderId=DataFolderId -ListDataFolderPermissionTitle=List -ListDataFolderPermissionEmpty=(No DataFolderPermission Items Found) -ListDataFolderPermissionDestroyLink=Destroy -ListDataFolderPermissionEditLink=Edit -ListDataFolderPermissionViewLink=View -ListDataFolderPermissionCreateLink=Create New DataFolderPermission -ListDataFolderPermissionIndexLink=Index -ListDataFolderPermissionTitle_id=Id -ListDataFolderPermissionTitle_value=Value -ListDataFolderPermissionTitle_description=Description -ListDataFolderPermissionTitle_dataFolderId=DataFolderId -ExperimentCreated=Experiment was successfully created. -ExperimentUpdated=Experiment was successfully updated. -ExperimentDeleted=Experiment was successfully deleted. -CreateExperimentTitle=Create New Experiment -CreateExperimentSaveLink=Save -CreateExperimentShowAllLink=Show All Experiment Items -CreateExperimentIndexLink=Index -CreateExperimentLabel_id=Id: -CreateExperimentRequiredMessage_id=The Id field is required. -CreateExperimentTitle_id=Id -CreateExperimentLabel_name=Name: -CreateExperimentRequiredMessage_name=The Name field is required. -CreateExperimentTitle_name=Name -CreateExperimentLabel_description=Description: -CreateExperimentTitle_description=Description -CreateExperimentLabel_startDate=StartDate: -CreateExperimentTitle_startDate=StartDate -CreateExperimentLabel_endDate=EndDate: -CreateExperimentTitle_endDate=EndDate -CreateExperimentLabel_experimentTypeId=ExperimentTypeId: -CreateExperimentRequiredMessage_experimentTypeId=The ExperimentTypeId field is required. -CreateExperimentTitle_experimentTypeId=ExperimentTypeId -EditExperimentTitle=Edit Experiment -EditExperimentSaveLink=Save -EditExperimentViewLink=View -EditExperimentShowAllLink=Show All Experiment Items -EditExperimentIndexLink=Index -EditExperimentLabel_id=Id: -EditExperimentRequiredMessage_id=The Id field is required. -EditExperimentTitle_id=Id -EditExperimentLabel_name=Name: -EditExperimentRequiredMessage_name=The Name field is required. -EditExperimentTitle_name=Name -EditExperimentLabel_description=Description: -EditExperimentTitle_description=Description -EditExperimentLabel_startDate=StartDate: -EditExperimentTitle_startDate=StartDate -EditExperimentLabel_endDate=EndDate: -EditExperimentTitle_endDate=EndDate -EditExperimentLabel_experimentTypeId=ExperimentTypeId: -EditExperimentRequiredMessage_experimentTypeId=The ExperimentTypeId field is required. -EditExperimentTitle_experimentTypeId=ExperimentTypeId -ViewExperimentTitle=View -ViewExperimentDestroyLink=Destroy -ViewExperimentEditLink=Edit -ViewExperimentCreateLink=Create New Experiment -ViewExperimentShowAllLink=Show All Experiment Items -ViewExperimentIndexLink=Index -ViewExperimentLabel_id=Id: -ViewExperimentTitle_id=Id -ViewExperimentLabel_name=Name: -ViewExperimentTitle_name=Name -ViewExperimentLabel_description=Description: -ViewExperimentTitle_description=Description -ViewExperimentLabel_startDate=StartDate: -ViewExperimentTitle_startDate=StartDate -ViewExperimentLabel_endDate=EndDate: -ViewExperimentTitle_endDate=EndDate -ViewExperimentLabel_experimentTypeId=ExperimentTypeId: -ViewExperimentTitle_experimentTypeId=ExperimentTypeId -ListExperimentTitle=List -ListExperimentEmpty=(No Experiment Items Found) -ListExperimentDestroyLink=Destroy -ListExperimentEditLink=Edit -ListExperimentViewLink=View -ListExperimentCreateLink=Create New Experiment -ListExperimentIndexLink=Index -ListExperimentTitle_id=Id -ListExperimentTitle_name=Name -ListExperimentTitle_description=Description -ListExperimentTitle_startDate=StartDate -ListExperimentTitle_endDate=EndDate -ListExperimentTitle_experimentTypeId=ExperimentTypeId -ExperimentPolicyCreated=ExperimentPolicy was successfully created. -ExperimentPolicyUpdated=ExperimentPolicy was successfully updated. -ExperimentPolicyDeleted=ExperimentPolicy was successfully deleted. -CreateExperimentPolicyTitle=Create New ExperimentPolicy -CreateExperimentPolicySaveLink=Save -CreateExperimentPolicyShowAllLink=Show All ExperimentPolicy Items -CreateExperimentPolicyIndexLink=Index -CreateExperimentPolicyLabel_id=Id: -CreateExperimentPolicyRequiredMessage_id=The Id field is required. -CreateExperimentPolicyTitle_id=Id -CreateExperimentPolicyLabel_value=Value: -CreateExperimentPolicyRequiredMessage_value=The Value field is required. -CreateExperimentPolicyTitle_value=Value -CreateExperimentPolicyLabel_description=Description: -CreateExperimentPolicyTitle_description=Description -CreateExperimentPolicyLabel_policyTypeId=PolicyTypeId: -CreateExperimentPolicyRequiredMessage_policyTypeId=The PolicyTypeId field is required. -CreateExperimentPolicyTitle_policyTypeId=PolicyTypeId -CreateExperimentPolicyLabel_experimentId=ExperimentId: -CreateExperimentPolicyRequiredMessage_experimentId=The ExperimentId field is required. -CreateExperimentPolicyTitle_experimentId=ExperimentId -EditExperimentPolicyTitle=Edit ExperimentPolicy -EditExperimentPolicySaveLink=Save -EditExperimentPolicyViewLink=View -EditExperimentPolicyShowAllLink=Show All ExperimentPolicy Items -EditExperimentPolicyIndexLink=Index -EditExperimentPolicyLabel_id=Id: -EditExperimentPolicyRequiredMessage_id=The Id field is required. -EditExperimentPolicyTitle_id=Id -EditExperimentPolicyLabel_value=Value: -EditExperimentPolicyRequiredMessage_value=The Value field is required. -EditExperimentPolicyTitle_value=Value -EditExperimentPolicyLabel_description=Description: -EditExperimentPolicyTitle_description=Description -EditExperimentPolicyLabel_policyTypeId=PolicyTypeId: -EditExperimentPolicyRequiredMessage_policyTypeId=The PolicyTypeId field is required. -EditExperimentPolicyTitle_policyTypeId=PolicyTypeId -EditExperimentPolicyLabel_experimentId=ExperimentId: -EditExperimentPolicyRequiredMessage_experimentId=The ExperimentId field is required. -EditExperimentPolicyTitle_experimentId=ExperimentId -ViewExperimentPolicyTitle=View -ViewExperimentPolicyDestroyLink=Destroy -ViewExperimentPolicyEditLink=Edit -ViewExperimentPolicyCreateLink=Create New ExperimentPolicy -ViewExperimentPolicyShowAllLink=Show All ExperimentPolicy Items -ViewExperimentPolicyIndexLink=Index -ViewExperimentPolicyLabel_id=Id: -ViewExperimentPolicyTitle_id=Id -ViewExperimentPolicyLabel_value=Value: -ViewExperimentPolicyTitle_value=Value -ViewExperimentPolicyLabel_description=Description: -ViewExperimentPolicyTitle_description=Description -ViewExperimentPolicyLabel_policyTypeId=PolicyTypeId: -ViewExperimentPolicyTitle_policyTypeId=PolicyTypeId -ViewExperimentPolicyLabel_experimentId=ExperimentId: -ViewExperimentPolicyTitle_experimentId=ExperimentId -ListExperimentPolicyTitle=List -ListExperimentPolicyEmpty=(No ExperimentPolicy Items Found) -ListExperimentPolicyDestroyLink=Destroy -ListExperimentPolicyEditLink=Edit -ListExperimentPolicyViewLink=View -ListExperimentPolicyCreateLink=Create New ExperimentPolicy -ListExperimentPolicyIndexLink=Index -ListExperimentPolicyTitle_id=Id -ListExperimentPolicyTitle_value=Value -ListExperimentPolicyTitle_description=Description -ListExperimentPolicyTitle_policyTypeId=PolicyTypeId -ListExperimentPolicyTitle_experimentId=ExperimentId -ExperimentTypeCreated=ExperimentType was successfully created. -ExperimentTypeUpdated=ExperimentType was successfully updated. -ExperimentTypeDeleted=ExperimentType was successfully deleted. -CreateExperimentTypeTitle=Create New ExperimentType -CreateExperimentTypeSaveLink=Save -CreateExperimentTypeShowAllLink=Show All ExperimentType Items -CreateExperimentTypeIndexLink=Index -CreateExperimentTypeLabel_id=Id: -CreateExperimentTypeRequiredMessage_id=The Id field is required. -CreateExperimentTypeTitle_id=Id -CreateExperimentTypeLabel_name=Name: -CreateExperimentTypeRequiredMessage_name=The Name field is required. -CreateExperimentTypeTitle_name=Name -CreateExperimentTypeLabel_description=Description: -CreateExperimentTypeTitle_description=Description -CreateExperimentTypeLabel_rootDataPath=RootDataPath: -CreateExperimentTypeTitle_rootDataPath=RootDataPath -EditExperimentTypeTitle=Edit ExperimentType -EditExperimentTypeSaveLink=Save -EditExperimentTypeViewLink=View -EditExperimentTypeShowAllLink=Show All ExperimentType Items -EditExperimentTypeIndexLink=Index -EditExperimentTypeLabel_id=Id: -EditExperimentTypeRequiredMessage_id=The Id field is required. -EditExperimentTypeTitle_id=Id -EditExperimentTypeLabel_name=Name: -EditExperimentTypeRequiredMessage_name=The Name field is required. -EditExperimentTypeTitle_name=Name -EditExperimentTypeLabel_description=Description: -EditExperimentTypeTitle_description=Description -EditExperimentTypeLabel_rootDataPath=RootDataPath: -EditExperimentTypeTitle_rootDataPath=RootDataPath -ViewExperimentTypeTitle=View -ViewExperimentTypeDestroyLink=Destroy -ViewExperimentTypeEditLink=Edit -ViewExperimentTypeCreateLink=Create New ExperimentType -ViewExperimentTypeShowAllLink=Show All ExperimentType Items -ViewExperimentTypeIndexLink=Index -ViewExperimentTypeLabel_id=Id: -ViewExperimentTypeTitle_id=Id -ViewExperimentTypeLabel_name=Name: -ViewExperimentTypeTitle_name=Name -ViewExperimentTypeLabel_description=Description: -ViewExperimentTypeTitle_description=Description -ViewExperimentTypeLabel_rootDataPath=RootDataPath: -ViewExperimentTypeTitle_rootDataPath=RootDataPath -ListExperimentTypeTitle=List -ListExperimentTypeEmpty=(No ExperimentType Items Found) -ListExperimentTypeDestroyLink=Destroy -ListExperimentTypeEditLink=Edit -ListExperimentTypeViewLink=View -ListExperimentTypeCreateLink=Create New ExperimentType -ListExperimentTypeIndexLink=Index -ListExperimentTypeTitle_id=Id -ListExperimentTypeTitle_name=Name -ListExperimentTypeTitle_description=Description -ListExperimentTypeTitle_rootDataPath=RootDataPath -PolicyTypeCreated=PolicyType was successfully created. -PolicyTypeUpdated=PolicyType was successfully updated. -PolicyTypeDeleted=PolicyType was successfully deleted. -CreatePolicyTypeTitle=Create New PolicyType -CreatePolicyTypeSaveLink=Save -CreatePolicyTypeShowAllLink=Show All PolicyType Items -CreatePolicyTypeIndexLink=Index -CreatePolicyTypeLabel_id=Id: -CreatePolicyTypeRequiredMessage_id=The Id field is required. -CreatePolicyTypeTitle_id=Id -CreatePolicyTypeLabel_name=Name: -CreatePolicyTypeRequiredMessage_name=The Name field is required. -CreatePolicyTypeTitle_name=Name -CreatePolicyTypeLabel_description=Description: -CreatePolicyTypeTitle_description=Description -CreatePolicyTypeLabel_handlerName=HandlerName: -CreatePolicyTypeTitle_handlerName=HandlerName -CreatePolicyTypeLabel_defaultValue=DefaultValue: -CreatePolicyTypeTitle_defaultValue=DefaultValue -EditPolicyTypeTitle=Edit PolicyType -EditPolicyTypeSaveLink=Save -EditPolicyTypeViewLink=View -EditPolicyTypeShowAllLink=Show All PolicyType Items -EditPolicyTypeIndexLink=Index -EditPolicyTypeLabel_id=Id: -EditPolicyTypeRequiredMessage_id=The Id field is required. -EditPolicyTypeTitle_id=Id -EditPolicyTypeLabel_name=Name: -EditPolicyTypeRequiredMessage_name=The Name field is required. -EditPolicyTypeTitle_name=Name -EditPolicyTypeLabel_description=Description: -EditPolicyTypeTitle_description=Description -EditPolicyTypeLabel_handlerName=HandlerName: -EditPolicyTypeTitle_handlerName=HandlerName -EditPolicyTypeLabel_defaultValue=DefaultValue: -EditPolicyTypeTitle_defaultValue=DefaultValue -ViewPolicyTypeTitle=View -ViewPolicyTypeDestroyLink=Destroy -ViewPolicyTypeEditLink=Edit -ViewPolicyTypeCreateLink=Create New PolicyType -ViewPolicyTypeShowAllLink=Show All PolicyType Items -ViewPolicyTypeIndexLink=Index -ViewPolicyTypeLabel_id=Id: -ViewPolicyTypeTitle_id=Id -ViewPolicyTypeLabel_name=Name: -ViewPolicyTypeTitle_name=Name -ViewPolicyTypeLabel_description=Description: -ViewPolicyTypeTitle_description=Description -ViewPolicyTypeLabel_handlerName=HandlerName: -ViewPolicyTypeTitle_handlerName=HandlerName -ViewPolicyTypeLabel_defaultValue=DefaultValue: -ViewPolicyTypeTitle_defaultValue=DefaultValue -ListPolicyTypeTitle=List -ListPolicyTypeEmpty=(No PolicyType Items Found) -ListPolicyTypeDestroyLink=Destroy -ListPolicyTypeEditLink=Edit -ListPolicyTypeViewLink=View -ListPolicyTypeCreateLink=Create New PolicyType -ListPolicyTypeIndexLink=Index -ListPolicyTypeTitle_id=Id -ListPolicyTypeTitle_name=Name -ListPolicyTypeTitle_description=Description -ListPolicyTypeTitle_handlerName=HandlerName -ListPolicyTypeTitle_defaultValue=DefaultValue -RoleTypeCreated=RoleType was successfully created. -RoleTypeUpdated=RoleType was successfully updated. -RoleTypeDeleted=RoleType was successfully deleted. -CreateRoleTypeTitle=Create New RoleType -CreateRoleTypeSaveLink=Save -CreateRoleTypeShowAllLink=Show All RoleType Items -CreateRoleTypeIndexLink=Index -CreateRoleTypeLabel_id=Id: -CreateRoleTypeRequiredMessage_id=The Id field is required. -CreateRoleTypeTitle_id=Id -CreateRoleTypeLabel_name=Name: -CreateRoleTypeRequiredMessage_name=The Name field is required. -CreateRoleTypeTitle_name=Name -CreateRoleTypeLabel_description=Description: -CreateRoleTypeTitle_description=Description -EditRoleTypeTitle=Edit RoleType -EditRoleTypeSaveLink=Save -EditRoleTypeViewLink=View -EditRoleTypeShowAllLink=Show All RoleType Items -EditRoleTypeIndexLink=Index -EditRoleTypeLabel_id=Id: -EditRoleTypeRequiredMessage_id=The Id field is required. -EditRoleTypeTitle_id=Id -EditRoleTypeLabel_name=Name: -EditRoleTypeRequiredMessage_name=The Name field is required. -EditRoleTypeTitle_name=Name -EditRoleTypeLabel_description=Description: -EditRoleTypeTitle_description=Description -ViewRoleTypeTitle=View -ViewRoleTypeDestroyLink=Destroy -ViewRoleTypeEditLink=Edit -ViewRoleTypeCreateLink=Create New RoleType -ViewRoleTypeShowAllLink=Show All RoleType Items -ViewRoleTypeIndexLink=Index -ViewRoleTypeLabel_id=Id: -ViewRoleTypeTitle_id=Id -ViewRoleTypeLabel_name=Name: -ViewRoleTypeTitle_name=Name -ViewRoleTypeLabel_description=Description: -ViewRoleTypeTitle_description=Description -ListRoleTypeTitle=List -ListRoleTypeEmpty=(No RoleType Items Found) -ListRoleTypeDestroyLink=Destroy -ListRoleTypeEditLink=Edit -ListRoleTypeViewLink=View -ListRoleTypeCreateLink=Create New RoleType -ListRoleTypeIndexLink=Index -ListRoleTypeTitle_id=Id -ListRoleTypeTitle_name=Name -ListRoleTypeTitle_description=Description -SettingTypeCreated=SettingType was successfully created. -SettingTypeUpdated=SettingType was successfully updated. -SettingTypeDeleted=SettingType was successfully deleted. -CreateSettingTypeTitle=Create New SettingType -CreateSettingTypeSaveLink=Save -CreateSettingTypeShowAllLink=Show All SettingType Items -CreateSettingTypeIndexLink=Index -CreateSettingTypeLabel_id=Id: -CreateSettingTypeRequiredMessage_id=The Id field is required. -CreateSettingTypeTitle_id=Id -CreateSettingTypeLabel_name=Name: -CreateSettingTypeRequiredMessage_name=The Name field is required. -CreateSettingTypeTitle_name=Name -CreateSettingTypeLabel_description=Description: -CreateSettingTypeTitle_description=Description -CreateSettingTypeLabel_defaultValue=DefaultValue: -CreateSettingTypeTitle_defaultValue=DefaultValue -CreateSettingTypeLabel_isUserModifiable=IsUserModifiable: -CreateSettingTypeTitle_isUserModifiable=IsUserModifiable -EditSettingTypeTitle=Edit SettingType -EditSettingTypeSaveLink=Save -EditSettingTypeViewLink=View -EditSettingTypeShowAllLink=Show All SettingType Items -EditSettingTypeIndexLink=Index -EditSettingTypeLabel_id=Id: -EditSettingTypeRequiredMessage_id=The Id field is required. -EditSettingTypeTitle_id=Id -EditSettingTypeLabel_name=Name: -EditSettingTypeRequiredMessage_name=The Name field is required. -EditSettingTypeTitle_name=Name -EditSettingTypeLabel_description=Description: -EditSettingTypeTitle_description=Description -EditSettingTypeLabel_defaultValue=DefaultValue: -EditSettingTypeTitle_defaultValue=DefaultValue -EditSettingTypeLabel_isUserModifiable=IsUserModifiable: -EditSettingTypeTitle_isUserModifiable=IsUserModifiable -ViewSettingTypeTitle=View -ViewSettingTypeDestroyLink=Destroy -ViewSettingTypeEditLink=Edit -ViewSettingTypeCreateLink=Create New SettingType -ViewSettingTypeShowAllLink=Show All SettingType Items -ViewSettingTypeIndexLink=Index -ViewSettingTypeLabel_id=Id: -ViewSettingTypeTitle_id=Id -ViewSettingTypeLabel_name=Name: -ViewSettingTypeTitle_name=Name -ViewSettingTypeLabel_description=Description: -ViewSettingTypeTitle_description=Description -ViewSettingTypeLabel_defaultValue=DefaultValue: -ViewSettingTypeTitle_defaultValue=DefaultValue -ViewSettingTypeLabel_isUserModifiable=IsUserModifiable: -ViewSettingTypeTitle_isUserModifiable=IsUserModifiable -ListSettingTypeTitle=List -ListSettingTypeEmpty=(No SettingType Items Found) -ListSettingTypeDestroyLink=Destroy -ListSettingTypeEditLink=Edit -ListSettingTypeViewLink=View -ListSettingTypeCreateLink=Create New SettingType -ListSettingTypeIndexLink=Index -ListSettingTypeTitle_id=Id -ListSettingTypeTitle_name=Name -ListSettingTypeTitle_description=Description -ListSettingTypeTitle_defaultValue=DefaultValue -ListSettingTypeTitle_isUserModifiable=IsUserModifiable -TemplatePolicyCreated=TemplatePolicy was successfully created. -TemplatePolicyUpdated=TemplatePolicy was successfully updated. -TemplatePolicyDeleted=TemplatePolicy was successfully deleted. -CreateTemplatePolicyTitle=Create New TemplatePolicy -CreateTemplatePolicySaveLink=Save -CreateTemplatePolicyShowAllLink=Show All TemplatePolicy Items -CreateTemplatePolicyIndexLink=Index -CreateTemplatePolicyLabel_id=Id: -CreateTemplatePolicyRequiredMessage_id=The Id field is required. -CreateTemplatePolicyTitle_id=Id -CreateTemplatePolicyLabel_value=Value: -CreateTemplatePolicyRequiredMessage_value=The Value field is required. -CreateTemplatePolicyTitle_value=Value -CreateTemplatePolicyLabel_description=Description: -CreateTemplatePolicyTitle_description=Description -CreateTemplatePolicyLabel_templatePolicySetId=TemplatePolicySetId: -CreateTemplatePolicyRequiredMessage_templatePolicySetId=The TemplatePolicySetId field is required. -CreateTemplatePolicyTitle_templatePolicySetId=TemplatePolicySetId -CreateTemplatePolicyLabel_policyTypeId=PolicyTypeId: -CreateTemplatePolicyRequiredMessage_policyTypeId=The PolicyTypeId field is required. -CreateTemplatePolicyTitle_policyTypeId=PolicyTypeId -EditTemplatePolicyTitle=Edit TemplatePolicy -EditTemplatePolicySaveLink=Save -EditTemplatePolicyViewLink=View -EditTemplatePolicyShowAllLink=Show All TemplatePolicy Items -EditTemplatePolicyIndexLink=Index -EditTemplatePolicyLabel_id=Id: -EditTemplatePolicyRequiredMessage_id=The Id field is required. -EditTemplatePolicyTitle_id=Id -EditTemplatePolicyLabel_value=Value: -EditTemplatePolicyRequiredMessage_value=The Value field is required. -EditTemplatePolicyTitle_value=Value -EditTemplatePolicyLabel_description=Description: -EditTemplatePolicyTitle_description=Description -EditTemplatePolicyLabel_templatePolicySetId=TemplatePolicySetId: -EditTemplatePolicyRequiredMessage_templatePolicySetId=The TemplatePolicySetId field is required. -EditTemplatePolicyTitle_templatePolicySetId=TemplatePolicySetId -EditTemplatePolicyLabel_policyTypeId=PolicyTypeId: -EditTemplatePolicyRequiredMessage_policyTypeId=The PolicyTypeId field is required. -EditTemplatePolicyTitle_policyTypeId=PolicyTypeId -ViewTemplatePolicyTitle=View -ViewTemplatePolicyDestroyLink=Destroy -ViewTemplatePolicyEditLink=Edit -ViewTemplatePolicyCreateLink=Create New TemplatePolicy -ViewTemplatePolicyShowAllLink=Show All TemplatePolicy Items -ViewTemplatePolicyIndexLink=Index -ViewTemplatePolicyLabel_id=Id: -ViewTemplatePolicyTitle_id=Id -ViewTemplatePolicyLabel_value=Value: -ViewTemplatePolicyTitle_value=Value -ViewTemplatePolicyLabel_description=Description: -ViewTemplatePolicyTitle_description=Description -ViewTemplatePolicyLabel_templatePolicySetId=TemplatePolicySetId: -ViewTemplatePolicyTitle_templatePolicySetId=TemplatePolicySetId -ViewTemplatePolicyLabel_policyTypeId=PolicyTypeId: -ViewTemplatePolicyTitle_policyTypeId=PolicyTypeId -ListTemplatePolicyTitle=List -ListTemplatePolicyEmpty=(No TemplatePolicy Items Found) -ListTemplatePolicyDestroyLink=Destroy -ListTemplatePolicyEditLink=Edit -ListTemplatePolicyViewLink=View -ListTemplatePolicyCreateLink=Create New TemplatePolicy -ListTemplatePolicyIndexLink=Index -ListTemplatePolicyTitle_id=Id -ListTemplatePolicyTitle_value=Value -ListTemplatePolicyTitle_description=Description -ListTemplatePolicyTitle_templatePolicySetId=TemplatePolicySetId -ListTemplatePolicyTitle_policyTypeId=PolicyTypeId -TemplatePolicySetCreated=TemplatePolicySet was successfully created. -TemplatePolicySetUpdated=TemplatePolicySet was successfully updated. -TemplatePolicySetDeleted=TemplatePolicySet was successfully deleted. -CreateTemplatePolicySetTitle=Create New TemplatePolicySet -CreateTemplatePolicySetSaveLink=Save -CreateTemplatePolicySetShowAllLink=Show All TemplatePolicySet Items -CreateTemplatePolicySetIndexLink=Index -CreateTemplatePolicySetLabel_id=Id: -CreateTemplatePolicySetRequiredMessage_id=The Id field is required. -CreateTemplatePolicySetTitle_id=Id -CreateTemplatePolicySetLabel_name=Name: -CreateTemplatePolicySetRequiredMessage_name=The Name field is required. -CreateTemplatePolicySetTitle_name=Name -CreateTemplatePolicySetLabel_description=Description: -CreateTemplatePolicySetTitle_description=Description -EditTemplatePolicySetTitle=Edit TemplatePolicySet -EditTemplatePolicySetSaveLink=Save -EditTemplatePolicySetViewLink=View -EditTemplatePolicySetShowAllLink=Show All TemplatePolicySet Items -EditTemplatePolicySetIndexLink=Index -EditTemplatePolicySetLabel_id=Id: -EditTemplatePolicySetRequiredMessage_id=The Id field is required. -EditTemplatePolicySetTitle_id=Id -EditTemplatePolicySetLabel_name=Name: -EditTemplatePolicySetRequiredMessage_name=The Name field is required. -EditTemplatePolicySetTitle_name=Name -EditTemplatePolicySetLabel_description=Description: -EditTemplatePolicySetTitle_description=Description -ViewTemplatePolicySetTitle=View -ViewTemplatePolicySetDestroyLink=Destroy -ViewTemplatePolicySetEditLink=Edit -ViewTemplatePolicySetCreateLink=Create New TemplatePolicySet -ViewTemplatePolicySetShowAllLink=Show All TemplatePolicySet Items -ViewTemplatePolicySetIndexLink=Index -ViewTemplatePolicySetLabel_id=Id: -ViewTemplatePolicySetTitle_id=Id -ViewTemplatePolicySetLabel_name=Name: -ViewTemplatePolicySetTitle_name=Name -ViewTemplatePolicySetLabel_description=Description: -ViewTemplatePolicySetTitle_description=Description -ListTemplatePolicySetTitle=List -ListTemplatePolicySetEmpty=(No TemplatePolicySet Items Found) -ListTemplatePolicySetDestroyLink=Destroy -ListTemplatePolicySetEditLink=Edit -ListTemplatePolicySetViewLink=View -ListTemplatePolicySetCreateLink=Create New TemplatePolicySet -ListTemplatePolicySetIndexLink=Index -ListTemplatePolicySetTitle_id=Id -ListTemplatePolicySetTitle_name=Name -ListTemplatePolicySetTitle_description=Description -UserExperimentRoleCreated=UserExperimentRole was successfully created. -UserExperimentRoleUpdated=UserExperimentRole was successfully updated. -UserExperimentRoleDeleted=UserExperimentRole was successfully deleted. -CreateUserExperimentRoleTitle=Create New UserExperimentRole -CreateUserExperimentRoleSaveLink=Save -CreateUserExperimentRoleShowAllLink=Show All UserExperimentRole Items -CreateUserExperimentRoleIndexLink=Index -CreateUserExperimentRoleLabel_userInfo=UserInfo: -CreateUserExperimentRoleRequiredMessage_userInfo=The UserInfo field is required. -CreateUserExperimentRoleTitle_userInfo=UserInfo -CreateUserExperimentRoleLabel_roleType=RoleType: -CreateUserExperimentRoleRequiredMessage_roleType=The RoleType field is required. -CreateUserExperimentRoleTitle_roleType=RoleType -CreateUserExperimentRoleLabel_experiment=Experiment: -CreateUserExperimentRoleRequiredMessage_experiment=The Experiment field is required. -CreateUserExperimentRoleTitle_experiment=Experiment -EditUserExperimentRoleTitle=Edit UserExperimentRole -EditUserExperimentRoleSaveLink=Save -EditUserExperimentRoleViewLink=View -EditUserExperimentRoleShowAllLink=Show All UserExperimentRole Items -EditUserExperimentRoleIndexLink=Index -EditUserExperimentRoleLabel_userInfo=UserInfo: -EditUserExperimentRoleRequiredMessage_userInfo=The UserInfo field is required. -EditUserExperimentRoleTitle_userInfo=UserInfo -EditUserExperimentRoleLabel_roleType=RoleType: -EditUserExperimentRoleRequiredMessage_roleType=The RoleType field is required. -EditUserExperimentRoleTitle_roleType=RoleType -EditUserExperimentRoleLabel_experiment=Experiment: -EditUserExperimentRoleRequiredMessage_experiment=The Experiment field is required. -EditUserExperimentRoleTitle_experiment=Experiment -ViewUserExperimentRoleTitle=View -ViewUserExperimentRoleDestroyLink=Destroy -ViewUserExperimentRoleEditLink=Edit -ViewUserExperimentRoleCreateLink=Create New UserExperimentRole -ViewUserExperimentRoleShowAllLink=Show All UserExperimentRole Items -ViewUserExperimentRoleIndexLink=Index -ViewUserExperimentRoleLabel_userInfo=UserInfo: -ViewUserExperimentRoleTitle_userInfo=UserInfo -ViewUserExperimentRoleLabel_roleType=RoleType: -ViewUserExperimentRoleTitle_roleType=RoleType -ViewUserExperimentRoleLabel_experiment=Experiment: -ViewUserExperimentRoleTitle_experiment=Experiment -ListUserExperimentRoleTitle=List -ListUserExperimentRoleEmpty=(No UserExperimentRole Items Found) -ListUserExperimentRoleDestroyLink=Destroy -ListUserExperimentRoleEditLink=Edit -ListUserExperimentRoleViewLink=View -ListUserExperimentRoleCreateLink=Create New UserExperimentRole -ListUserExperimentRoleIndexLink=Index -ListUserExperimentRoleTitle_userInfo=UserInfo -ListUserExperimentRoleTitle_roleType=RoleType -ListUserExperimentRoleTitle_experiment=Experiment -UserInfoCreated=UserInfo was successfully created. -UserInfoUpdated=UserInfo was successfully updated. -UserInfoDeleted=UserInfo was successfully deleted. -CreateUserInfoTitle=Create New UserInfo -CreateUserInfoSaveLink=Save -CreateUserInfoShowAllLink=Show All UserInfo Items -CreateUserInfoIndexLink=Index -CreateUserInfoLabel_id=Id: -CreateUserInfoRequiredMessage_id=The Id field is required. -CreateUserInfoTitle_id=Id -CreateUserInfoLabel_username=Username: -CreateUserInfoRequiredMessage_username=The Username field is required. -CreateUserInfoTitle_username=Username -CreateUserInfoLabel_firstName=FirstName: -CreateUserInfoRequiredMessage_firstName=The FirstName field is required. -CreateUserInfoTitle_firstName=FirstName -CreateUserInfoLabel_lastName=LastName: -CreateUserInfoRequiredMessage_lastName=The LastName field is required. -CreateUserInfoTitle_lastName=LastName -CreateUserInfoLabel_middleName=MiddleName: -CreateUserInfoTitle_middleName=MiddleName -CreateUserInfoLabel_email=Email: -CreateUserInfoTitle_email=Email -CreateUserInfoLabel_description=Description: -CreateUserInfoTitle_description=Description -CreateUserInfoLabel_password=Password: -CreateUserInfoTitle_password=Password -EditUserInfoTitle=Edit UserInfo -EditUserInfoSaveLink=Save -EditUserInfoViewLink=View -EditUserInfoShowAllLink=Show All UserInfo Items -EditUserInfoIndexLink=Index -EditUserInfoLabel_id=Id: -EditUserInfoRequiredMessage_id=The Id field is required. -EditUserInfoTitle_id=Id -EditUserInfoLabel_username=Username: -EditUserInfoRequiredMessage_username=The Username field is required. -EditUserInfoTitle_username=Username -EditUserInfoLabel_firstName=FirstName: -EditUserInfoRequiredMessage_firstName=The FirstName field is required. -EditUserInfoTitle_firstName=FirstName -EditUserInfoLabel_lastName=LastName: -EditUserInfoRequiredMessage_lastName=The LastName field is required. -EditUserInfoTitle_lastName=LastName -EditUserInfoLabel_middleName=MiddleName: -EditUserInfoTitle_middleName=MiddleName -EditUserInfoLabel_email=Email: -EditUserInfoTitle_email=Email -EditUserInfoLabel_description=Description: -EditUserInfoTitle_description=Description -EditUserInfoLabel_password=Password: -EditUserInfoTitle_password=Password -ViewUserInfoTitle=View -ViewUserInfoDestroyLink=Destroy -ViewUserInfoEditLink=Edit -ViewUserInfoCreateLink=Create New UserInfo -ViewUserInfoShowAllLink=Show All UserInfo Items -ViewUserInfoIndexLink=Index -ViewUserInfoLabel_id=Id: -ViewUserInfoTitle_id=Id -ViewUserInfoLabel_username=Username: -ViewUserInfoTitle_username=Username -ViewUserInfoLabel_firstName=FirstName: -ViewUserInfoTitle_firstName=FirstName -ViewUserInfoLabel_lastName=LastName: -ViewUserInfoTitle_lastName=LastName -ViewUserInfoLabel_middleName=MiddleName: -ViewUserInfoTitle_middleName=MiddleName -ViewUserInfoLabel_email=Email: -ViewUserInfoTitle_email=Email -ViewUserInfoLabel_description=Description: -ViewUserInfoTitle_description=Description -ViewUserInfoLabel_password=Password: -ViewUserInfoTitle_password=Password -ListUserInfoTitle=List -ListUserInfoEmpty=(No UserInfo Items Found) -ListUserInfoDestroyLink=Destroy -ListUserInfoEditLink=Edit -ListUserInfoViewLink=View -ListUserInfoCreateLink=Create New UserInfo -ListUserInfoIndexLink=Index -ListUserInfoTitle_id=Id -ListUserInfoTitle_username=Username -ListUserInfoTitle_firstName=FirstName -ListUserInfoTitle_lastName=LastName -ListUserInfoTitle_middleName=MiddleName -ListUserInfoTitle_email=Email -ListUserInfoTitle_description=Description -ListUserInfoTitle_password=Password -UserSettingCreated=UserSetting was successfully created. -UserSettingUpdated=UserSetting was successfully updated. -UserSettingDeleted=UserSetting was successfully deleted. -CreateUserSettingTitle=Create New UserSetting -CreateUserSettingSaveLink=Save -CreateUserSettingShowAllLink=Show All UserSetting Items -CreateUserSettingIndexLink=Index -CreateUserSettingLabel_id=Id: -CreateUserSettingRequiredMessage_id=The Id field is required. -CreateUserSettingTitle_id=Id -CreateUserSettingLabel_value=Value: -CreateUserSettingTitle_value=Value -CreateUserSettingLabel_userId=UserId: -CreateUserSettingRequiredMessage_userId=The UserId field is required. -CreateUserSettingTitle_userId=UserId -CreateUserSettingLabel_settingTypeId=SettingTypeId: -CreateUserSettingRequiredMessage_settingTypeId=The SettingTypeId field is required. -CreateUserSettingTitle_settingTypeId=SettingTypeId -EditUserSettingTitle=Edit UserSetting -EditUserSettingSaveLink=Save -EditUserSettingViewLink=View -EditUserSettingShowAllLink=Show All UserSetting Items -EditUserSettingIndexLink=Index -EditUserSettingLabel_id=Id: -EditUserSettingRequiredMessage_id=The Id field is required. -EditUserSettingTitle_id=Id -EditUserSettingLabel_value=Value: -EditUserSettingTitle_value=Value -EditUserSettingLabel_userId=UserId: -EditUserSettingRequiredMessage_userId=The UserId field is required. -EditUserSettingTitle_userId=UserId -EditUserSettingLabel_settingTypeId=SettingTypeId: -EditUserSettingRequiredMessage_settingTypeId=The SettingTypeId field is required. -EditUserSettingTitle_settingTypeId=SettingTypeId -ViewUserSettingTitle=View -ViewUserSettingDestroyLink=Destroy -ViewUserSettingEditLink=Edit -ViewUserSettingCreateLink=Create New UserSetting -ViewUserSettingShowAllLink=Show All UserSetting Items -ViewUserSettingIndexLink=Index -ViewUserSettingLabel_id=Id: -ViewUserSettingTitle_id=Id -ViewUserSettingLabel_value=Value: -ViewUserSettingTitle_value=Value -ViewUserSettingLabel_userId=UserId: -ViewUserSettingTitle_userId=UserId -ViewUserSettingLabel_settingTypeId=SettingTypeId: -ViewUserSettingTitle_settingTypeId=SettingTypeId -ListUserSettingTitle=List -ListUserSettingEmpty=(No UserSetting Items Found) -ListUserSettingDestroyLink=Destroy -ListUserSettingEditLink=Edit -ListUserSettingViewLink=View -ListUserSettingCreateLink=Create New UserSetting -ListUserSettingIndexLink=Index -ListUserSettingTitle_id=Id -ListUserSettingTitle_value=Value -ListUserSettingTitle_userId=UserId -ListUserSettingTitle_settingTypeId=SettingTypeId diff --git a/src/java/DmWebPortal/web/WEB-INF/faces-config.xml b/src/java/DmWebPortal/web/WEB-INF/faces-config.xml deleted file mode 100644 index a259547c93cd4c8cceaf462b21e54e2467f41f15..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/WEB-INF/faces-config.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<faces-config version="2.2" - xmlns="http://xmlns.jcp.org/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> - <application> - <resource-bundle> - <base-name>/resources</base-name> - <var>resources</var> - </resource-bundle> - </application> -<!--<validator> - <validator-id>checkboxValidator</validator-id> - <validator-class>gov.anl.aps.dm.portal.controllers.CheckboxValidator</validator-class> -</validator>--> -</faces-config> diff --git a/src/java/DmWebPortal/web/WEB-INF/glassfish-web.xml b/src/java/DmWebPortal/web/WEB-INF/glassfish-web.xml deleted file mode 100644 index 9b1c973fd9542dbfdf60cd64a1af5126cbee1945..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/WEB-INF/glassfish-web.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd"> -<glassfish-web-app error-url=""> - <context-root>/dm</context-root> - <class-loader delegate="true"/> - <jsp-config> - <property name="keepgenerated" value="true"> - <description>Keep a copy of the generated servlet class' java code.</description> - </property> - </jsp-config> -</glassfish-web-app> diff --git a/src/java/DmWebPortal/web/WEB-INF/web.xml b/src/java/DmWebPortal/web/WEB-INF/web.xml deleted file mode 100644 index 4045e75aaca4579d3476f7194f92a6bf1ba12000..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"> - <context-param> - <param-name>javax.faces.PROJECT_STAGE</param-name> - <param-value>Development</param-value> - </context-param> - <servlet> - <servlet-name>Faces Servlet</servlet-name> - <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> - <load-on-startup>1</load-on-startup> - </servlet> - <servlet-mapping> - <servlet-name>Faces Servlet</servlet-name> - <url-pattern>*.xhtml</url-pattern> - </servlet-mapping> - <session-config> - <session-timeout> - 30 - </session-timeout> - </session-config> - <welcome-file-list> - <welcome-file>index.xhtml</welcome-file> - </welcome-file-list> - <error-page> - <exception-type>javax.faces.application.ViewExpiredException</exception-type> - <location>/views/login.xhtml</location> - </error-page> - <error-page> - <exception-type>com.sun.faces.context.FacesFileNotFoundException</exception-type> - <location>/views/pagenotfound.xhtml</location> - </error-page> - <security-constraint> - <display-name>Restrict Private Files</display-name> - <web-resource-collection> - <web-resource-name>Restricted Files</web-resource-name> - <url-pattern>/templates/*</url-pattern> - <url-pattern>/views/allowedPolicyValue/private/*</url-pattern> - <url-pattern>/views/common/*</url-pattern> - <url-pattern>/views/experiment/private/*</url-pattern> - <url-pattern>/views/experimentType/private/*</url-pattern> - <url-pattern>/views/policyProperty/private/*</url-pattern> - <url-pattern>/views/policyType/private/*</url-pattern> - <url-pattern>/views/roleType/private/*</url-pattern> - <url-pattern>/views/userInfo/private/*</url-pattern> - <url-pattern>/views/userSystemRole/private/*</url-pattern> - </web-resource-collection> - <auth-constraint/> - </security-constraint> -</web-app> diff --git a/src/java/DmWebPortal/web/index.xhtml b/src/java/DmWebPortal/web/index.xhtml deleted file mode 100644 index cbd321b6720a0b047974bfeac9ea45d809d6185d..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/index.xhtml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://xmlns.jcp.org/jsf/html"> - <h:body> - <meta http-equiv="Refresh" content="0; URL=views/login.xhtml"/> - </h:body> -</html> - diff --git a/src/java/DmWebPortal/web/resources/css/jsfcrud.css b/src/java/DmWebPortal/web/resources/css/jsfcrud.css deleted file mode 100644 index 811a960478318559204a1fd5cbe1df2cd16e743c..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/resources/css/jsfcrud.css +++ /dev/null @@ -1,82 +0,0 @@ -root { - display: block; -} - -body { - font-family: Arial, Helvetica, sans-serif; - color: #3a4f54; - background-color: #f2f4f7; - font-size: small; -} - -a { - color: #e33b06; -} - -table { - empty-cells: show; -} - -form.jsfcrud_list_form th, td th { - font-size: x-small; - color: #4e6a71; - border-top-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-right-style: solid; - border-top-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-right-width: 1px; - border-top-color: #b2d5d6; - border-bottom-color: #b2d5d6; - border-left-color: #90b4bd; - border-right-color: #90b4bd; - letter-spacing: 3px; - text-align: left; - padding-top: 6px; - padding-bottom: 6px; - padding-left: 6px; - padding-right: 6px; - background-color: #b2d5d6; -} - -td { - vertical-align: top; - padding-bottom: 8px; - font-size: small; -} - -form.jsfcrud_list_form td, td td { - border-top-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-right-style: solid; - border-top-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-right-width: 1px; - border-top-color: #b2d5d6; - border-bottom-color: #b2d5d6; - border-left-color: #b2d5d6; - border-right-color: #b2d5d6; - vertical-align: baseline; - padding-bottom: 0px; -} - -tr.jsfcrud_odd_row { - background-color: #fefeff; - color: #4e6a71; -} - - -tr.jsfcrud_even_row { - background-color: #eff5fa; - color: #4e6a71; -} - -#busyImage { - position: absolute; - left: 50%; - top: 50%; -} diff --git a/src/java/DmWebPortal/web/resources/css/login.css b/src/java/DmWebPortal/web/resources/css/login.css deleted file mode 100644 index 1b5bebfd53903c550c6516cd198fc9b057050ae7..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/resources/css/login.css +++ /dev/null @@ -1,161 +0,0 @@ -body { - background-color: #f2f4f7; - font-size: 12px; - font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - color: #000000; - margin: 0px; -} - -a:link, a:visited { - color: #4e80b6; - font-weight: bold; -} - -a:link:hover, a:visited:hover { - color: #6da5d8; - font-weight: bold; -} - - #top { - position: relative; - color: white; - - /* IE10 */ - background-image: -ms-linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* Mozilla Firefox */ - background-image: -moz-linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* Opera */ - background-image: -o-linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* Webkit (Safari/Chrome 10) */ - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #4e80b6), color-stop(1, #6da5d8)); - /* Webkit (Chrome 11+) */ - background-image: -webkit-linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* Proposed W3C Markup */ - background-image: linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* IE6-9 */ - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4e80b6', endColorstr='#6da5d8'); - padding: 15px; - margin: 0px 0px 0px 0px; - height: 75px; - } - -#middle { - position: relative; - background-color: #f2f4f7; - padding: 5px; - margin: 0px 0px 0px 0px; - height: 100%; -} - -#bottom { - position: relative; - background-color: #f2f4f7; - padding: 5px; - margin: 10px 0px 0px 10px; - height: 100%; - float: left; -} - -.middleLeftContent { - float: left; - margin-left: 35px; - vertical-align: central; - text-align: center; -} - -.middleRightContent { - font-size: 14px; - font-weight: normal; - vertical-align: central; - margin-top: 100px; - background-color: #f2f4f7; - color: saddlebrown; - size: auto; -} - -.topLeftContent { - float: left; - width: 150px; - margin-left: 35px; - vertical-align: central; - text-align: center; -} - -.topCenterContent { - position: relative; - vertical-align: central; - text-align: center; - margin: 0px 170px 0px 170px; -} - -.topRightContent { - float: right; - width: 170px; - vertical-align: central; - text-align: center; - font-size: 10px; -} - -.login { - vertical-align: central; - text-align: center; - margin-left: auto; - margin-right: auto; - background: #f2f4f7; - padding: 100px; -} - -input { - background: #f2f4f7; - box-shadow: 0px 3px 5px #d5d5d5; -} - - -h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - font-size: 24px; - font-weight: bold; - margin: 20px; - padding-bottom: 0px; - color: #f2f4f7; - vertical-align: middle; -} - -.pageTitle h2 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - font-size: 20px; - font-weight: bold; - margin: 0px; - padding-bottom: 40px; - color: #4e80b6; - vertical-align: middle; - text-align: left; -} - -.sectionText { - font-size: 14px; - font-weight: normal; - color: #4e80b6; -} - -.ui-messages-info, .ui-message-info { - background-color: #f2f4f7; - color: saddlebrown; - border: #f2f4f7; - size: auto; -} - -.ui-messages-warn, .ui-message-warn { - background-color: #f2f4f7; - color: saddlebrown; - border: #f2f4f7; - size: auto; - drop-initial-size: auto; -} - -.ui-messages-error, .ui-message-error { - background-color: #f2f4f7; - color: saddlebrown; - border: #f2f4f7; - size: auto; -} diff --git a/src/java/DmWebPortal/web/resources/css/portal.css b/src/java/DmWebPortal/web/resources/css/portal.css deleted file mode 100644 index efcf58f00182fee1dd34f1e324b11116549dca1c..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/resources/css/portal.css +++ /dev/null @@ -1,476 +0,0 @@ -body { - background-color: #f2f4f7; - font-size: 12px; - font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - color: #000000; - margin: 0px; -} - -a:link, a:visited { - color: #4e80b6; - font-weight: bold; -} - -a:link:hover, a:visited:hover { - color: #6da5d8; - font-weight: bold; -} - -#top { - position: relative; - color: white; - - /* IE10 */ - background-image: -ms-linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* Mozilla Firefox */ - background-image: -moz-linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* Opera */ - background-image: -o-linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* Webkit (Safari/Chrome 10) */ - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #4e80b6), color-stop(1, #6da5d8)); - /* Webkit (Chrome 11+) */ - background-image: -webkit-linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* Proposed W3C Markup */ - background-image: linear-gradient(top, #4e80b6 0%, #6da5d8 100%); - /* IE6-9 */ - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4e80b6', endColorstr='#6da5d8'); - - padding: 15px; - margin: 0px 0px 0px 0px; - height: 75px; -} - -#menu { - background-color: #6da5d8; -} - -#middle { -} - -#bottom { - position: relative; - background-color: #6da5d8; - padding: 0px; - margin: 0px 0px 0px 0px; - height: 100% -} - -.topLeftContent { - float: left; - width: 170px; - vertical-align: central; - text-align: center; - margin-left: 35px; -} - -.topCenterContent { - position: relative; - vertical-align: central; - text-align: center; - margin: 0px 170px 0px 170px; -} - -.topRightContent { - float: right; - width: 170px; - vertical-align: central; - text-align: left; - font-size: 10px; -} - -.menubar { - background: #6da5d8; -} - -.menuContent { - position: relative; - vertical-align: central; - text-align: left; - margin: 0px 0px 0px 0px; - color: white; - background-color: #6da5d8; -} - -.menuLeftContent { - float: left; - width: 50px; - height: fit-content; - text-align: center; - background-color: #6da5d8; -} - -.menuCenterContent { - position: relative; - vertical-align: central; - text-align: left; - margin: 0px 0px 0px 0px; - color: white; - background-color: #6da5d8; -} - -.menuRightContent { - float: right; - width: 50px; - vertical-align: central; - text-align: center; - background-color: #6da5d8; -} - -.middleLeftContent { - float: left; - width: 50px; - height: fit-content; - text-align: center; - background-color: #6da5d8; -} - -.middleCenterContent { - position: relative; - vertical-align: central; - text-align: left; - margin: 50px; - color: white; -} - -.middleCenterLeftContent { - float: left; - margin-right: 2%; - margin-bottom: 2%; -} - -.middleCenterRightContent { - float: left; - margin-bottom: 2%; -} - -.middleRightContent { - float: right; - width: 50px; - vertical-align: central; - text-align: center; - background-color: #6da5d8; -} - -.actionButton { - margin-top: 5px; - margin-bottom: 5px; - margin-right: 5px; - border: 0px; -} - -.actionButtonRight { - float: right; - margin-right: 0px; - margin-left: 5px; -} - -.actionLink { - display: none; -} - -.entityDataLabel { - font-weight: bold; -} - -.entityDataEmphasizedLabel { - font-weight: bold; - font-size: 105%; -} - -.entityDataInputText { - font-weight: normal; - float: left; - background: white; -} - -.entityDataInputTextShort { - font-weight: normal; - float: left; - width: 150px; - background: white; -} - -.entityDataEmphasizedInputText { - font-weight: bold; - font-size: 105%; - background: white; -} - -.entityDataText { - font-weight: normal; - float: left; -} - -.entityDataTextShort { - font-weight: normal; - float: left; - width: 150px; -} - -.entityDataEmphasizedText { - font-weight: bold; - font-size: 105%; -} - -.entityDataSelectOne { - font-weight: normal; -} - -.entityDataSelectMany { - font-weight: normal; - height: 75px; -} - -.entityDataError { - font-weight: bold; -} - -.createEntityDetails td:nth-child(1) { - vertical-align: top; -} - -.createEntityDetails td:nth-child(2) { - width: 300px; -} - -.viewEntityDetails td:nth-child(1) { - vertical-align: top; - width: 125px; -} - -.viewEntityDetails td:nth-child(2) { - vertical-align: top; - width: 300px; -} - -.editEntityDetails td:nth-child(1) { - vertical-align: top; -} - -.editEntityDetails td:nth-child(2) { - width: 300px; -} - -.entityLogList td:last-child { - width: 195px; -} - -.commandLink { - -} - -tr:hover .actionLink { - display: inline-block; -} - -.objectPanel { - display: inline-block; -} - -.statusPanel { - display: inline-block; - white-space: pre; -} - -.queryPanel { - width: 100%; -} - -.queryInput { - width: 200px; -} - -.queryColumn { - text-align: center; -} - -.dialog { - background: #6da5d8; - box-shadow: 0px 3px 5px #d5d5d5; - vertical-align: central; - text-align: center; - margin: 0; - margin-left: auto; - margin-right: auto; -} - -.dialogDataLabel { - float: left -} - -.htmlPreserve { - white-space: pre; -} - -input, textarea { - background: #f2f4f7; - box-shadow: 0px 3px 5px #d5d5d5; - width: 300px; -} - -.loginInput input { - width: 200px; -} - -.cellSelect { - width: 150px; -} - -.longCellSelect { - width: 300px; -} - -.veryLongCellSelect { - width: 450px; -} - -.cellInput { - width: 125px; -} - -.shortCellInput { - width: 75px; -} - -.longCellInput { - width: 250px; -} - -.threeDigitCellInput { - width: 20px; -} - -.fourDigitCellInput { - width: 30px; -} - -select { - width: 150px; -} - -h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - font-size: 24px; - font-weight: bold; - margin: 20px; - padding-bottom: 0px; - color: #f2f4f7; - vertical-align: middle; -} - -.pageTitle h1 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - font-size: 20px; - font-weight: bold; - margin: 0px; - padding-bottom: 40px; - color: #4e80b6; - vertical-align: middle; - text-align: left; -} - -.sectionTitle h2 { - font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; - font-size: 16px; - font-weight: bold; - margin: 0px; - padding-top: 20px; - padding-bottom: 20px; - color: #4e80b6; - vertical-align: middle; - text-align: left; -} - -.sectionText { - font-size: 14px; - font-weight: normal; - color: #4e80b6; -} - -h2 { - font-size: 20px; - font-weight: bold; - color: #4e80b6; -} - -.shortFilterColumn { - width: 40px; -} - -.ui-accordion .ui-accordion-content { - background: #f2f4f7; -} - -.ui-panelgrid tr, .ui-panelgrid td { - background: #f2f4f7; - border: none; - font-weight: bold; -} - -.ui-menu, .ui-menuitem, .ui-menu .ui-menu-child { - background: #6da5d8; - color: white; - margin-top: 0px; -} - -.ui-menuitem-text { - color: white; - font-weight: bold; -} - -.ui-growl-item-container { - vertical-align: middle; -} - -.ui-tooltip { - text-wrap: normal; -} - -.ui-icon { - display: inline-block; -} - -.ui-dialog-footer, .ui-dialog-buttonpane, .ui-dialog .ui-dialog-buttonpane { - background: #6da5d8; - text-align: center; -} - -.ui-confirm-dialog-message { - color: white; -} - -.ui-column-dnd-bottom { - display: none; -} - -.ui-icon-excel { - background-image: url(../../resources/images/excel.ico) !important; - background-repeat: no-repeat; - background-position: left -} - -.ui-icon-pdf { - background-image: url(../../resources/images/pdf.ico) !important; - background-repeat: no-repeat; - background-position: left -} - -.ui-datatable-resizable { - table-layout: auto !important; -} - -.ui-datatable { - table-layout: auto !important; -} - -.ui-datatable-scrollable { - table-layout: fixed !important; -} - -.ui-datatable table, .ui-datatable-resizable table { - table-layout: auto !important; -} - -.ui-datatable-scrollable table { - table-layout: fixed !important; -} \ No newline at end of file diff --git a/src/java/DmWebPortal/web/resources/images/AnlLogo167x75.png b/src/java/DmWebPortal/web/resources/images/AnlLogo167x75.png deleted file mode 100644 index 369682cf138a5ead2fb29f92d0fb53ada7e6287a..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/web/resources/images/AnlLogo167x75.png and /dev/null differ diff --git a/src/java/DmWebPortal/web/resources/images/ApsStorageRing.png b/src/java/DmWebPortal/web/resources/images/ApsStorageRing.png deleted file mode 100644 index 97b5f6f23990d5869ba986ed24f58c63b6ff66dd..0000000000000000000000000000000000000000 Binary files a/src/java/DmWebPortal/web/resources/images/ApsStorageRing.png and /dev/null differ diff --git a/src/java/DmWebPortal/web/resources/js/common/forwardFromHome.js b/src/java/DmWebPortal/web/resources/js/common/forwardFromHome.js deleted file mode 100644 index 3e5512f70a1e9562b7820651ffe45ff5a73a9679..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/resources/js/common/forwardFromHome.js +++ /dev/null @@ -1 +0,0 @@ - window.location = "login.xhtml"; diff --git a/src/java/DmWebPortal/web/resources/js/common/forwardNotAuthorized.js b/src/java/DmWebPortal/web/resources/js/common/forwardNotAuthorized.js deleted file mode 100644 index ce4287301aa043cd4c9c9ca172c75295d42f2e00..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/resources/js/common/forwardNotAuthorized.js +++ /dev/null @@ -1,2 +0,0 @@ - window.location = "list.xhtml"; - diff --git a/src/java/DmWebPortal/web/resources/js/common/forwardNotLoggedin.js b/src/java/DmWebPortal/web/resources/js/common/forwardNotLoggedin.js deleted file mode 100644 index 97b82833d02820a8b20c3f3fb99e864ada44d8d7..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/resources/js/common/forwardNotLoggedin.js +++ /dev/null @@ -1 +0,0 @@ - window.location = "/dm/views/login.xhtml"; \ No newline at end of file diff --git a/src/java/DmWebPortal/web/resources/js/common/noBack.js b/src/java/DmWebPortal/web/resources/js/common/noBack.js deleted file mode 100644 index 18b4332fa5f553dfb1c8df6dda6f6be079bc6eb7..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/resources/js/common/noBack.js +++ /dev/null @@ -1,2 +0,0 @@ - window.history.forward(); - diff --git a/src/java/DmWebPortal/web/templates/dmViewTemplate.xhtml b/src/java/DmWebPortal/web/templates/dmViewTemplate.xhtml deleted file mode 100644 index 9553d6d9a6c33cb77f1824dc18c7eb0d7895ba71..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/templates/dmViewTemplate.xhtml +++ /dev/null @@ -1,119 +0,0 @@ -<!--<?xml version='1.0' encoding='UTF-8' ?>--> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:p="http://primefaces.org/ui" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core"> - - - - <h:head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link href="/dm/resources/css/portal.css" rel="stylesheet" type="text/css" /> - - </h:head> - - <h:body> - - <div id="top" class="topContent"> - <div id="topLeft" class="topLeftContent"> - <ui:insert name="topLeft"> - <h:graphicImage alt="ANL Logo" url="/resources/images/AnlLogo167x75.png"/> - </ui:insert> - </div> - <div> - <div id="topRight" class="topRightContent"> - <ui:insert name="topRight"> - - <h:outputText value="Administrator" rendered="#{loginController.admin}"/> - - </ui:insert> - </div> - <div id="topCenter" class="topCenterContent"> - <ui:insert name="topCenter"> - <h1>Data Management System Portal</h1> - </ui:insert> - </div> - </div> - </div> - - <ui:fragment> - <div id="menu" class="menuContent"> - <div id="menuLeft" class="menuLeftContent"> - <ui:insert name="menuLeft"> - <p:menubar/> - </ui:insert> - </div> - <div> - <div id="menuRight" class="menuRightContent"> - <ui:insert name="menuRight"> - </ui:insert> - </div> - <div id="menuCenter" class="menuCenterContent"> - <ui:insert name="menuCenter"> - <h:form prependId="false"> - <p:menubar> - <p:menuitem value="Home" url="/views/home.xhtml" icon="ui-icon-home"/> - <p:menuitem value="Experiments" url="/views/experiment/list.xhtml"/> - <p:menuitem value="Users" url="/views/userInfo/list.xhtml"/> - <p:menuitem value="Experiment Types" url="/views/experimentType/list.xhtml"/> - <p:menuitem value="Policies" url="/views/policyType/list.xhtml"/> - <p:menuitem value="Role Types" url="/views/roleType/list.xhtml"/> - <p:menuitem value="Logout" action="#{loginController.logout()}" icon="ui-icon-close"/> - </p:menubar> - </h:form> - </ui:insert> - </div> - </div> - </div> - - <div id="middle" class="middleContent"> - <div id="middleLeft" class="middleLeftContent"> - <ui:insert name="middleLeft"> - </ui:insert> - </div> - - <div id="middleRight" class="middleRightContent"> - <ui:insert name="middleRight"> - </ui:insert> - </div> - <div id="middleCenter" class="middleCenterContent"> - <ui:insert name="middleCenter"> - </ui:insert> - </div> - - </div> - </ui:fragment> - - <ui:fragment> - <div id="bottom" class="bottomContent"> - <ui:insert name="bottom"> - <h:form prependId="false"> - <p:growl id="messages" showDetail="true" autoUpdate="true"/> - </h:form> - </ui:insert> - </div> - </ui:fragment> - - <h:form id="loginForm"> - <p:dialog id="loginDialog" styleClass="dialog" header="Login" widgetVar="loginDialog"> - <h:panelGrid styleClass="loginInput"> - <div class="dialog"> - <div> - <p:inputText id="username" value="#{loginController.username}" title="Username"/> - <p:watermark for="username" value="Username"/> - <p:password id="password" value="#{loginController.password}" title="Password"/> - <p:watermark for="password" value="Password"/> - </div> - - <f:facet name="footer"> - <p:commandButton id="loginButton" value="Login" action="#{loginController.login}" oncomplete="loginDialog.hide()"/> - </f:facet> - </div> - </h:panelGrid> - </p:dialog> - </h:form> - </h:body> - -</html> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/allowedPolicyValue/create.xhtml b/src/java/DmWebPortal/web/views/allowedPolicyValue/create.xhtml deleted file mode 100644 index 29a11f1993328432358db185248ba4ea2fd84593..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/allowedPolicyValue/create.xhtml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Allowed Policy Value Create</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Policy Type: #{policyTypeController.current.name} <br/> - Policy Property: #{policyPropertyController.current.name} <br/> - Add Allowed Policy Value</h1> - </div> - - <h:form id="addAllowedPolicyValueForm"> - - <ui:include src="private/allowedPolicyValueCreatePanelGrid.xhtml"/> - - <p/> - <div class="actionButton"> - <p:commandButton action="#{policyPropertyController.updateAllowedValueList()}" actionListener="#{allowedPolicyValueController.create()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{allowedPolicyValueController.prepareList()}" immediate="true" value="Cancel" alt="Cancel" icon="ui-icon-cancel"/> - </div> - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueCreatePanelGrid.xhtml deleted file mode 100644 index 4592178dbff2bf524dc02bb2fcacc920bc86bb92..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueCreatePanelGrid.xhtml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="allowedPolicyValueObject" value="#{allowedPolicyValueController.selected}"/> - - <p:panelGrid columns="2" styleClass="createEntityDetails"> - - <h:outputLabel for="policyValue" value="Policy Value" styleClass="entityDataLabel"/> - <h:inputText id="policyValue" value="#{allowedPolicyValueObject.policyValue}" title="Policy Value" styleClass="entityDataInputText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{allowedPolicyValueObject.description}" title="Description" styleClass="entityDataInputText"/> - - </p:panelGrid> - -</ui:composition> - diff --git a/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueDestroyDialog.xhtml b/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueDestroyDialog.xhtml deleted file mode 100644 index 48612f7ecaad0a1e8a42884c5fb0b4e33da61897..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueDestroyDialog.xhtml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <p:confirmDialog id="allowedPolicyValueDestroyDialog" message="Delete policy property #{allowedPolicyValueController.getCurrentEntityInstanceName()}?" - header="Delete Allowed Policy Value" severity="alert" widgetVar="allowedPolicyValueDestroyDialogWidget" - styleClass="dialog"> - <ui:param name="deletedValue" value="#{allowedPolicyValueController.current}" /> - <p:commandButton value="Yes" oncomplete="allowedPolicyValueDestroyDialogWidget.hide()" action="#{policyPropertyController.updateAllowedValueList()}" actionListener="#{allowedPolicyValueController.destroy()}" update="@form"/> - <p:commandButton value="No" onclick="PF('allowedPolicyValueDestroyDialogWidget').hide()" type="button" /> - </p:confirmDialog> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueListDataTable.xhtml b/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueListDataTable.xhtml deleted file mode 100644 index 2c5bb0e839b5f8b3224b41c1da3d02cebe730677..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueListDataTable.xhtml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -To change this license header, choose License Headers in Project Properties. -To change this template file, choose Tools | Templates -and open the template in the editor. ---> -<!DOCTYPE html> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <div class="actionButton"> - <p:commandButton id="allowedPolicyValueViewResetFiltersButton" action="#{policyPropertyController.prepareView()}" actionListener="#{allowedPolicyValueController.allowedPolicyValueInfoTable.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight"> - <p:tooltip for="allowedPolicyValueViewResetFiltersButton" value="Reset list filters."/> - </p:commandButton> - <p:commandButton id="allowedPolicyValueNoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="allowedPolicyValueNoOp"/> - </div> - - <p:dataTable id="allowedPolicyValueListViewDataTable" - var="allowedPolicyValueViewObject" - value="#{allowedPolicyValueController.allowedPolicyValueInfoTable.listDataModel}" - filteredValue="#{allowedPolicyValueController.allowedPolicyValueInfoTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{allowedPolicyValueController.rows}" - binding="#{allowedPolicyValueController.allowedPolicyValueInfoTable.listDataTable}" - widgetVar="allowedPolicyValueViewListWidget" - emptyMessage="No allowed values found for this policy property." > - - <p:column sortBy="#{allowedPolicyValueViewObject.policyValue}" headerText="Policy Value" - filterBy="#{allowedPolicyValueViewObject.policyValue}" filterMatchMode="contains" > - <h:outputText value="#{allowedPolicyValueViewObject.policyValue}"/> - </p:column> - - <p:column sortBy="#{allowedPolicyValueViewObject.description}" headerText="Description" - filterBy="#{allowedPolicyValueViewObject.description}" filterMatchMode="contains"> - <h:outputText value="#{allowedPolicyValueViewObject.description}"/> - </p:column> - - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueListEditDataTable.xhtml b/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueListEditDataTable.xhtml deleted file mode 100644 index 553b5ddf865d46735db4c8f0bfda9f0d63dbbc01..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/allowedPolicyValue/private/allowedPolicyValueListEditDataTable.xhtml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -To change this license header, choose License Headers in Project Properties. -To change this template file, choose Tools | Templates -and open the template in the editor. ---> -<!DOCTYPE html> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <div class="actionButton"> - <p:commandButton id="allowedPolicyValueAddButton" action="#{allowedPolicyValueController.prepareCreate()}" rendered="#{loginController.admin}" value="Add" alt="Add new Policy Property" icon="ui-icon-plus"> - <p:tooltip for="allowedPolicyValueAddButton" value="Create new Policy Property."/> - </p:commandButton> - <p:commandButton id="allowedPolicyValueResetFiltersButton" action="#{policyPropertyController.prepareView()}" actionListener="#{allowedPolicyValueController.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight"> - <p:tooltip for="allowedPolicyValueResetFiltersButton" value="Reset list filters."/> - </p:commandButton> - <p:commandButton id="allowedPolicyValueNoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="allowedPolicyValueNoOp"/> - </div> - - <p:dataTable id="allowedPolicyValueListDataTable" - var="allowedPolicyValueObject" - value="#{allowedPolicyValueController.listDataModel}" - filteredValue="#{allowedPolicyValueController.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{allowedPolicyValueController.rows}" - binding="#{allowedPolicyValueController.listDataTable}" - widgetVar="allowedPolicyValueListWidget" - emptyMessage="No allowed values found for this policy property." > - - <p:column sortBy="#{allowedPolicyValueObject.policyValue}" headerText="Policy Value" - filterBy="#{allowedPolicyValueObject.policyValue}" filterMatchMode="contains" > - <h:inputText value="#{allowedPolicyValueObject.policyValue}" styleClass="entityDataInputTextShort"/> - </p:column> - - <p:column sortBy="#{allowedPolicyValueObject.description}" headerText="Description" - filterBy="#{allowedPolicyValueObject.description}" filterMatchMode="contains"> - <h:inputText value="#{allowedPolicyValueObject.description}" styleClass="entityDataInputTextShort"/> - </p:column> - - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink oncomplete="PF('allowedPolicyValueDestroyDialogWidget').show()" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-trash" title="Delete" update="@form"> - <f:setPropertyActionListener value="#{allowedPolicyValueObject}" target="#{allowedPolicyValueController.current}"/> - </p:commandLink> - </div> - </p:column> - </p:dataTable> - <ui:include src="allowedPolicyValueDestroyDialog.xhtml"/> -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/common/commonListActionButtons.xhtml b/src/java/DmWebPortal/web/views/common/commonListActionButtons.xhtml deleted file mode 100644 index 3c3cc596ce6f021dd386c9a34a7f50aa0fa0eb04..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/common/commonListActionButtons.xhtml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <ui:param name="entityTypeName" value="#{entityController.entityTypeName}"/> - - <div class="actionButton"> - <p:commandButton id="#{entityTypeName}AddButton" action="#{entityController.prepareCreate()}" rendered="#{loginController.admin}" value="Add" alt="Add new #{entityTypeName}" icon="ui-icon-plus"> - <p:tooltip for="#{entityTypeName}AddButton" value="Create new #{entityController.displayEntityTypeName}."/> - </p:commandButton> - - <p:commandButton id="#{entityTypeName}ResetFiltersButton" action="#{entityController.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight"> - <p:tooltip for="#{entityTypeName}ResetFiltersButton" value="Reset list filters."/> - </p:commandButton> - - <p:commandButton id="#{entityTypeName}NoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="#{entityTypeName}NoOp"/> - </div> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/create.xhtml b/src/java/DmWebPortal/web/views/experiment/create.xhtml deleted file mode 100644 index 88d2abfb4ad0dd794e5e9176e924f36696beda54..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/create.xhtml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Experiment Create</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Add Experiment</h1> - </div> - - <h:form id="addExperimentForm"> - - <ui:include src="private/experimentCreatePanelGrid.xhtml"/> - - <p/> - <div class="actionButton"> - <p:commandButton action="#{experimentController.create()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{experimentController.prepareList()}" immediate="true" value="Cancel" alt="Cancel" icon="ui-icon-cancel"/> - </div> - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experiment/edit.xhtml b/src/java/DmWebPortal/web/views/experiment/edit.xhtml deleted file mode 100644 index fa996446191060ae9c02c9d4f1ab8c8f06f7768a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/edit.xhtml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Experiment Edit</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}" /> - <h:outputScript library="js/common" name="noBack.js" rendered="#{experimentController.notSelected()}" /> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin and experimentController.isRestricted()}"/> - - <ui:composition template="../../templates/dmViewTemplate.xhtml" > - <ui:define name="middleCenter" > - <h:form id="editExperimentForm"> - - <div class="pageTitle"> - <h1>Edit Experiment #{experimentController.current.name}</h1> - </div> - - <p:accordionPanel multiple="true" dynamic="true" cache="false" activeIndex="0,1,2" > - <p:tab title="Experiment Properties" id="detailsTab" > - - <div class="middleCenterLeftContent"> - <ui:include src="private/experimentEditPanelGrid.xhtml"/> - </div> - </p:tab> - - <p:tab title="Experiment Policies"> - <ui:include src="private/experimentPoliciesEditSelection.xhtml"/> - </p:tab> - - <p:tab title="Experiment Users" id="usersTab"> - <ui:include src="private/experimentUsersEditDataTable.xhtml"/> - </p:tab> - </p:accordionPanel> - - <p/> - <div class="actionButton"> - <p:commandButton action="#{experimentController.update()}" actionListener="#{experimentController.updateRemovedExperimentRoles()}" value="Save" alt="Save" icon="ui-icon-check"/> - <p:commandButton action="#{experimentController.prepareList()}" immediate="true" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - - <ui:include src="private/experimentUserRemoveDialog.xhtml" /> - <ui:include src="private/experimentPolicyRemoveDialog.xhtml" /> - </h:form> - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experiment/list.xhtml b/src/java/DmWebPortal/web/views/experiment/list.xhtml deleted file mode 100644 index 4bc18cd6bce56ea9b0a126f86c8ec3bd671dae5d..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/list.xhtml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Experiments List</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Experiments</h1> - </div> - - <h:form id="viewExperimentListForm"> - <ui:param name="entityController" value="#{experimentController}"/> - <ui:include src="../common/commonListActionButtons.xhtml"/> - - <h:panelGroup> - <ui:include src="private/experimentListDataTable.xhtml"/> - </h:panelGroup> - - <ui:include src="private/experimentDestroyDialog.xhtml"/> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentCreatePanelGrid.xhtml deleted file mode 100644 index d22c5438b8e57cceb1680e30cb0774b46b607790..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentCreatePanelGrid.xhtml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="experimentObject" value="#{experimentController.selected}"/> - - <p:panelGrid columns="2" > - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:inputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedInputText"/> - - <h:outputLabel for="experimentType" value="Experiment Type" styleClass="entityDataLabel"/> - <p:selectOneMenu id="experimentType" value="#{experimentObject.experimentType}" styleClass="entityDataInputText"> - <f:selectItem itemLabel="Select Type" itemValue="" noSelectionOption="true" /> - <f:selectItems value="#{experimentTypeController.getAvailableItems()}" - var="experimentType" - itemValue="#{experimentType}" - itemLabel="#{experimentType.name}" - itemDescription="#{experimentType.description}" /> - </p:selectOneMenu> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataInputText"/> - - <h:outputLabel for="startDate" value="Start Date"/> - <p:calendar id="startDate" value="#{experimentObject.startDate}" mode="popup" showOn="button" pattern="#{resources.DateTimePattern}" /> - - <h:outputLabel for="endDate" value="End Date" /> - <p:calendar id="endDate" value="#{experimentObject.endDate}" mode="popup" showOn="button" pattern="#{resources.DateTimePattern}" /> - - </p:panelGrid> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentDestroyDialog.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentDestroyDialog.xhtml deleted file mode 100644 index 643b556a9b1d6676fd0aa733683bc2f8de2fbea7..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentDestroyDialog.xhtml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <p:confirmDialog id="experimentDestroyDialog" message="Delete experiment #{experimentController.getCurrentEntityInstanceName()}?" - header="Delete Experiment" severity="alert" widgetVar="experimentDestroyDialogWidget" - styleClass="dialog"> - <p:commandButton value="Yes" oncomplete="experimentDestroyDialogWidget.hide()" action="#{experimentController.destroy()}"/> - <p:commandButton value="No" onclick="PF('experimentDestroyDialogWidget').hide()" type="button" /> - </p:confirmDialog> -</ui:composition> - diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentEditPanelGrid.xhtml deleted file mode 100644 index a8c8ab409eeaa2657170370baf58b14592033181..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentEditPanelGrid.xhtml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:f="http://xmlns.jcp.org/jsf/core"> - - <ui:param name="experimentObject" value="#{experimentController.current}"/> - <ui:param name="isEditable" value="#{!experimentController.isEditable()}"/> - - <p:panelGrid columns="2" > - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="experimentType" value="Type" styleClass="entityDataLabel"/> - <h:outputText id="experimentType" value="#{experimentObject.experimentType.name}" title="Name" styleClass="entityDataText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" rendered="#{isEditable}" value="#{experimentObject.description}" title="Description" styleClass="entityDataInputText"/> - <h:outputText id="description1" rendered="#{!isEditable}" value="#{experimentObject.description}" title="Description" styleClass="entityDataText"/> - - <h:outputLabel for="startDate" value="Start Date" styleClass="entityDataLabel"/> - <p:calendar id="startDate" rendered="#{isEditable}" value="#{experimentObject.startDate}" mode="popup" showOn="button" pattern="#{resources.DateTimePattern}" /> - <h:outputText id="startDate1" rendered="#{!isEditable}" value="#{experimentObject.startDate}" styleClass="entityDataText"> - <f:convertDateTime pattern="#{resources.DateTimeZonePattern}" type="both" timeZone="#{resources.Timezone}" /> - </h:outputText> - - <h:outputLabel for="endDate" value="End Date" styleClass="entityDataLabel"/> - <p:calendar id="endDate" rendered="#{isEditable}" value="#{experimentObject.endDate}" mode="popup" showOn="button" pattern="#{resources.DateTimePattern}" /> - <h:outputText id="endDate1" rendered="#{!isEditable}" value="#{experimentObject.endDate}" styleClass="entityDataText"> - <f:convertDateTime pattern="#{resources.DateTimeZonePattern}" type="both" timeZone="#{resources.Timezone}" /> - </h:outputText> - - </p:panelGrid> - - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentListDataTable.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentListDataTable.xhtml deleted file mode 100644 index d2653e55d06689fde8459a75246f6a43fbbd5800..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentListDataTable.xhtml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <p:dataTable id="experimentListDataTable" - var="experimentObject" - value="#{experimentController.listDataModel}" - filteredValue="#{experimentController.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{experimentController.rows}" - binding="#{experimentController.listDataTable}" - widgetVar="experimentListWidget" - emptyMessage="No experiments found."> - - <p:column sortBy="#{experimentObject.id}" headerText="Id" > - <h:outputText value="#{experimentObject.id}"/> - </p:column> - - <p:column sortBy="#{experimentObject.name}" headerText="Name" - filterBy="#{experimentObject.name}" filterMatchMode="contains" > - <h:outputText value="#{experimentObject.name}"/> - </p:column> - - <p:column sortBy="#{experimentObject.experimentType.name}" headerText="Type" - filterBy="#{experimentObject.experimentType.name}" filterMatchMode="exact" > - <h:outputText value="#{experimentObject.experimentType.name}"/> - </p:column> - - <p:column sortBy="#{experimentObject.description}" headerText="Description" - filterBy="#{experimentObject.description}" filterMatchMode="contains"> - <h:outputText value="#{experimentObject.description}"/> - </p:column> - - <p:column sortBy="#{experimentObject.startDate}" headerText="Start Date" - filterBy="#{experimentObject.startDate}" filterMatchMode="contains" > - - <h:outputText value="#{experimentObject.startDate}"> - <f:convertDateTime pattern="#{resources.DateTimeZonePattern}" type="both" timeZone="#{resources.Timezone}"/> - </h:outputText> - </p:column> - - <p:column sortBy="#{experimentObject.endDate}" headerText="End Date" - filterBy="#{experimentObject.endDate}" filterMatchMode="contains" > - - <h:outputText value="#{experimentObject.endDate}"> - <f:convertDateTime pattern="#{resources.DateTimeZonePattern}" type="both" timeZone="#{resources.Timezone}"/> - </h:outputText> - </p:column> - - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink action="#{experimentController.prepareView(experimentObject)}" styleClass="ui-icon ui-icon-info" title="View"> - </p:commandLink> - - <p:commandLink action="#{experimentController.prepareEdit(experimentObject)}" rendered="#{loginController.admin or experimentController.canEditExperiment(experimentObject)}" styleClass="ui-icon ui-icon-pencil" title="Edit"> - <f:setPropertyActionListener value="#{experimentObject}" target="#{experimentController.current}"/> - </p:commandLink> - - <p:commandLink oncomplete="PF('experimentDestroyDialogWidget').show()" rendered="#{loginController.admin or experimentController.canDeleteExperiment(experimentObject)}" styleClass="ui-icon ui-icon-trash" title="Delete" update="@form"> - <f:setPropertyActionListener value="#{experimentObject}" target="#{experimentController.current}"/> - </p:commandLink> - </div> - </p:column> - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentPoliciesEditSelection.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentPoliciesEditSelection.xhtml deleted file mode 100644 index 5e237fc0731476378095dba341b1b70379596430..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentPoliciesEditSelection.xhtml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <ui:include src="experimentPolicyAddDialog.xhtml" /> - - <ui:param name="isAdmin" value="#{loginController.admin}" /> - - <p:commandButton id="experimentPolicyAddButton" value="Add" onclick="PF('experimentPolicyAddDialogWidget').show();" rendered="true" icon="ui-icon-plus" > - <p:tooltip for="experimentPolicyAddButton" value="Add new properties." /> - </p:commandButton> - <p:commandButton id="addPoliciesNoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="addPoliciesNoOp"/> - - <p:dataTable id="experimentPoliciesListDataTable" - var="experimentPolicyObject" - value="#{experimentController.experimentPolicyEditTable.listDataModel}" - filteredValue="#{experimentController.experimentPolicyEditTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{experimentController.rows}" - binding="#{experimentController.experimentPolicyEditTable.listDataTable}" - widgetVar="policyListWidget" - emptyMessage="No policies found."> - - <p:columnGroup type="header" > - <p:column headerText="Property" /> - <p:column headerText="Value" /> - <p:column headerText="Units" /> - <p:column headerText="Description" /> - <p:column headerText="Actions" /> - </p:columnGroup> - - <p:subTable var="propertyValue" value="#{experimentPolicyObject.getExperimentPolicyPropertyValueList()}" > - <f:facet name="header" > - <h:outputText value="#{experimentPolicyObject.policyType.name} Policy"/> - </f:facet> - - <p:column > - <h:outputText value="#{propertyValue.getPolicyProperty().name}"/> - </p:column> - <p:column> - <h:inputText id="propertyValue" value="#{propertyValue.policyPropertyValue}" rendered="#{!policyPropertyController.hasAllowedValues(propertyValue.getPolicyProperty())}" styleClass="entityDataTextShort"/> - - <p:selectOneMenu id="propertyValueSelect" value="#{propertyValue.policyPropertyValue}" styleClass="entityDataText" rendered="#{policyPropertyController.hasAllowedValues(propertyValue.getPolicyProperty())}"> - <f:selectItems value="#{propertyValue.getPolicyProperty().allowedPolicyValueList}" - var="allowedPolicyValue" - itemValue="#{allowedPolicyValue.policyValue}" - itemLabel="#{allowedPolicyValue.policyValue}" /> - </p:selectOneMenu> - <p:tooltip for="propertyValue" value="Modify property value" /> - </p:column> - <p:column> - <h:outputText value="#{propertyValue.getPolicyProperty().units}"/> - </p:column> - <p:column> - <h:outputText value="#{propertyValue.getPolicyProperty().description}"/> - </p:column> - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink oncomplete="PF('experimentPolicyRemoveDialogWidget').show()" rendered="#{loginController.admin or experimentController.canDeleteExperiment(experimentController.current)}" styleClass="ui-icon ui-icon-trash" title="Remove" update="@form"> - <f:setPropertyActionListener value="#{propertyValue}" target="#{experimentController.experimentPropertyToDelete}"/> - </p:commandLink> - </div> - </p:column> - - </p:subTable> - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentPoliciesViewListDataTable.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentPoliciesViewListDataTable.xhtml deleted file mode 100644 index fc6dfd9a45d97c6c7e30af2db2e63d8142754a59..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentPoliciesViewListDataTable.xhtml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <p/> - <p:dataTable id="experimentPoliciesListDataTable" - var="experimentPolicyObject" - value="#{experimentController.experimentPolicyListTable.listDataModel}" - filteredValue="#{experimentController.experimentPolicyListTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{experimentController.rows}" - binding="#{experimentController.experimentPolicyListTable.listDataTable}" - widgetVar="policyListWidget" - emptyMessage="No policies found."> - - <p:columnGroup type="header" > - <p:column headerText="Property" /> - <p:column headerText="Value" /> - <p:column headerText="Units" /> - <p:column headerText="Description" /> - <p:column headerText="Last Modified By" /> - <p:column headerText="Last Modified Date" /> - </p:columnGroup> - - <p:subTable var="propertyValue" value="#{experimentPolicyObject.getExperimentPolicyPropertyValueList()}" > - <f:facet name="header" > - <h:outputText value="#{experimentPolicyObject.policyType.name} Policy"/> - </f:facet> - - <p:column > - <h:outputText value="#{propertyValue.getPolicyProperty().name}"/> - </p:column> - <p:column> - <h:outputText value="#{propertyValue.policyPropertyValue}"/> - </p:column> - <p:column> - <h:outputText value="#{propertyValue.getPolicyProperty().units}"/> - </p:column> - <p:column> - <h:outputText value="#{propertyValue.getPolicyProperty().description}"/> - </p:column> - <p:column> - <h:outputText value="#{propertyValue.modifiedBy}"/> - </p:column> - <p:column> - <h:outputText id="startDate" value="#{propertyValue.modifiedDate}" styleClass="entityDataText"> - <f:convertDateTime pattern="#{resources.DatePattern}" type="date" /> - </h:outputText> - </p:column> - </p:subTable> - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentPolicyAddDialog.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentPolicyAddDialog.xhtml deleted file mode 100644 index 6dfbcf3a393ff9095af8108d7731bb5fffb5dcd6..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentPolicyAddDialog.xhtml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:h="http://xmlns.jcp.org/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <p:dialog id="experimentPolicyAddDialog" - header="Add experiment policies" widgetVar="experimentPolicyAddDialogWidget" dynamic="true" styleClass="dialog" width="800"> - - <p:dataTable id="addExperimentPolicyList" - var="missingPolicy" - value="#{experimentController.noPolicyValueTable.listDataModel}" - filteredValue="#{experimentController.noPolicyValueTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{experimentController.rows}" - binding="#{experimentController.noPolicyValueTable.listDataTable}" - widgetVar="experimentPolicyAddTableWidgetVar" - selection="#{experimentController.getNoPolicyValueTable().selectedObjectList}" - rowKey="#{missingPolicy.id}" - rowSelectMode="true" - selectionMode="multiple" - emptyMessage="No policies found."> - - - <p:column headerText="PolicyType"> - <h:outputText value="#{missingPolicy.getPolicyProperty().getPolicyType().name}"/> - </p:column> - <p:column headerText="Property" > - <h:outputText value="#{missingPolicy.getPolicyProperty().name}"/> - </p:column> - <p:column headerText="Value"> - <h:inputText id="missingPolicy" value="#{missingPolicy.value}" rendered="#{!missingPolicy.hasAllowedValues()}" styleClass="entityDataTextShort"/> - - <p:selectOneMenu id="missingPolicySelect" value="#{missingPolicy.value}" styleClass="entityDataText" rendered="#{missingPolicy.hasAllowedValues()}"> - <f:selectItems value="#{missingPolicy.getPolicyProperty().allowedPolicyValueList}" - var="allowedPolicyValue" - itemValue="#{allowedPolicyValue.policyValue}" - itemLabel="#{allowedPolicyValue.policyValue}" /> - </p:selectOneMenu> - <p:tooltip for="missingPolicy" value="Modify property value" /> - </p:column> - <p:column headerText="Units"> - <h:outputText value="#{missingPolicy.getPolicyProperty().units}"/> - </p:column> - <p:column headerText="Description"> - <h:outputText value="#{missingPolicy.getPolicyProperty().description}"/> - </p:column> - - <f:facet name="footer"> - <p:commandButton value="Add" action="#{experimentController.addExperimentPolicyPropertyValues()}" oncomplete="PF('experimentPolicyAddDialogWidget').hide()" update="@form"/> - <p:commandButton value="Clear Selection" onclick="PF('experimentPolicyAddTableWidgetVar').unselectAllRows()" /> - </f:facet> - </p:dataTable> - </p:dialog> -</ui:composition> - - - - - diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentPolicyRemoveDialog.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentPolicyRemoveDialog.xhtml deleted file mode 100644 index ca682ba8f1008310ea258478326cbe7b7cebe44d..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentPolicyRemoveDialog.xhtml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <p:confirmDialog id="experimentPolicyRemoveDialog" message="Remove policy #{experimentController.getRemovedPolicyName()} from Experiment?" - header="Remove Policy" severity="alert" widgetVar="experimentPolicyRemoveDialogWidget" - styleClass="dialog"> - <p:commandButton value="Yes" oncomplete="PF('experimentPolicyRemoveDialogWidget').hide()" action="#{experimentController.updateRemovedExperimentPolicy()}" actionListener="#{experimentController.removePolicy()}" update="@form"/> - <p:commandButton value="No" onclick="PF('experimentPolicyRemoveDialogWidget').hide()" type="button" /> - </p:confirmDialog> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentUserAddDialog.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentUserAddDialog.xhtml deleted file mode 100644 index f39a35df7e2f7a658fbb216ec1162091ebacdc83..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentUserAddDialog.xhtml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:h="http://xmlns.jcp.org/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - - - - <p:dialog id="experimentUserAddDialog" - header="Add experiment users" widgetVar="experimentUserAddDialogWidget" dynamic="true" styleClass="dialog" width="1000"> - - <div class="actionButton"> - <p:commandButton id="ResetFilters" actionListener="#{experimentController.noExperimentUsersTypeTable.resetFilterList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight" oncomplete="PF('experimentUserAddDialogWidget').show()" update="experimentUserAddDialog" > - <p:tooltip for="ResetFilters" value="Reset list filters."/> - </p:commandButton> - </div> - - <div> - <p:dataTable id="addExperimentUserList" - var="experimentUser" - value="#{experimentController.noExperimentUsersTypeTable.listDataModel}" - filteredValue="#{experimentController.noExperimentUsersTypeTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="10" - binding="#{experimentController.noExperimentUsersTypeTable.listDataTable}" - selection="#{experimentController.noExperimentUsersTypeTable.selectedObjectList}" - rowKey="#{experimentUser.username}" - widgetVar="experimentUserAddTableWidgetVar" - emptyMessage="No users to add." - rowSelectMode="true" - selectionMode="multiple" > - - <p:column sortBy="#{experimentUser.badge}" headerText="Badge" - filterBy="#{experimentUser.badge}" filterMatchMode="contains" > - <h:outputText value="#{experimentUser.badge}"/> - </p:column> - - <p:column sortBy="#{experimentUser.username}" headerText="Username" - filterBy="#{experimentUser.username}" filterMatchMode="contains" > - <h:outputText value="#{experimentUser.username}"/> - </p:column> - - <p:column sortBy="#{experimentUser.lastName}" headerText="Last Name" - filterBy="#{experimentUser.lastName}" filterMatchMode="contains" > - <h:outputText value="#{experimentUser.lastName}"/> - </p:column> - - <p:column sortBy="#{experimentUser.firstName}" headerText="First Name" - filterBy="#{experimentUser.firstName}" filterMatchMode="contains" > - <h:outputText value="#{experimentUser.firstName}"/> - </p:column> - - <p:column sortBy="#{experimentUser.email}" headerText="Email" - filterBy="#{experimentUser.email}" filterMatchMode="contains" > - <h:outputText value="#{experimentUser.email}"/> - </p:column> - - <p:column sortBy="#{experimentUser.globusUsername}" headerText="Globus Username" - filterBy="#{experimentUser.globusUsername}" filterMatchMode="contains" > - <h:outputText value="#{experimentUser.globusUsername}"/> - </p:column> - - <f:facet name="footer"> - <p:commandButton value="Add" action="#{experimentController.addExperimentUser()}" oncomplete="PF('experimentUserAddDialogWidget').hide()" update="@form"/> - <p:commandButton value="Clear Selection" onclick="PF('experimentUserAddTableWidgetVar').unselectAllRows()" /> - </f:facet> - </p:dataTable> - </div> - </p:dialog> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentUserRemoveDialog.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentUserRemoveDialog.xhtml deleted file mode 100644 index 303a8f3b9bd9357d47da313f58bf3e1510d9fe01..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentUserRemoveDialog.xhtml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <p:confirmDialog id="experimentUserRemoveDialog" message="Remove user #{experimentController.getRemovedUserName()} from Experiment?" - header="Remove User" severity="alert" widgetVar="experimentUserRemoveDialogWidget" - styleClass="dialog"> - <p:commandButton value="Yes" oncomplete="PF('experimentUserRemoveDialogWidget').hide()" actionListener="#{experimentController.removeUserRoles()}" action="#{experimentController.removeUser()}" update="@form"/> - <p:commandButton value="No" onclick="PF('experimentUserRemoveDialogWidget').hide()" type="button" /> - </p:confirmDialog> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentUsersEditDataTable.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentUsersEditDataTable.xhtml deleted file mode 100644 index bb3df1cd3c28c94ea486c051b6d07702aa1f1f03..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentUsersEditDataTable.xhtml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - - <ui:include src="experimentUserAddDialog.xhtml" /> - - <ui:param name="isAdmin" value="#{loginController.admin}" /> - - <p:commandButton id="experimentUserAddButton" value="Add" onclick="PF('experimentUserAddDialogWidget').show();" rendered="true" icon="ui-icon-plus" > - <p:tooltip for="experimentUserAddButton" value="Add new users." /> - </p:commandButton> - - <p:commandButton id="ResetFiltersButton" action="#{experimentController.experimentUsersEditTable.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight" oncomplete="PF('experimentUsersEditWidget').clearFilters()" update="experimentUsersEditDataTable"> - <p:tooltip for="ResetFiltersButton" value="Reset filters."/> - </p:commandButton> - - <p:commandButton id="#{entityTypeName}NoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="#{entityTypeName}NoOp"/> - - <p:dataTable id="experimentUsersEditDataTable" - var="experimentUserObject" - value="#{experimentController.experimentUsersEditTable.listDataModel}" - filteredValue="#{experimentController.experimentUsersEditTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{experimentController.rows}" - binding="#{experimentController.experimentUsersEditTable.listDataTable}" - widgetVar="experimentUsersEditWidget" - emptyMessage="No users found."> - - <ui:param name="isManager" value="#{experimentController.canAddManager()}" /> - <ui:param name="isPi" value="#{experimentController.canAddPiAndUser()}" /> - - <p:column sortBy="#{experimentUserObject.badge}" headerText="Badge" - filterBy="#{experimentUserObject.badge}" filterMatchMode="contains" > - <h:outputText value="#{experimentUserObject.badge}"/> - </p:column> - - <p:column sortBy="#{experimentUserObject.username}" headerText="Username" - filterBy="#{experimentUserObject.username}" filterMatchMode="contains" > - <h:outputText value="#{experimentUserObject.username}"/> - </p:column> - - <p:column sortBy="#{experimentUserObject.name}" headerText="Last, First Name" - filterBy="#{experimentUserObject.name}" filterMatchMode="contains" > - <h:outputText value="#{experimentUserObject.name}"/> - </p:column> - - <p:column sortBy="#{experimentUserObject.globusUsername}" headerText="Globus Username" - filterBy="#{experimentUserObject.globusUsername}" filterMatchMode="contains" > - <h:outputText value="#{experimentUserObject.globusUsername}"/> - </p:column> - - <p:column sortBy="#{!experimentUserObject.isManager}" headerText="Manager"> - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{experimentUserObject.isManager and !isAdmin and !isManager}" /> - <p:selectBooleanCheckbox value="#{experimentUserObject.isManager}" rendered="#{isAdmin or isManager}" immediate="true" /> - </p:column> - - <p:column sortBy="#{!experimentUserObject.isPI}" headerText="Principal Investigator"> - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{experimentUserObject.isPI and !isAdmin and !isPi}" /> - <p:selectBooleanCheckbox value="#{experimentUserObject.isPI}" rendered="#{isAdmin or isPi}" /> - </p:column> - - <p:column sortBy="#{!experimentUserObject.isUser}" headerText="User"> - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{experimentUserObject.isUser and !isAdmin and !isPi}" /> - <p:selectBooleanCheckbox value="#{experimentUserObject.isUser}" rendered="#{isAdmin or isPi}" /> - </p:column> - - - <ui:param name="isEditedManager" value="#{experimentUserObject.isManager}" /> - <p:column headerText="Actions" rendered="#{isAdmin or isManager or isPi}"> - <div class="actionLink" > - <p:commandLink oncomplete="PF('experimentUserRemoveDialogWidget').show()" rendered="#{!experimentUserObject.isManager or isAdmin or isManager}" styleClass="ui-icon ui-icon-trash" title="Remove" update="@form"> - <f:setPropertyActionListener value="#{experimentUserObject}" target="#{experimentController.experimentUsersEditTable.currentObject}" /> - </p:commandLink> - </div> - </p:column> - - </p:dataTable> - - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentUsersListDataTable.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentUsersListDataTable.xhtml deleted file mode 100644 index eda467d9c36bd6275abed19600bd8c28d8b58f47..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentUsersListDataTable.xhtml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - - <p:commandButton id="ResetFiltersButton" action="#{experimentController.experimentUsersListTable.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight" oncomplete="PF('experimentUsersListWidget').clearFilters()" update="experimentUsersListDataTable"> - <p:tooltip for="ResetFiltersButton" value="Reset filters."/> - </p:commandButton> - <p:commandButton id="#{entityTypeName}NoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="#{entityTypeName}NoOp"/> - - <p:dataTable id="experimentUsersListDataTable" - var="experimentUserObject" - value="#{experimentController.experimentUsersListTable.listDataModel}" - filteredValue="#{experimentController.experimentUsersListTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{experimentController.rows}" - binding="#{experimentController.experimentUsersListTable.listDataTable}" - widgetVar="experimentUsersListWidget" - emptyMessage="No users found."> - - <p:column sortBy="#{experimentUserObject.badge}" headerText="Badge" - filterBy="#{experimentUserObject.badge}" filterMatchMode="contains" > - <h:outputText value="#{experimentUserObject.badge}"/> - </p:column> - - <p:column sortBy="#{experimentUserObject.username}" headerText="Username" - filterBy="#{experimentUserObject.username}" filterMatchMode="contains" > - <h:outputText value="#{experimentUserObject.username}"/> - </p:column> - - <p:column sortBy="#{experimentUserObject.name}" headerText="Last, First Name" - filterBy="#{experimentUserObject.name}" filterMatchMode="contains" > - <h:outputText value="#{experimentUserObject.name}"/> - </p:column> - - <p:column sortBy="#{experimentUserObject.globusUsername}" headerText="Globus Username" - filterBy="#{experimentUserObject.globusUsername}" filterMatchMode="contains" > - <h:outputText value="#{experimentUserObject.globusUsername}"/> - </p:column> - - <p:column sortBy="#{!experimentUserObject.isManager}" headerText="Manager" > - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{experimentUserObject.isManager}" /> - </p:column> - - <p:column sortBy="#{!experimentUserObject.isPI}" headerText="Principal Investigator"> - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{experimentUserObject.isPI}" /> - </p:column> - - <p:column sortBy="#{!experimentUserObject.isUser}" headerText="User"> - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{experimentUserObject.isUser}" /> - </p:column> - - - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experiment/private/experimentViewPanelGrid.xhtml b/src/java/DmWebPortal/web/views/experiment/private/experimentViewPanelGrid.xhtml deleted file mode 100644 index 6c876cb35f722cbf6b35610c9d875b005bd66802..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/private/experimentViewPanelGrid.xhtml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:f="http://xmlns.jcp.org/jsf/core"> - - <ui:param name="experimentObject" value="#{experimentController.current}"/> - - <p:panelGrid columns="2" styleClass="viewEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{experimentObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="experimentType" value="Type" styleClass="entityDataLabel"/> - <h:outputText id="experimentType" value="#{experimentObject.experimentType.name}" title="Name" styleClass="entityDataText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:outputText id="description" value="#{experimentObject.description}" title="Description" styleClass="entityDataText"/> - - <h:outputLabel for="startDate" value="Start Date" styleClass="entityDataLabel"/> - <h:outputText id="startDate" value="#{experimentObject.startDate}" styleClass="entityDataText"> - <f:convertDateTime pattern="#{resources.DateTimeZonePattern}" type="both" timeZone="#{resources.Timezone}" /> - </h:outputText> - - - <h:outputLabel for="endDate" value="End Date" styleClass="entityDataLabel"/> - <h:outputText id="endDate" value="#{experimentObject.endDate}" styleClass="entityDataText"> - <f:convertDateTime pattern="#{resources.DateTimeZonePattern}" type="both" timeZone="#{resources.Timezone}" /> - </h:outputText> - - </p:panelGrid> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experiment/view.xhtml b/src/java/DmWebPortal/web/views/experiment/view.xhtml deleted file mode 100644 index 1ab42ea676eb74eea268eeda4a8217fc3a33ebc5..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experiment/view.xhtml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Experiment View</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{experimentController.notSelected()}" /> - - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="viewExperimentForm"> - <div class="pageTitle"> - <h1>Experiment #{experimentController.current.name}</h1> - </div> - - <ui:param name="experimentObject" value="#{experimentController.current}"/> - <p:accordionPanel multiple="true" activeIndex="0,1,2" > - <p:tab title="Experiment Properties"> - <div class="middleCenterLeftContent"> - <ui:include src="private/experimentViewPanelGrid.xhtml"/> - </div> - </p:tab> - <p:tab title="Experiment Policies"> - <ui:include src="private/experimentPoliciesViewListDataTable.xhtml"/> - </p:tab> - <p:tab title="Experiment Users"> - <ui:include src="private/experimentUsersListDataTable.xhtml"/> - </p:tab> - </p:accordionPanel> - - <p/> - - <div class="actionButton"> - <p:commandButton action="#{experimentController.prepareEdit(experimentObject)}" rendered="#{loginController.admin or experimentController.canEditExperiment(experimentObject)}" value="Edit" alt="Edit" icon="ui-icon-pencil"/> - <p:commandButton action="#{experimentController.prepareList()}" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - - </h:form> - </ui:define> - -</ui:composition> -</ui:composition> - - - - diff --git a/src/java/DmWebPortal/web/views/experimentType/create.xhtml b/src/java/DmWebPortal/web/views/experimentType/create.xhtml deleted file mode 100644 index 24762b308ee6e4b13231fb929930818defea0a5e..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/create.xhtml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Experiment Type Edit</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Add Experiment Type</h1> - </div> - - <h:form id="addExperimentTypeForm"> - - <ui:include src="private/experimentTypeCreatePanelGrid.xhtml"/> - - <p/> - <div class="actionButton"> - <p:commandButton action="#{experimentTypeController.create()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{experimentTypeController.prepareList()}" immediate="true" value="Cancel" alt="Cancel" icon="ui-icon-cancel"/> - </div> - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experimentType/edit.xhtml b/src/java/DmWebPortal/web/views/experimentType/edit.xhtml deleted file mode 100644 index 2503e36ea1c26e47e95217581509fb813dd9453c..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/edit.xhtml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Experiment Type Edit</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{experimentTypeController.notSelected()}" /> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="editExperimentTypeForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Edit Experiment Type</h1> - </div> - - <ui:include src="private/experimentTypeEditPanelGrid.xhtml"/> - <p/> - <div class="actionButton"> - <p:commandButton action="#{experimentTypeController.update()}" value="Save" alt="Save" icon="ui-icon-check"/> - <p:commandButton action="#{experimentTypeController.prepareList()}" immediate="true" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - </div> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experimentType/list.xhtml b/src/java/DmWebPortal/web/views/experimentType/list.xhtml deleted file mode 100644 index 9865e5fd9d6e5b9b81acc804f16360f48ee08c5c..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/list.xhtml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Experiment Types List</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Experiment Types</h1> - </div> - - <h:form id="viewExperimentTypeListForm"> - <ui:param name="entityController" value="#{experimentTypeController}"/> - <ui:include src="../common/commonListActionButtons.xhtml"/> - - <h:panelGroup> - <ui:include src="private/experimentTypeListDataTable.xhtml"/> - </h:panelGroup> - - <ui:include src="private/experimentTypeDestroyDialog.xhtml"/> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeCreatePanelGrid.xhtml deleted file mode 100644 index 15ce12c4f9359c3f32c0b4e463ee6cdf1dd0139f..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeCreatePanelGrid.xhtml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="experimentTypeObject" value="#{experimentTypeController.selected}"/> - - <p:panelGrid columns="2" styleClass="createEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:inputText id="name" value="#{experimentTypeObject.name}" title="Name" styleClass="entityDataEmphasizedInputText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{experimentTypeObject.description}" title="Description" styleClass="entityDataInputText"/> - - <h:outputLabel for="rootDataPath" value="Root Data Path" styleClass="entityDataLabel"/> - <h:inputText id="rootDataPath" value="#{experimentTypeObject.rootDataPath}" title="Root Data Path" styleClass="entityDataInputText"/> - - </p:panelGrid> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeDestroyDialog.xhtml b/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeDestroyDialog.xhtml deleted file mode 100644 index 11cd4b8f8d02243150ad3f2b6133c8b57f9eefff..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeDestroyDialog.xhtml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <p:confirmDialog id="experimentTypeDestroyDialog" message="Delete experiment type #{experimentTypeController.getCurrentEntityInstanceName()}?" - header="Delete Experiment Type" severity="alert" widgetVar="experimentTypeDestroyDialogWidget" - styleClass="dialog"> - <p:commandButton value="Yes" oncomplete="experimentTypeDestroyDialogWidget.hide()" action="#{experimentTypeController.destroy()}"/> - <p:commandButton value="No" onclick="PF('experimentTypeDestroyDialogWidget').hide()" type="button" /> - </p:confirmDialog> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeEditPanelGrid.xhtml deleted file mode 100644 index fc27c0bef7da010805f44637719149653fa2351e..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeEditPanelGrid.xhtml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="experimentTypeObject" value="#{experimentTypeController.selected}"/> - - <p:panelGrid columns="2" styleClass="editEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{experimentTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{experimentTypeObject.description}" title="Description" styleClass="entityDataInputText"/> - - <h:outputLabel for="rootDataPath" value="Root Data Path" styleClass="entityDataLabel"/> - <h:inputText id="rootDataPath" value="#{experimentTypeObject.rootDataPath}" title="Root Data Path" styleClass="entityDataInputText"/> - - </p:panelGrid> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeListDataTable.xhtml b/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeListDataTable.xhtml deleted file mode 100644 index 40ebd1884898ea7162081b4d387cd1a38f14dbb0..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeListDataTable.xhtml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <p:dataTable id="experimentTypeListDataTable" - var="experimentTypeObject" - value="#{experimentTypeController.listDataModel}" - filteredValue="#{experimentTypeController.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{experimentTypeController.rows}" - binding="#{experimentTypeController.listDataTable}" - widgetVar="experimentTypeListWidget" - emptyMessage="No experiment types found."> - - <p:column sortBy="#{experimentTypeObject.id}" headerText="Id" > - <h:outputText value="#{experimentTypeObject.id}"/> - </p:column> - - <p:column sortBy="#{experimentTypeObject.name}" headerText="Name" - filterBy="#{experimentTypeObject.name}" filterMatchMode="contains" > - <h:outputText value="#{experimentTypeObject.name}"/> - </p:column> - - <p:column sortBy="#{experimentTypeObject.description}" headerText="Description" - filterBy="#{experimentTypeObject.description}" filterMatchMode="contains"> - <h:outputText value="#{experimentTypeObject.description}"/> - </p:column> - - <p:column sortBy="#{experimentTypeObject.rootDataPath}" headerText="Root Data Path" - filterBy="#{experimentTypeObject.rootDataPath}" filterMatchMode="contains" > - <h:outputText value="#{experimentTypeObject.rootDataPath}"/> - </p:column> - - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink action="#{experimentTypeController.prepareView(experimentTypeObject)}" styleClass="ui-icon ui-icon-info" title="View"/> - <p:commandLink action="#{experimentTypeController.prepareEdit(experimentTypeObject)}" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-pencil" title="Edit"/> - <p:commandLink oncomplete="PF('experimentTypeDestroyDialogWidget').show()" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-trash" title="Delete" update="@form"> - <f:setPropertyActionListener value="#{experimentTypeObject}" target="#{experimentTypeController.current}"/> - </p:commandLink> - </div> - </p:column> - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeViewPanelGrid.xhtml b/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeViewPanelGrid.xhtml deleted file mode 100644 index 8d92cdb25e23c84335e5e1b25e8914323f7e4660..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/private/experimentTypeViewPanelGrid.xhtml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="experimentTypeObject" value="#{experimentTypeController.selected}"/> - - <p:panelGrid columns="2" styleClass="viewEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{experimentTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:outputText id="description" value="#{experimentTypeObject.description}" title="Description" styleClass="entityDataText"/> - - <h:outputLabel for="rootDataPath" value="Root Data Path" styleClass="entityDataLabel"/> - <h:outputText id="rootDataPath" value="#{experimentTypeObject.rootDataPath}" title="Root Data Path" styleClass="entityDataText"/> - - </p:panelGrid> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/experimentType/view.xhtml b/src/java/DmWebPortal/web/views/experimentType/view.xhtml deleted file mode 100644 index ab717c734757e845eae806bb094fe2ab2f59f801..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/experimentType/view.xhtml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Experiment Type View</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{experimentTypeController.notSelected()}" /> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="viewExperimentTypeForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Experiment Type Details</h1> - </div> - - <ui:include src="private/experimentTypeViewPanelGrid.xhtml"/> - - <p/> - <ui:param name="experimentTypeObject" value="#{experimentTypeController.selected}"/> - <div class="actionButton"> - <p:commandButton action="#{experimentTypeController.prepareEdit(experimentTypeObject)}" rendered="#{loginController.admin}" value="Edit" alt="Edit" icon="ui-icon-pencil"/> - <p:commandButton onclick="PF('experimentTypeDestroyDialogWidget').show();" rendered="#{loginController.admin}" value="Delete" alt="Delete" icon="ui-icon-trash"> - <f:setPropertyActionListener value="#{experimentTypeObject}" target="#{experimentTypeController.current}"/> - </p:commandButton> - <p:commandButton action="#{experimentTypeController.prepareList()}" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - - <ui:include src="private/experimentTypeDestroyDialog.xhtml"/> - - </div> - - </h:form> - - </ui:define> - </ui:composition> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/home.xhtml b/src/java/DmWebPortal/web/views/home.xhtml deleted file mode 100644 index 9d2b1bd5cf44e0f8e35edb9a6739a4764b626508..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/home.xhtml +++ /dev/null @@ -1,49 +0,0 @@ -<!--<?xml version='1.0' encoding='UTF-8' ?>--> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - - <title>Data Management System Portal Home</title> - - <h:outputScript library="js/common" name="forwardFromHome.js" rendered="#{!loginController.loggedIn}" /> - - <ui:composition template="../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - - <div class="homePage"> - - <div class="pageTitle"> - <h1>Data Management Portal Home</h1> - </div> - - <div class="sectionText"> - Welcome to the Advanced Photon Source’s prototype data management portal. Registered users can view and set access permissions for their experiment data using this system. - <p/> - </div> - - <div class="sectionTitle"> - <h2>System At A Glance</h2> - </div> - - <h:form id="systemSummaryForm"> - <p:growl id="messages" showDetail="true" autoUpdate="true"/> - <p:panelGrid columns="2"> - <h:outputLabel for="nRegisteredUsers" value="Number of Registered Users" styleClass="entityDataLabel"/> - <h:outputText id="nRegisteredUsers" value="#{userInfoController.items.getRowCount()}" title="Number of Registered Users" styleClass="entityDataText"/> - - </p:panelGrid> - </h:form> - </div> - - - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/login.xhtml b/src/java/DmWebPortal/web/views/login.xhtml deleted file mode 100644 index 82f994e16cbbc27f167e6b5a2b79b6d7b22ed4f0..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/login.xhtml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version='1.0' encoding='UTF-8' ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:p="http://primefaces.org/ui" - xmlns:h="http://java.sun.com/jsf/html"> - - <h:head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link href="../resources/css/login.css" rel="stylesheet" type="text/css" /> - <title>Data Management System Login</title> - - </h:head> - - <h:body> - <div id="top" class="topContent"> - <div id="topLeft" class="topLeftContent"> - <ui:insert name="topLeft"> - <h:graphicImage alt="ANL Logo" url="../resources/images/AnlLogo167x75.png"/> - </ui:insert> - </div> - <div> - <div id="topRight" class="topRightContent"> - <ui:insert name="topRight"/> - </div> - <div id="topCenter" class="topCenterContent"> - <ui:insert name="topCenter"> - <h1>Data Management System Portal</h1> - </ui:insert> - </div> - </div> - </div> - - <div id="middle" class="middleContent"> - <div id="middleLeft" class="middleLeftContent"> - <h:form id="loginForm"> - <div class="login"> - <div> - <p:inputText id="username" value="#{loginController.username}" title="Username"/> - <p:watermark for="username" value="Username"/> - </div> - <p/> - <div> - <p:password id="password" value="#{loginController.password}" title="Password"/> - <p:watermark for="password" value="Password"/> - </div> - <p/> - <div> - <p:commandButton value="Login" action="#{loginController.login()}" /> - </div> - </div> - </h:form> - </div> - - <div id="middleRight" class="middleRightContent" > - <p:messages id="messages" escape="false" showDetail="true" autoUpdate="true" closable="false" showIcon="false" /> - </div> - </div> - - <div id="bottom" class="sectionText"> - <p> - Welcome to the Advanced Photon Source’s prototype data management portal. Registered users can view and set access permissions for their experiment data using this system. - </p> - </div> - </h:body> - -</html> diff --git a/src/java/DmWebPortal/web/views/loginHelp.xhtml b/src/java/DmWebPortal/web/views/loginHelp.xhtml deleted file mode 100644 index 2b297a8d8ce8e95900f36abf129e3938392e428a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/loginHelp.xhtml +++ /dev/null @@ -1,73 +0,0 @@ -<!--<?xml version='1.0' encoding='UTF-8' ?>--> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:h="http://java.sun.com/jsf/html"> - - <h:head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link href="../resources/css/login.css" rel="stylesheet" type="text/css" /> - <title>Data Management System Login Help</title> - - </h:head> - - <h:body> - <div id="top" class="topContent"> - <div id="topLeft" class="topLeftContent"> - <ui:insert name="topLeft"> - <h:graphicImage alt="ANL Logo" url="../resources/images/AnlLogo167x75.png"/> - </ui:insert> - </div> - <div> - <div id="topRight" class="topRightContent"> - <ui:insert name="topRight"/> - </div> - <div id="topCenter" class="topCenterContent"> - <ui:insert name="topCenter"> - <h1>Data Management System Portal</h1> - </ui:insert> - </div> - </div> - </div> - - <div id="middle" class="middleContent"> - <p/> - <div class="pageTitle"> - <h2>Data Management Portal Login Help</h2> - </div> - </div> - - <div id="bottom" class="sectionText"> - Login Help - <p/> - - SharePoint - <p/> - Are you remembering to enter your username like this: anl\username? The "anl\" prefix is required. - - <p/> - - Internet Explorer - <p/> - If your Argonne account has been renamed (that is, your username has been changed), and you are using Internet Explorer as your browser, you may need to delete an existing, outdated security certificate as follows: - <p/> - In Internet Explorer, go to Tools -> Internet Options -> Content -> Certificates -> Personal. - <p/> - Select the certificate with the old username (issued by ANLIssuingCAv010) and click the "Remove" button. - <p/> - Clear the browser cache, close all browser windows, and restart the browser. - <p/> - Firefox - <p/> - In Firefox, clear the browser cache and cookies, close all browser windows, and restart the browser. - - <p/> - Password Problems - <p/> - Passwords can be changed and reset, and accounts can be unlocked via a set of self-service tools available online. - - </div> - </h:body> - -</html> diff --git a/src/java/DmWebPortal/web/views/pagenotfound.xhtml b/src/java/DmWebPortal/web/views/pagenotfound.xhtml deleted file mode 100644 index 057c70b135f6d143a69010a7907dfa48e03bb8b8..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/pagenotfound.xhtml +++ /dev/null @@ -1,12 +0,0 @@ -<!--<?xml version='1.0' encoding='UTF-8' ?>--> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:h="http://java.sun.com/jsf/html"> - - <h:body> - <h1>Page not found</h1> - </h:body> - -</html> diff --git a/src/java/DmWebPortal/web/views/policyProperty/create.xhtml b/src/java/DmWebPortal/web/views/policyProperty/create.xhtml deleted file mode 100644 index 586d1aaa7675143f6259922b5dd5e277ca76a578..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/create.xhtml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Policy Property Create</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Add Policy Property for Policy Type: #{policyTypeController.current.name}</h1> - </div> - - <h:form id="addPolicyPropertyForm"> - - <ui:include src="private/policyPropertyCreatePanelGrid.xhtml"/> - - <p/> - <div class="actionButton"> - <p:commandButton action="#{policyPropertyController.create()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{policyPropertyController.prepareList()}" immediate="true" value="Cancel" alt="Cancel" icon="ui-icon-cancel"/> - </div> - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/policyProperty/edit.xhtml b/src/java/DmWebPortal/web/views/policyProperty/edit.xhtml deleted file mode 100644 index db9f111d53f9fce550c9b12d8c9b79aa4718efff..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/edit.xhtml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Policy Property Edit</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{policyPropertyController.notSelected()}" /> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="editPolicyPropertyForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Policy Type: #{policyTypeController.current.name} <br/> - Policy Property: #{policyPropertyController.current.name}</h1> - </div> - - <ui:param name="policyPropertyObject" value="#{policyPropertyController.selected}"/> - <p:accordionPanel multiple="true" activeIndex="0,1" > - <p:tab title="Policy Property Description"> - <div class="middleCenterLeftContent"> - <ui:include src="private/policyPropertyEditPanelGrid.xhtml"/> - </div> - </p:tab> - - <p:tab title="Allowed Policy Values"> - <ui:include src="../allowedPolicyValue/private/allowedPolicyValueListEditDataTable.xhtml"/> - </p:tab> - </p:accordionPanel> - - <p/> - - <div class="actionButton"> - <p:commandButton action="#{policyPropertyController.update()}" actionListener="#{allowedPolicyValueController.update()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{policyPropertyController.prepareList()}" immediate="true" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - </div> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyCreatePanelGrid.xhtml deleted file mode 100644 index 60673d8afd17ac4b4090133853e56b3fb44a7973..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyCreatePanelGrid.xhtml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="policyPropertyObject" value="#{policyPropertyController.selected}"/> - - <p:panelGrid columns="2" styleClass="createEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:inputText id="name" value="#{policyPropertyObject.name}" title="Name" styleClass="entityDataEmphasizedInputText"/> - - <h:outputLabel for="units" value="Units" styleClass="entityDataLabel"/> - <h:inputText id="units" value="#{policyPropertyObject.units}" title="Units" styleClass="entityDataInputText"/> - - <h:outputLabel for="defaultValue" value="Default Value" styleClass="entityDataLabel"/> - <h:inputText id="defaultValue" value="#{policyPropertyObject.defaultValue}" title="Default Value" styleClass="entityDataInputText"/> - - <h:outputLabel for="lowerLimit" value="Lower Limit" styleClass="entityDataLabel"/> - <h:inputText id="lowerLimit" value="#{policyPropertyObject.lowerLimit}" title="Lower Limit" styleClass="entityDataInputText"/> - - <h:outputLabel for="upperLimit" value="Upper Limit" styleClass="entityDataLabel"/> - <h:inputText id="upperLimit" value="#{policyPropertyObject.upperLimit}" title="Upper Limit" styleClass="entityDataInputText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{policyPropertyObject.description}" title="Description" styleClass="entityDataInputText"/> - - </p:panelGrid> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyDestroyDialog.xhtml b/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyDestroyDialog.xhtml deleted file mode 100644 index ae6877f24082eaa57229b23c1f6742dd905937fb..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyDestroyDialog.xhtml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <p:confirmDialog id="policyPropertyDestroyDialog" message="Delete policy property #{policyPropertyController.getCurrentEntityInstanceName()}?" - header="Delete Policy Property" severity="alert" widgetVar="policyPropertyDestroyDialogWidget" - styleClass="dialog"> - <p:commandButton value="Yes" oncomplete="policyPropertyDestroyDialogWidget.hide()" action="#{policyPropertyController.destroy()}" update="@form"/> - <p:commandButton value="No" onclick="PF('policyPropertyDestroyDialogWidget').hide()" type="button" /> - </p:confirmDialog> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyEditPanelGrid.xhtml deleted file mode 100644 index 6129d15ccfceabeb60b6f97954caba483df33c5f..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyEditPanelGrid.xhtml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="policyPropertyObject" value="#{policyPropertyController.current}"/> - - <p:panelGrid columns="2" styleClass="editEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{policyPropertyObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="units" value="Units" styleClass="entityDataLabel"/> - <h:inputText id="units" value="#{policyPropertyObject.units}" title="Units" styleClass="entityDataInputText"/> - - <h:outputLabel for="defaultValue" value="Default Value" styleClass="entityDataLabel"/> - <h:inputText id="defaultValue" value="#{policyPropertyObject.defaultValue}" title="Default Value" styleClass="entityDataInputText"/> - - <h:outputLabel for="lowerLimit" value="Lower Limit" styleClass="entityDataLabel"/> - <h:inputText id="lowerLimit" value="#{policyPropertyObject.lowerLimit}" title="Lower Limit" styleClass="entityDataInputText"/> - - <h:outputLabel for="upperLimit" value="Upper Limit" styleClass="entityDatadLabel"/> - <h:inputText id="upperLimit" value="#{policyPropertyObject.upperLimit}" title="Upper Limit" styleClass="entityDataInputText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{policyPropertyObject.description}" title="Description" styleClass="entityDataInputText"/> - - </p:panelGrid> -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyListDataTable.xhtml b/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyListDataTable.xhtml deleted file mode 100644 index f13feb68e7e89bd7f577f93136447b7225d8578a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyListDataTable.xhtml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -To change this license header, choose License Headers in Project Properties. -To change this template file, choose Tools | Templates -and open the template in the editor. ---> -<!DOCTYPE html> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <div class="actionButton"> - <p:commandButton id="policyPropertyViewResetFiltersButton" action="#{policyTypeController.prepareView()}" actionListener="#{policyPropertyController.policyPropertyInfoTable.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight"> - <p:tooltip for="policyPropertyViewResetFiltersButton" value="Reset list filters."/> - </p:commandButton> - <p:commandButton id="policyPropertyNoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="policyPropertyNoOp"/> - </div> - - <p:dataTable id="policyPropertyListViewDataTable" - var="policyPropertyViewObject" - value="#{policyPropertyController.policyPropertyInfoTable.listDataModel}" - filteredValue="#{policyPropertyController.policyPropertyInfoTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{policyPropertyController.rows}" - binding="#{policyPropertyController.policyPropertyInfoTable.listDataTable}" - widgetVar="policyPropertyViewListWidget" - emptyMessage="No policy properties found." > - - - <p:column sortBy="#{policyPropertyViewObject.id}" headerText="Id" > - <h:outputText value="#{policyPropertyViewObject.id}"/> - </p:column> - - <p:column sortBy="#{policyPropertyViewObject.name}" headerText="Property Name" - filterBy="#{policyPropertyViewObject.name}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyViewObject.name}"/> - </p:column> - - <p:column sortBy="#{policyPropertyViewObject.defaultValue}" headerText="Default Value" - filterBy="#{policyPropertyViewObject.defaultValue}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyViewObject.defaultValue}"/> - </p:column> - - <p:column sortBy="#{policyPropertyViewObject.units}" headerText="Units" - filterBy="#{policyPropertyViewObject.units}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyViewObject.units}"/> - </p:column> - - <p:column sortBy="#{policyPropertyViewObject.lowerLimit}" headerText="Lower Limit" - filterBy="#{policyPropertyViewObject.lowerLimit}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyViewObject.lowerLimit}"/> - </p:column> - - <p:column sortBy="#{policyPropertyViewObject.upperLimit}" headerText="Upper Limit" - filterBy="#{policyPropertyViewObject.upperLimit}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyViewObject.upperLimit}"/> - </p:column> - - <p:column sortBy="#{policyPropertyViewObject.description}" headerText="Description" - filterBy="#{policyPropertyViewObject.description}" filterMatchMode="contains"> - <h:outputText value="#{policyPropertyViewObject.description}"/> - </p:column> - - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink action="#{policyPropertyController.prepareView(policyPropertyViewObject)}" actionListener="#{allowedPolicyValueController.setPolicyProperty(policyPropertyViewObject)}" styleClass="ui-icon ui-icon-info" title="View"/> - <p:commandLink action="#{policyPropertyController.prepareEdit(policyPropertyViewObject)}" actionListener="#{allowedPolicyValueController.setPolicyProperty(policyPropertyViewObject)}" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-pencil" title="Edit"/> - </div> - </p:column> - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyListEditDataTable.xhtml b/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyListEditDataTable.xhtml deleted file mode 100644 index fb107d21cbc539469f6bd0d72a2aec756208a2ea..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyListEditDataTable.xhtml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -To change this license header, choose License Headers in Project Properties. -To change this template file, choose Tools | Templates -and open the template in the editor. ---> -<!DOCTYPE html> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <div class="actionButton"> - <p:commandButton id="policyPropertyAddButton" action="#{policyPropertyController.prepareCreate()}" rendered="#{loginController.admin}" value="Add" alt="Add new Policy Property" icon="ui-icon-plus" update="@form"> - <p:tooltip for="policyPropertyAddButton" value="Create new Policy Property."/> - </p:commandButton> - <p:commandButton id="policyPropertyResetFiltersButton" action="#{policyTypeController.prepareEdit(policyTypeController.current)}" actionListener="#{policyPropertyController.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight"> - <p:tooltip for="policyPropertyResetFiltersButton" value="Reset list filters."/> - </p:commandButton> - <p:commandButton id="policyPropertyNoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="policyPropertyNoOp"/> - </div> - - <p:dataTable id="policyPropertyListDataTable" - var="policyPropertyObject" - value="#{policyPropertyController.listDataModel}" - filteredValue="#{policyPropertyController.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{policyPropertyController.rows}" - binding="#{policyPropertyController.listDataTable}" - widgetVar="policyPropertyListWidget" - emptyMessage="No policy properties found." > - - - <p:column sortBy="#{policyPropertyObject.id}" headerText="Id" > - <h:outputText value="#{policyPropertyObject.id}"/> - </p:column> - - <p:column sortBy="#{policyPropertyObject.name}" headerText="Property Name" - filterBy="#{policyPropertyObject.name}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyObject.name}"/> - </p:column> - - <p:column sortBy="#{policyPropertyObject.defaultValue}" headerText="Default Value" - filterBy="#{policyPropertyObject.defaultValue}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyObject.defaultValue}"/> - </p:column> - - <p:column sortBy="#{policyPropertyObject.units}" headerText="Units" - filterBy="#{policyPropertyObject.units}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyObject.units}"/> - </p:column> - - <p:column sortBy="#{policyPropertyObject.lowerLimit}" headerText="Lower Limit" - filterBy="#{policyPropertyObject.lowerLimit}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyObject.lowerLimit}"/> - </p:column> - - <p:column sortBy="#{policyPropertyObject.upperLimit}" headerText="Upper Limit" - filterBy="#{policyPropertyObject.upperLimit}" filterMatchMode="contains" > - <h:outputText value="#{policyPropertyObject.upperLimit}"/> - </p:column> - - <p:column sortBy="#{policyPropertyObject.description}" headerText="Description" - filterBy="#{policyPropertyObject.description}" filterMatchMode="contains"> - <h:outputText value="#{policyPropertyObject.description}"/> - </p:column> - - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink action="#{policyPropertyController.prepareView(policyPropertyObject)}" actionListener="#{allowedPolicyValueController.setPolicyProperty(policyPropertyObject)}" styleClass="ui-icon ui-icon-info" title="View"/> - <p:commandLink action="#{policyPropertyController.prepareEdit(policyPropertyObject)}" actionListener="#{allowedPolicyValueController.setPolicyProperty(policyPropertyObject)}" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-pencil" title="Edit"/> - <p:commandLink oncomplete="PF('policyPropertyDestroyDialogWidget').show()" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-trash" title="Delete" update="@form"> - <f:setPropertyActionListener value="#{policyPropertyObject}" target="#{policyPropertyController.current}"/> - </p:commandLink> - </div> - </p:column> - </p:dataTable> - <ui:include src="policyPropertyDestroyDialog.xhtml"/> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyViewPanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyViewPanelGrid.xhtml deleted file mode 100644 index e48f532eaab92950aab4131f507d38f2b6afa1b7..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/private/policyPropertyViewPanelGrid.xhtml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="policyPropertyObject" value="#{policyPropertyController.current}"/> - - <p:panelGrid columns="2" styleClass="editEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{policyPropertyObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="units" value="Units" styleClass="entityDataLabel"/> - <h:outputText id="units" value="#{policyPropertyObject.units}" title="Units" styleClass="entityDataText"/> - - <h:outputLabel for="defaultValue" value="Default Value" styleClass="entityDataLabel"/> - <h:outputText id="defaultValue" value="#{policyPropertyObject.defaultValue}" title="Default Value" styleClass="entityDataText"/> - - <h:outputLabel for="lowerLimit" value="Lower Limit" styleClass="entityDataLabel"/> - <h:outputText id="lowerLimit" value="#{policyPropertyObject.lowerLimit}" title="Lower Limit" styleClass="entityDataText"/> - - <h:outputLabel for="upperLimit" value="Upper Limit" styleClass="entityDataLabel"/> - <h:outputText id="upperLimit" value="#{policyPropertyObject.upperLimit}" title="Upper Limit" styleClass="entityDataText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:outputText id="description" value="#{policyPropertyObject.description}" title="Description" styleClass="entityDataText"/> - - </p:panelGrid> -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/policyProperty/view.xhtml b/src/java/DmWebPortal/web/views/policyProperty/view.xhtml deleted file mode 100644 index 00e7d0193fe961818b97fa6d5510fd30c2a8472e..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyProperty/view.xhtml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Policy Property View</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{policyPropertyController.notSelected()}" /> - - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="viewPolicyPropertyForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Policy Type: #{policyTypeController.current.name} <br/> - Policy Property: #{policyPropertyController.current.name}</h1> - </div> - - <ui:param name="policyPropertyObject" value="#{policyPropertyController.selected}"/> - <p:accordionPanel multiple="true" activeIndex="0,1" > - <p:tab title="Policy Property Description"> - <div class="middleCenterLeftContent"> - <ui:include src="private/policyPropertyViewPanelGrid.xhtml"/> - </div> - </p:tab> - - <p:tab title="Allowed Policy Values"> - <ui:include src="/views/allowedPolicyValue/private/allowedPolicyValueListDataTable.xhtml"/> - </p:tab> - </p:accordionPanel> - - <p/> - - <div class="actionButton"> - <p:commandButton action="#{policyPropertyController.prepareEdit(policyPropertyObject)}" rendered="#{loginController.admin}" value="Edit" alt="Edit" icon="ui-icon-pencil"/> - <p:commandButton action="#{policyPropertyController.prepareList()}" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - </div> - </h:form> - - </ui:define> - </ui:composition> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/policyType/edit.xhtml b/src/java/DmWebPortal/web/views/policyType/edit.xhtml deleted file mode 100644 index 9f61558ea5e3e63529743ecbcd46b90e61c7993a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyType/edit.xhtml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Policy Type Edit</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{policyTypeController.notSelected()}" /> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="editPolicyTypeForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Edit #{policyTypeController.current.name} Policy Type</h1> - </div> - - - <ui:param name="policyTypeObject" value="#{policyTypeController.selected}"/> - <p:accordionPanel multiple="true" activeIndex="0,1" > - <p:tab title="Policy Type Description"> - <div class="middleCenterLeftContent"> - <ui:include src="private/policyTypeEditPanelGrid.xhtml"/> - </div> - </p:tab> - - <p:tab title="Properties"> - <ui:include src="/views/policyProperty/private/policyPropertyListEditDataTable.xhtml"/> - </p:tab> - </p:accordionPanel> - - <p/> - - <div class="actionButton"> - <p:commandButton action="#{policyTypeController.update()}" actionListener="#{policyPropertyController.clear()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{policyTypeController.prepareList()}" immediate="true" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - </div> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/policyType/list.xhtml b/src/java/DmWebPortal/web/views/policyType/list.xhtml deleted file mode 100644 index 1b4e390fcc208acbde8fa1569ffc237e130416ad..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyType/list.xhtml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Policy Types List</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Policy Types</h1> - </div> - - <h:form id="viewEntityTypeListForm"> - <ui:param name="entityController" value="#{policyTypeController}"/> - - <div class="actionButton"> - <p:commandButton id="#{entityTypeName}ResetFiltersButton" action="#{entityController.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight"> - <p:tooltip for="#{entityTypeName}ResetFiltersButton" value="Reset list filters."/> - </p:commandButton> - <p:commandButton id="#{entityTypeName}NoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="#{entityTypeName}NoOp"/> - </div> - - <h:panelGroup> - <ui:include src="private/policyTypeListDataTable.xhtml"/> - </h:panelGroup> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/policyType/private/policyTypeEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyType/private/policyTypeEditPanelGrid.xhtml deleted file mode 100644 index b941d5dfb255a6429cf65dd4668dd103d87c83a9..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyType/private/policyTypeEditPanelGrid.xhtml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="policyTypeObject" value="#{policyTypeController.current}"/> - - <p:panelGrid columns="2" styleClass="editEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{policyTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{policyTypeObject.description}" title="Description" styleClass="entityDataInputText"/> - - </p:panelGrid> -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/policyType/private/policyTypeListDataTable.xhtml b/src/java/DmWebPortal/web/views/policyType/private/policyTypeListDataTable.xhtml deleted file mode 100644 index e834cd87ae3403b860f0dbf4ccff666e1f0b807e..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyType/private/policyTypeListDataTable.xhtml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <p:dataTable id="policyTypeListDataTable" - var="policyTypeObject" - value="#{policyTypeController.listDataModel}" - filteredValue="#{policyTypeController.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="25" - binding="#{policyTypeController.listDataTable}" - widgetVar="policyTypeListWidget" - emptyMessage="No role types found." > - - - <p:column sortBy="#{policyTypeObject.id}" headerText="Id" > - <h:outputText value="#{policyTypeObject.id}"/> - </p:column> - - <p:column sortBy="#{policyTypeObject.name}" headerText="Policy Type" - filterBy="#{policyTypeObject.name}" filterMatchMode="contains" > - <h:outputText value="#{policyTypeObject.name}"/> - </p:column> - - <p:column sortBy="#{policyTypeObject.description}" headerText="Description" - filterBy="#{policyTypeObject.description}" filterMatchMode="contains"> - <h:outputText value="#{policyTypeObject.description}"/> - </p:column> - - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink action="#{policyTypeController.prepareView(policyTypeObject)}" actionListener="#{policyPropertyController.setPolicyType(policyTypeObject)}" styleClass="ui-icon ui-icon-info" title="View"/> - <p:commandLink action="#{policyTypeController.prepareEdit(policyTypeObject)}" actionListener="#{policyPropertyController.setPolicyType(policyTypeObject)}" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-pencil" title="Edit"/> - </div> - </p:column> - </p:dataTable> - -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/policyType/private/policyTypeViewPanelGrid.xhtml b/src/java/DmWebPortal/web/views/policyType/private/policyTypeViewPanelGrid.xhtml deleted file mode 100644 index 25855c5caf4697f6330f7be5cd37486d7f8eb8a3..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyType/private/policyTypeViewPanelGrid.xhtml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="policyTypeObject" value="#{policyTypeController.current}"/> - - <p:panelGrid columns="2" styleClass="viewEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{policyTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:outputText id="description" value="#{policyTypeObject.description}" title="Description" styleClass="entityDataText"/> - - </p:panelGrid> - -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/policyType/view.xhtml b/src/java/DmWebPortal/web/views/policyType/view.xhtml deleted file mode 100644 index 651f139104f39e8171b347eaf38bbf7de1ff4c93..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/policyType/view.xhtml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Policy Type View</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{policyTypeController.notSelected()}" /> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="viewPolicyTypeForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Policy Type: #{policyTypeController.current.name}</h1> - </div> - - <ui:param name="policyTypeObject" value="#{policyTypeController.selected}"/> - <p:accordionPanel multiple="true" activeIndex="0,1" > - <p:tab title="Policy Type Description"> - <div class="middleCenterLeftContent"> - <ui:include src="private/policyTypeViewPanelGrid.xhtml"/> - </div> - </p:tab> - - <p:tab title="Properties"> - <ui:include src="../policyProperty/private/policyPropertyListDataTable.xhtml"/> - </p:tab> - </p:accordionPanel> - - <p/> - - <div class="actionButton"> - <p:commandButton action="#{policyTypeController.prepareEdit(policyTypeObject)}" rendered="#{loginController.admin}" value="Edit" alt="Edit" icon="ui-icon-pencil"/> - <p:commandButton action="#{policyTypeController.prepareList()}" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - </div> - </h:form> - - </ui:define> - </ui:composition> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/roleType/edit.xhtml b/src/java/DmWebPortal/web/views/roleType/edit.xhtml deleted file mode 100644 index c9da4b7e4c2083b41483421242af1524bda3f479..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/roleType/edit.xhtml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Role Type Edit</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{roleTypeController.notSelected()}" /> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="editRoleTypeForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Edit Role Type</h1> - </div> - - <ui:include src="private/roleTypeEditPanelGrid.xhtml"/> - <p/> - <div class="actionButton"> - <p:commandButton action="#{roleTypeController.update()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{roleTypeController.prepareList()}" immediate="true" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - </div> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/roleType/list.xhtml b/src/java/DmWebPortal/web/views/roleType/list.xhtml deleted file mode 100644 index 0d37c406803058b06c04b3b03cd3ebc7a6126cf0..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/roleType/list.xhtml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Role Types List</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Role Types</h1> - </div> - - <h:form id="viewRoleTypeListForm"> - <ui:param name="entityController" value="#{roleTypeController}"/> - - <div class="actionButton"> - <p:commandButton id="#{entityTypeName}ResetFiltersButton" action="#{entityController.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight"> - <p:tooltip for="#{entityTypeName}ResetFiltersButton" value="Reset list filters."/> - </p:commandButton> - <p:commandButton id="#{entityTypeName}NoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="#{entityTypeName}NoOp"/> - </div> - - <h:panelGroup> - <ui:include src="private/roleTypeListDataTable.xhtml"/> - </h:panelGroup> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/roleType/private/roleTypeCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/roleType/private/roleTypeCreatePanelGrid.xhtml deleted file mode 100644 index d7a33d08ac87445f282817f95c0690d9e2b3e5df..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/roleType/private/roleTypeCreatePanelGrid.xhtml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="roleTypeObject" value="#{roleTypeController.selected}"/> - - <p:panelGrid columns="2" styleClass="createEntityDetails"> - - <h:outputLabel for="name" value="Role Name" styleClass="entityDataEmphasizedLabel"/> - <h:inputText id="name" value="#{roleTypeObject.name}" title="Role Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{roleTypeObject.description}" title="Description" styleClass="entityDataText"/> - - </p:panelGrid> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/roleType/private/roleTypeEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/roleType/private/roleTypeEditPanelGrid.xhtml deleted file mode 100644 index 3fea8f8c0836966a3385c22bb36e5eabaf00e697..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/roleType/private/roleTypeEditPanelGrid.xhtml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <ui:param name="roleTypeObject" value="#{roleTypeController.selected}"/> - - <p:panelGrid columns="2" styleClass="editEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{roleTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{roleTypeObject.description}" title="Description" styleClass="entityDataInputText"/> - - </p:panelGrid> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/roleType/private/roleTypeListDataTable.xhtml b/src/java/DmWebPortal/web/views/roleType/private/roleTypeListDataTable.xhtml deleted file mode 100644 index 50023cedba3984e7c0a40e2a1256fcc52a74c7a6..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/roleType/private/roleTypeListDataTable.xhtml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <p:dataTable id="roleTypeListDataTable" - var="roleTypeObject" - value="#{roleTypeController.listDataModel}" - filteredValue="#{roleTypeController.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{roleTypeController.rows}" - binding="#{roleTypeController.listDataTable}" - widgetVar="roleTypeListWidget" - emptyMessage="No role types found." > - - - <p:column sortBy="#{roleTypeObject.id}" headerText="Id" > - <h:outputText value="#{roleTypeObject.id}"/> - </p:column> - - <p:column sortBy="#{roleTypeObject.name}" headerText="Role Type" - filterBy="#{roleTypeObject.name}" filterMatchMode="contains" > - <h:outputText value="#{roleTypeObject.name}"/> - </p:column> - - <p:column sortBy="#{roleTypeObject.description}" headerText="Description" - filterBy="#{roleTypeObject.description}" filterMatchMode="contains"> - <h:outputText value="#{roleTypeObject.description}"/> - </p:column> - <ui:param name="isAdmin" value="#{loginController.admin}" /> - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink action="#{roleTypeController.prepareView(roleTypeObject)}" styleClass="ui-icon ui-icon-info" title="View"/> - <p:commandLink action="#{roleTypeController.prepareEdit(roleTypeObject)}" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-pencil" title="Edit"/> - <p:commandLink action="#{userSystemRoleController.prepareSystemRoleView()}" rendered="#{roleTypeController.isRoleSystemType(roleTypeObject) and isAdmin}" styleClass="ui-icon ui-icon-person" title="List All" > - <f:setPropertyActionListener value="#{roleTypeObject}" target="#{userSystemRoleController.systemRole}"/> - </p:commandLink> - </div> - </p:column> - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/roleType/private/roleTypeViewPanelGrid.xhtml b/src/java/DmWebPortal/web/views/roleType/private/roleTypeViewPanelGrid.xhtml deleted file mode 100644 index 2e4932aa51aea925c2a0ae09c68a7b09b989cf8d..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/roleType/private/roleTypeViewPanelGrid.xhtml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="roleTypeObject" value="#{roleTypeController.selected}"/> - - <p:panelGrid columns="2" styleClass="viewEntityDetails"> - - <h:outputLabel for="name" value="Name" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="name" value="#{roleTypeObject.name}" title="Name" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:outputText id="description" value="#{roleTypeObject.description}" title="Description" styleClass="entityDataText"/> - - </p:panelGrid> - -</ui:composition> \ No newline at end of file diff --git a/src/java/DmWebPortal/web/views/roleType/view.xhtml b/src/java/DmWebPortal/web/views/roleType/view.xhtml deleted file mode 100644 index bac73fb5be2a03e1ce1d8064f347c483fc0dc627..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/roleType/view.xhtml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Role Type View</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{roleTypeController.notSelected()}" /> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="viewRoleTypeForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Role Type Details</h1> - </div> - - <ui:include src="private/roleTypeViewPanelGrid.xhtml"/> - - <p/> - <ui:param name="roleTypeObject" value="#{roleTypeController.selected}"/> - <div class="actionButton"> - <p:commandButton action="#{roleTypeController.prepareEdit(roleTypeObject)}" rendered="#{loginController.admin}" value="Edit" alt="Edit" icon="ui-icon-pencil"/> - <p:commandButton action="#{roleTypeController.prepareList()}" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - </div> - - </h:form> - - </ui:define> - </ui:composition> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userInfo/create.xhtml b/src/java/DmWebPortal/web/views/userInfo/create.xhtml deleted file mode 100644 index ca5904f6f603dd8b9ef806c9a2940c990e511ba9..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/create.xhtml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>User Create</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Add User</h1> - </div> - - <h:form id="addUserInfoForm"> - - <ui:include src="private/userInfoCreatePanelGrid.xhtml"/> - - <p/> - <div class="actionButton"> - <p:commandButton action="#{userInfoController.create()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{userInfoController.prepareList()}" immediate="true" value="Cancel" alt="Cancel" icon="ui-icon-cancel"/> - </div> - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userInfo/edit.xhtml b/src/java/DmWebPortal/web/views/userInfo/edit.xhtml deleted file mode 100644 index ccc9f04be5ea12598ca439905bd1bc05172f6fc9..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/edit.xhtml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>User Edit</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{userInfoController.notSelected()}" /> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="editUserInfoForm"> - - <div class="middleCenterLeftContent"> - <div class="pageTitle"> - <h1>Edit User #{userInfoController.current.username}</h1> - </div> - - <ui:include src="private/userInfoEditPanelGrid.xhtml"/> - <p/> - <div class="actionButton"> - <p:commandButton action="#{userInfoController.update()}" value="Save" alt="Save" icon="ui-icon-check" update="@form"/> - <p:commandButton action="#{userInfoController.prepareList()}" immediate="true" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - </div> - <div class="middleCenterRightContent"> - - </div> - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userInfo/list.xhtml b/src/java/DmWebPortal/web/views/userInfo/list.xhtml deleted file mode 100644 index 0fea12ecda0b199d719f1294945b76f9be4fc645..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/list.xhtml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>Users List</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Registered Users</h1> - </div> - - <h:form id="viewUserInfoListForm"> - <ui:param name="entityController" value="#{userInfoController}"/> - <ui:include src="../common/commonListActionButtons.xhtml"/> - - <h:panelGroup> - <ui:include src="private/userInfoListDataTable.xhtml"/> - </h:panelGroup> - - <ui:include src="private/userInfoDestroyDialog.xhtml"/> - - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/userInfo/private/userExperimentsListDataTable.xhtml b/src/java/DmWebPortal/web/views/userInfo/private/userExperimentsListDataTable.xhtml deleted file mode 100644 index aa87e3badbddea857dc741b7cc723b7ab8a9c876..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/private/userExperimentsListDataTable.xhtml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <div> - <p:commandButton id="ResetFiltersButton" action="#{userInfoController.userExperimentsListTable.resetList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight" oncomplete="PF('userExperimentsListWidget').clearFilters()" update="userExperimentsListDataTable"> - <p:tooltip for="ResetFiltersButton" value="Reset filters."/> - </p:commandButton> - <p:commandButton id="#{entityTypeName}NoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="#{entityTypeName}NoOp"/> - </div> - - <p:dataTable id="userExperimentsListDataTable" - var="userExperimentObject" - value="#{userInfoController.userExperimentsListTable.listDataModel}" - filteredValue="#{userInfoController.userExperimentsListTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{userInfoController.rows}" - binding="#{userInfoController.userExperimentsListTable.listDataTable}" - widgetVar="userExperimentsListWidget" - emptyMessage="No experiments found."> - - <p:column sortBy="#{userExperimentObject.experimentName}" headerText="Experiment Name" - filterBy="#{userExperimentObject.experimentName}" filterMatchMode="contains" > - <h:outputText value="#{userExperimentObject.experimentName}"/> - </p:column> - - <p:column sortBy="#{userExperimentObject.description}" headerText="Description" - filterBy="#{userExperimentObject.description}" filterMatchMode="contains" > - <h:outputText value="#{userExperimentObject.description}"/> - </p:column> - - - <p:column sortBy="#{!userExperimentObject.isManager}" headerText="Manager"> - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{userExperimentObject.isManager}" /> - </p:column> - - <p:column sortBy="#{!userExperimentObject.isPI}" headerText="Principal Investigator"> - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{userExperimentObject.isPI}" /> - </p:column> - - <p:column sortBy="#{!userExperimentObject.isUser}" headerText="User"> - <h:outputText value="" styleClass="ui-icon ui-icon-check" rendered="#{userExperimentObject.isUser}" /> - </p:column> - - - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/userInfo/private/userInfoCreatePanelGrid.xhtml b/src/java/DmWebPortal/web/views/userInfo/private/userInfoCreatePanelGrid.xhtml deleted file mode 100644 index 54d501f7ceb06251eaa5ecb1e25b71f36948965f..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/private/userInfoCreatePanelGrid.xhtml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="userInfoObject" value="#{userInfoController.selected}"/> - - <p:panelGrid columns="2" styleClass="createEntityDetails"> - - <h:outputLabel for="badge" value="Badge" styleClass="entityDataEmphasizedLabel"/> - <h:inputText id="badge" value="#{userInfoObject.badge}" title="Badge" styleClass="entityDataEmphasizedInputText"/> - - <h:outputLabel for="username" value="Username" styleClass="entityDataEmphasizedLabel"/> - <h:inputText id="username" value="#{userInfoObject.username}" title="Username" styleClass="entityDataEmphasizedInputText"/> - - <h:outputLabel for="lastName" value="Last Name" styleClass="entityDataLabel"/> - <h:inputText id="lastName" value="#{userInfoObject.lastName}" title="Last Name" styleClass="entityDataInputText"/> - - <h:outputLabel for="firstName" value="First Name" styleClass="entityDataLabel"/> - <h:inputText id="firstName" value="#{userInfoObject.firstName}" title="First Name" styleClass="entityDataInputText"/> - - <h:outputLabel for="middleName" value="Middle Name" styleClass="entityDataLabel"/> - <h:inputText id="middleName" value="#{userInfoObject.middleName}" title="Middle Name" styleClass="entityDataInputText"/> - - <h:outputLabel for="email" value="Email" styleClass="entityDataLabel"/> - <h:inputText id="email" value="#{userInfoObject.email}" title="Email" styleClass="entityDataInputText"/> - - <h:outputLabel for="password" value="Password" styleClass="entityDataLabel"/> - <p:password id="password" value="#{userInfoController.passwordEntry}" title="Password" feedback="true" styleClass="entityDataInputText"/> - - <h:outputLabel for="globusUsername" value="Globus Username" styleClass="entityDataEmphasizedLabel"/> - <h:inputText id="globusUsername" value="#{userInfoObject.globusUsername}" title="Globus Username" styleClass="entityDataEmphasizedInputText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{userInfoObject.description}" title="Description" styleClass="entityDataInputText"/> - - </p:panelGrid> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userInfo/private/userInfoDestroyDialog.xhtml b/src/java/DmWebPortal/web/views/userInfo/private/userInfoDestroyDialog.xhtml deleted file mode 100644 index 39998e9fe36edf2782714910cd9057bb7ce9c683..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/private/userInfoDestroyDialog.xhtml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <p:confirmDialog id="userInfoDestroyDialog" message="Delete user #{userInfoController.getCurrentEntityInstanceName()}?" - header="Delete User" severity="alert" widgetVar="userInfoDestroyDialogWidget" - styleClass="dialog"> - <p:commandButton value="Yes" oncomplete="userInfoDestroyDialogWidget.hide()" action="#{userInfoController.destroy()}"/> - <p:commandButton value="No" onclick="PF('userInfoDestroyDialogWidget').hide()" type="button" /> - </p:confirmDialog> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userInfo/private/userInfoEditPanelGrid.xhtml b/src/java/DmWebPortal/web/views/userInfo/private/userInfoEditPanelGrid.xhtml deleted file mode 100644 index 5fa8e60f40bfee8d14b152819c58257e3e7391cb..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/private/userInfoEditPanelGrid.xhtml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="userInfoObject" value="#{userInfoController.selected}"/> - <ui:param name="isFieldWriteable" value="#{loginController.loggedIn}"/> - - <p:panelGrid columns="2" styleClass="editEntityDetails"> - - - <h:outputLabel for="badge" value="Badge" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="badge" value="#{userInfoObject.badge}" title="Badge" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="username" value="Username" styleClass="entityDataEmphasizedLabel"/> - <h:inputText id="username" value="#{userInfoObject.username}" rendered="#{isFieldWriteable}" title="Username" styleClass="entityDataEmphasizedInputText"/> - <h:outputText id="usernameOutput" value="#{userInfoObject.username}" rendered="#{!isFieldWriteable}" title="Username" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="lastName" value="Last Name" styleClass="entityDataLabel"/> - <h:inputText id="lastName" value="#{userInfoObject.lastName}" rendered="#{isFieldWriteable}" title="Last Name" styleClass="entityDataInputText"/> - <h:outputText id="lastNameOutput" value="#{userInfoObject.lastName}" rendered="#{!isFieldWriteable}" title="Last Name" styleClass="entityDataText"/> - - <h:outputLabel for="firstName" value="First Name" styleClass="entityDataLabel"/> - <h:inputText id="firstName" value="#{userInfoObject.firstName}" rendered="#{isFieldWriteable}" title="First Name" styleClass="entityDataInputText"/> - <h:outputText id="firstNameOutput" value="#{userInfoObject.firstName}" rendered="#{!isFieldWriteable}" title="First Name" styleClass="entityDataText"/> - - <h:outputLabel for="middleName" value="Middle Name" styleClass="entityDataLabel"/> - <h:inputText id="middleName" value="#{userInfoObject.middleName}" title="Middle Name" rendered="#{isFieldWriteable}" styleClass="entityDataInputText"/> - <h:outputText id="middleNameOutput" value="#{userInfoObject.middleName}" title="Middle Name" rendered="#{!isFieldWriteable}" styleClass="entityDataText"/> - - <h:outputLabel for="email" value="Email" styleClass="entityDataLabel"/> - <h:inputText id="email" value="#{userInfoObject.email}" title="Email" styleClass="entityDataInputText"/> - - <h:outputLabel for="password" value="Password" styleClass="entityDataLabel" rendered="#{userInfoObject.isLocalUser()}"/> - <p:password id="password" rendered="#{userInfoObject.isLocalUser()}" value="#{userInfoController.passwordEntry}" title="Password" feedback="true" styleClass="entityDataInputText"/> - - <h:outputLabel for="globusUsername" value="Globus Username" styleClass="entityDataLabel"/> - <h:inputText id="globusUsername" value="#{userInfoObject.globusUsername}" title="Globus Username" styleClass="entityDataInputText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:inputText id="description" value="#{userInfoObject.description}" title="Description" styleClass="entityDataInputText"/> - - </p:panelGrid> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userInfo/private/userInfoListDataTable.xhtml b/src/java/DmWebPortal/web/views/userInfo/private/userInfoListDataTable.xhtml deleted file mode 100644 index db1831e6faa52223713c7a84a0453aabe31f2bb4..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/private/userInfoListDataTable.xhtml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <p:dataTable id="userInfoListDataTable" - var="userInfoObject" - value="#{userInfoController.listDataModel}" - filteredValue="#{userInfoController.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{userInfoController.rows}" - binding="#{userInfoController.listDataTable}" - widgetVar="userInfoListWidget" - emptyMessage="No users found."> - - <p:column sortBy="#{userInfoObject.id}" headerText="Id" > - <h:outputText value="#{userInfoObject.id}"/> - </p:column> - - <p:column sortBy="#{userInfoObject.badge}" headerText="ANL Badge" - filterBy="#{userInfoObject.badge}" filterMatchMode="contains" > - <h:outputText value="#{userInfoObject.badge}"/> - </p:column> - - <p:column sortBy="#{userInfoObject.username}" headerText="Username" - filterBy="#{userInfoObject.username}" filterMatchMode="contains" > - <h:outputText value="#{userInfoObject.username}"/> - </p:column> - - <p:column sortBy="#{userInfoObject.lastName}" headerText="Last Name" - filterBy="#{userInfoObject.lastName}" filterMatchMode="contains" > - <h:outputText value="#{userInfoObject.lastName}"/> - </p:column> - - <p:column sortBy="#{userInfoObject.firstName}" headerText="First, middle Name" - filterBy="#{userInfoObject.firstName}" filterMatchMode="contains" > - <h:outputText value="#{userInfoObject.firstName} #{userInfoObject.middleName}"/> - </p:column> - - <p:column sortBy="#{userInfoObject.email}" headerText="Email" - filterBy="#{userInfoObject.email}" filterMatchMode="contains" > - <h:outputText value="#{userInfoObject.email}"/> - </p:column> - - <p:column sortBy="#{userInfoObject.globusUsername}" headerText="Globus username" - filterBy="#{userInfoObject.globusUsername}" filterMatchMode="contains"> - <h:outputText value="#{userInfoObject.globusUsername}"/> - </p:column> - - <p:column sortBy="#{userInfoObject.description}" headerText="Description" - filterBy="#{userInfoObject.description}" filterMatchMode="contains"> - <h:outputText value="#{userInfoObject.description}"/> - </p:column> - - <p:column headerText="Actions" > - <div class="actionLink"> - <p:commandLink action="#{userInfoController.prepareView(userInfoObject)}" styleClass="ui-icon ui-icon-info" title="View"> - <f:setPropertyActionListener value="#{userInfoObject}" target="#{userInfoController.current}"/> - </p:commandLink> - <p:commandLink action="#{userInfoController.prepareEdit(userInfoObject)}" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-pencil" title="Edit"/> - <p:commandLink oncomplete="PF('userInfoDestroyDialogWidget').show()" rendered="#{loginController.admin}" styleClass="ui-icon ui-icon-trash" title="Delete" update="@form"> - <f:setPropertyActionListener value="#{userInfoObject}" target="#{userInfoController.current}"/> - </p:commandLink> - </div> - </p:column> - </p:dataTable> - -</ui:composition> diff --git a/src/java/DmWebPortal/web/views/userInfo/private/userInfoViewPanelGrid.xhtml b/src/java/DmWebPortal/web/views/userInfo/private/userInfoViewPanelGrid.xhtml deleted file mode 100644 index 456d95e9ef8a6f4757663c4d3f9ec6a310a10185..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/private/userInfoViewPanelGrid.xhtml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <ui:param name="userInfoObject" value="#{userInfoController.selected}"/> - <p:panelGrid columns="2" styleClass="viewEntityDetails"> - - <h:outputLabel for="badge" value="Badge" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="badge" value="#{userInfoObject.badge}" title="Badge" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="username" value="Username" styleClass="entityDataEmphasizedLabel"/> - <h:outputText id="username" value="#{userInfoObject.username}" title="Username" styleClass="entityDataEmphasizedText"/> - - <h:outputLabel for="lastName" value="Last Name" styleClass="entityDataLabel"/> - <h:outputText id="lastName" value="#{userInfoObject.lastName}" title="Last Name" styleClass="entityDataText"/> - - <h:outputLabel for="firstName" value="First Name" styleClass="entityDataLabel"/> - <h:outputText id="firstName" value="#{userInfoObject.firstName}" title="First Name" styleClass="entityDataText"/> - - <h:outputLabel for="middleName" value="Middle Name" styleClass="entityDataLabel"/> - <h:outputText id="middleName" value="#{userInfoObject.middleName}" title="Middle Name" styleClass="entityDataText"/> - - <h:outputLabel for="email" value="Email" styleClass="entityDataLabel"/> - <h:outputText id="email" value="#{userInfoObject.email}" title="Email" styleClass="entityDataText"/> - - <h:outputLabel for="uglobusUsername" value="Globus Username" styleClass="entityDataLabel"/> - <h:outputText id="globusUsername" value="#{userInfoObject.globusUsername}" title="Globus Username" styleClass="entityDataText"/> - - <h:outputLabel for="description" value="Description" styleClass="entityDataLabel"/> - <h:outputText id="description" value="#{userInfoObject.description}" title="Description" styleClass="entityDataText"/> - - </p:panelGrid> - -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userInfo/view.xhtml b/src/java/DmWebPortal/web/views/userInfo/view.xhtml deleted file mode 100644 index d11c5183702baf9056f7960fe1c65a246da0d78a..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userInfo/view.xhtml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>User View</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="noBack.js" rendered="#{userInfoController.notSelected()}" /> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <h:form id="viewUserInfoForm"> - <div class="pageTitle"> - <h1>User #{userInfoController.current.username}</h1> - </div> - - <ui:param name="userInfoObject" value="#{userInfoController.current}"/> - <p:accordionPanel multiple="true" activeIndex="0,1" > - <p:tab title="User Properties"> - <div class="middleCenterLeftContent"> - <ui:include src="private/userInfoViewPanelGrid.xhtml"/> - </div> - </p:tab> - - <p:tab title="User Experiments"> - <ui:include src="private/userExperimentsListDataTable.xhtml"/> - </p:tab> - </p:accordionPanel> - - <p/> - - <div class="actionButton"> - <p:commandButton action="#{userInfoController.prepareEdit(userInfoObject)}" rendered="#{loginController.admin}" value="Edit" alt="Edit" icon="ui-icon-pencil"/> - <p:commandButton onclick="PF('userInfoDestroyDialogWidget').show();" rendered="#{loginController.admin}" value="Delete" alt="Delete" icon="ui-icon-trash"> - <f:setPropertyActionListener value="#{userInfoObject}" target="#{userInfoController.current}"/> - </p:commandButton> - <p:commandButton action="#{userInfoController.prepareList()}" value="Return" alt="Return" icon="ui-icon-arrowreturnthick-1-w"/> - </div> - - <ui:include src="private/userInfoDestroyDialog.xhtml"/> - - </h:form> - </ui:define> - - </ui:composition> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userSystemRole/list.xhtml b/src/java/DmWebPortal/web/views/userSystemRole/list.xhtml deleted file mode 100644 index 0a565aff0268e051c72eaef4ddb102f3c440488d..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userSystemRole/list.xhtml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <title>User System Roles List</title> - - <h:outputScript library="js/common" name="forwardNotLoggedin.js" rendered="#{!loginController.loggedIn}"/> - <h:outputScript library="js/common" name="forwardNotAuthorized.js" rendered="#{!loginController.admin}"/> - <ui:composition template="../../templates/dmViewTemplate.xhtml"> - <ui:define name="middleCenter"> - <div class="pageTitle"> - <h1>Administrators</h1> - </div> - - <h:form id="adminListForm"> - <div class="actionButton"> - - <p:commandButton id="systemRoleAddButton" value="Add" onclick="PF('systemRoleAddDialogWidget').show();" rendered="#{loginController.admin}" icon="ui-icon-plus" > - <p:tooltip for="systemRoleAddButton" value="Add new Administrators."/> - </p:commandButton> - - <p:commandButton id="ResetFiltersButton" action="#{userSystemRoleController.resetSystemRoleUserList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight"> - <p:tooltip for="ResetFiltersButton" value="Reset list filters."/> - </p:commandButton> - <p:commandButton id="#{entityTypeName}NoOp" style="visibility:hidden" value="NoOp"/> - <p:defaultCommand target="#{entityTypeName}NoOp"/> - </div> - - <h:panelGroup> - <ui:include src="private/systemRoleListDataTable.xhtml"/> - </h:panelGroup> - - <ui:include src="private/systemRoleRemoveDialog.xhtml" /> - <ui:include src="private/systemRoleAddDialog.xhtml"/> - </h:form> - - </ui:define> - </ui:composition> -</ui:composition> - diff --git a/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleAddDialog.xhtml b/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleAddDialog.xhtml deleted file mode 100644 index 2ca501e039ea1a9bd906ea5a75683e48cefaaed2..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleAddDialog.xhtml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:h="http://xmlns.jcp.org/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - - - - <p:dialog id="adminAddDialog" - header="Add Administrators" widgetVar="systemRoleAddDialogWidget" dynamic="true" styleClass="dialog" width="800"> - - <div class="actionButton"> - <p:commandButton id="ResetFilters" actionListener="#{userSystemRoleController.noSystemRoleTable.resetFilterList()}" alt="Clear Filters" icon="ui-icon-refresh" styleClass="actionButtonRight" oncomplete="PF('systemRoleAddDialogWidget').show()" update="adminAddDialog" > - <p:tooltip for="ResetFilters" value="Reset list filters."/> - </p:commandButton> - <p:commandButton id="systemRoleNoOp" style="visibility:hidden" value="SNoOp"/> - </div> - - <div> - <p:dataTable id="addSystemRoleList" - var="adminUser" - value="#{userSystemRoleController.noSystemRoleTable.listDataModel}" - filteredValue="#{userSystemRoleController.noSystemRoleTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{userSystemRoleController.rows}" - binding="#{userSystemRoleController.noSystemRoleTable.listDataTable}" - selection="#{userSystemRoleController.noSystemRoleTable.selectedObjectList}" - rowKey="#{adminUser.username}" - widgetVar="systemRoleAddTableWidgetVar" - emptyMessage="No users to add." - rowSelectMode="true" - selectionMode="multiple" > - - <p:column sortBy="#{systemUserObject.badge}" headerText="ANL badge" - filterBy="#{systemUserObject.badge}" filterMatchMode="contains" > - <h:outputText value="#{systemUserObject.badge}"/> - </p:column> - - <p:column sortBy="#{adminUser.username}" headerText="Username" - filterBy="#{adminUser.username}" filterMatchMode="contains" > - <h:outputText value="#{adminUser.username}"/> - </p:column> - - <p:column sortBy="#{adminUser.lastName}" headerText="Last Name" - filterBy="#{adminUser.lastName}" filterMatchMode="contains" > - <h:outputText value="#{adminUser.lastName}"/> - </p:column> - - <p:column sortBy="#{adminUser.firstName}" headerText="First Name" - filterBy="#{adminUser.firstName}" filterMatchMode="contains" > - <h:outputText value="#{adminUser.firstName}"/> - </p:column> - - <p:column sortBy="#{adminUser.email}" headerText="Email" - filterBy="#{adminUser.email}" filterMatchMode="contains" > - <h:outputText value="#{adminUser.email}"/> - </p:column> - - <f:facet name="footer"> - <p:commandButton value="Add" action="#{userSystemRoleController.addSystemRole()}" oncomplete="PF('systemRoleAddDialogWidget').hide()" /> - <p:commandButton value="Clear Selection" onclick="PF('systemRoleAddTableWidgetVar').unselectAllRows()" /> - </f:facet> - </p:dataTable> - </div> - </p:dialog> -</ui:composition> - - diff --git a/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleListDataTable.xhtml b/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleListDataTable.xhtml deleted file mode 100644 index 88a49ca778118c3c0c22ba5225a3fecca53cc849..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleListDataTable.xhtml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:p="http://primefaces.org/ui" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> - - <p:dataTable id="systemRoleListDataTable" - var="systemUserObject" - value="#{userSystemRoleController.systemRoleTable.listDataModel}" - filteredValue="#{userSystemRoleController.systemRoleTable.filteredObjectList}" - paginator="true" - paginatorAlwaysVisible="false" - rows="#{userSystemRoleController.rows}" - binding="#{userSystemRoleController.systemRoleTable.listDataTable}" - widgetVar="systemRoleListWidget" - emptyMessage="No users found." - tableStyleClass="systemRoleTable"> - - <p:column sortBy="#{systemUserObject.id}" headerText="Id" > - <h:outputText value="#{systemUserObject.id}"/> - </p:column> - - <p:column sortBy="#{systemUserObject.badge}" headerText="ANL badge" - filterBy="#{systemUserObject.badge}" filterMatchMode="contains" > - <h:outputText value="#{systemUserObject.badge}"/> - </p:column> - - <p:column sortBy="#{systemUserObject.username}" headerText="Username" - filterBy="#{systemUserObject.username}" filterMatchMode="contains" > - <h:outputText value="#{systemUserObject.username}"/> - </p:column> - - <p:column sortBy="#{systemUserObject.lastName}" headerText="Last Name" - filterBy="#{systemUserObject.lastName}" filterMatchMode="contains" > - <h:outputText value="#{systemUserObject.lastName}"/> - </p:column> - - <p:column sortBy="#{systemUserObject.firstName}" headerText="First Name" - filterBy="#{systemUserObject.firstName}" filterMatchMode="contains" > - <h:outputText value="#{systemUserObject.firstName}"/> - </p:column> - - <p:column sortBy="#{systemUserObject.email}" headerText="Email" - filterBy="#{systemUserObject.email}" filterMatchMode="contains" > - <h:outputText value="#{systemUserObject.email}"/> - </p:column> - - - <p:column headerText="Actions" > - <div class="actionLink" > - <p:commandLink oncomplete="PF('systemRoleRemoveDialogWidget').show()" rendered="#{loginController.admin and (loginController.username != systemUserObject.username)}" styleClass="ui-icon ui-icon-trash" title="Remove" update="@form" > - <f:setPropertyActionListener value="#{systemUserObject}" target="#{userSystemRoleController.systemRoleTable.currentObject}" /> - </p:commandLink> - </div> - </p:column> - - </p:dataTable> - -</ui:composition> - diff --git a/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleRemoveDialog.xhtml b/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleRemoveDialog.xhtml deleted file mode 100644 index e446137d5c33be037b97f2e39ab430e6609ae6dc..0000000000000000000000000000000000000000 --- a/src/java/DmWebPortal/web/views/userSystemRole/private/systemRoleRemoveDialog.xhtml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:p="http://primefaces.org/ui" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - - <p:confirmDialog id="systemRoleRemoveDialog" message="Remove #{userSystemRoleController.getSystemRoleName()} Role for user #{userSystemRoleController.systemRoleTable.currentObject.username}?" - header="Remove System Role" severity="alert" widgetVar="systemRoleRemoveDialogWidget" - styleClass="dialog"> - <p:commandButton value="Yes" oncomplete="systemRoleRemoveDialogWidget.hide()" action="#{userSystemRoleController.removeSystemRole()}"/> - <p:commandButton value="No" onclick="PF('systemRoleRemoveDialogWidget').hide()" type="button" /> - </p:confirmDialog> -</ui:composition>