Index: lams_admin/build.properties =================================================================== diff -u --- lams_admin/build.properties (revision 0) +++ lams_admin/build.properties (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,59 @@ +# Ant properties for building the lams survey tool + +#name of this project +name=lams_admin + +# Library directory within project. Where third party jars reside. +lams_commondir=../lams_common +lib.dir=${basedir}/lib +common.lib.dir=${lams_commondir}/lib +common.build.dir=${lams_commondir}/build/classes + +# Source directory under the current root +src.dir=${basedir}/src +src.dir.java=${src.dir}/java +test.dir=${basedir}/test +test.dir.java=${test.dir}/java + +# Build directory +build=${basedir}/build +build.classes.java=${build}/classes/java +build.classes.test=${build}/classes/test +build.lib=${build}/lib +build.report=${build}/report + + +jboss.home.windows.dir=C:/jboss-3.2.6 +jboss.deploy.windows.dir=${jboss.home.windows.dir}/server/default/deploy +jboss.home.unix.dir=/usr/local/jboss-3.2.6 +jboss.deploy.unix.dir=${jboss.home.unix.dir}/server/default/deploy + + +#configuration files +conf.dir=${basedir}/conf +conf.web.dir=${basedir}/web +conf.webinf.dir=${conf.web.dir}/WEB-INF +conf.struts.dir=${conf.web.dir}/WEB-INF/struts +conf.xdoclet.dir=${conf.dir}/xdoclet + +lamsconf.windows.dir=C:/lamsconf +lamsconf.unix.dir=/usr/local/lamsconf + +conf.windows.dir=${conf.dir}/windows +conf.jboss.windows.dir=${conf.windows.dir}/jboss +conf.auth.windows.dir=${conf.windows.dir}/authentication +conf.lams.windows.dir=${conf.windows.dir}/lams +conf.unix.dir=${conf.dir}/unix +conf.jboss.unix.dir=${conf.unix.dir}/jboss +conf.auth.unix.dir=${conf.unix.dir}/authentication +conf.lams.unix.dir=${conf.unix.dir}/lams + +#xdoclet version number +xdoclet.version=1.2.2 + +#web application properties +sessiontimeout=120 + +#Gui or not? +gui=true + Index: lams_admin/build.xml =================================================================== diff -u --- lams_admin/build.xml (revision 0) +++ lams_admin/build.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + You must download several jar files before you can build + Middlegen. Execute the "download-deps" target. Then try to + build again. + + If you are behind a proxy, you should define the properties + http.proxyHost and http.proxyPort. Example: + + ant -Dhttp.proxyHost=foo.com -Dhttp.proxyPort=8080 + + It's also possible to download the jars manually. + + + + + + + + + + + + + + + + + + + Index: lams_admin/conf/unix/authentication/authentication.dtd =================================================================== diff -u --- lams_admin/conf/unix/authentication/authentication.dtd (revision 0) +++ lams_admin/conf/unix/authentication/authentication.dtd (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file Index: lams_admin/conf/unix/authentication/authentication.xml =================================================================== diff -u --- lams_admin/conf/unix/authentication/authentication.xml (revision 0) +++ lams_admin/conf/unix/authentication/authentication.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,53 @@ + + + + + + + com.sun.jndi.ldap.LdapCtxFactory + ldap://mams.melcoe.mq.edu.au:636 + simple + ssl + uid= + ,ou=mams,dc=melcoe,dc=mq,dc=edu,dc=au + java:/MySqlDS + select password from lams_user where login=? + select name,'Roles' from lams_role, lams_user where login=? + D:/MQLdapTrustStore + webauth + + + + + java:/MySqlDS + select password from lams_user where login=? + select name,'Roles' from lams_role, lams_user where login=? + + + + WEBAUTH_USER + https://array00.melcoe.mq.edu.au/webauth.html + dummy + java:/MySqlDS + select name,'Roles' from lams_role, lams_user where login=? + + + + + ldap://mams.melcoe.mq.edu.au:636 + ssl + + MQLdapTrustStore + simple + cn=admin,dc=melcoe,dc=mq,dc=edu,dc=au + KingKong + ou=mams,dc=melcoe,dc=mq,dc=edu,dc=au + + login=uid,firstName=givenName,lastName=sn,email=mail + com.sun.jndi.ldap.LdapCtxFactory + java:/MySqlDS + select password from lams_user where login=? + select name,'Roles' from lams_role, lams_user where login=? + + + Index: lams_admin/conf/unix/jboss/login-config.xml =================================================================== diff -u --- lams_admin/conf/unix/jboss/login-config.xml (revision 0) +++ lams_admin/conf/unix/jboss/login-config.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + guest + java:/DefaultDS + SELECT PASSWD FROM JMS_USERS WHERE USERID=? + SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=? + + + + + + + + + sa + sa + + jboss.jca:service=LocalTxCM,name=DefaultDS + + + + + + + + sysdba + sysdba + masterkey + jboss.jca:service=XaTxCM,name=FirebirdDS + + + + + + + + guest + guest + guest + jboss.jca:service=TxCM,name=JmsXA + + + + + + + + + jmx-console-users.properties + jmx-console-roles.properties + + + + + + + + + web-console-users.properties + web-console-roles.properties + + + + + + + + + + + + + + + + + java:/MySqlDS + select password from lams_user where login=? + select name,'Roles' from lams_role, lams_user where login=? + + + + + + + + /usr/local/lamsconf/authentication.xml + + + + + + + Index: lams_admin/conf/unix/jboss/service/mysql-ds.xml =================================================================== diff -u --- lams_admin/conf/unix/jboss/service/mysql-ds.xml (revision 0) +++ lams_admin/conf/unix/jboss/service/mysql-ds.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,17 @@ + + + + + + + + + + + MySqlDS + jdbc:mysql://localhost:3306/lams + com.mysql.jdbc.Driver + lams + lamsdemo + + \ No newline at end of file Index: lams_admin/conf/unix/lams/lams.dtd =================================================================== diff -u --- lams_admin/conf/unix/lams/lams.dtd (revision 0) +++ lams_admin/conf/unix/lams/lams.dtd (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + Index: lams_admin/conf/unix/lams/lams.xml =================================================================== diff -u --- lams_admin/conf/unix/lams/lams.xml (revision 0) +++ lams_admin/conf/unix/lams/lams.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,22 @@ + + + + + /var/opt/lams + /var/opt/lams/temp + mail.lib.mq.edu.au + lams_support@melcoe.mq.edu.au + 1048576 + 10485760 + 4096 + + 9800 + /usr/local/jboss-3.2.6/server/default/deploy/upload.war + .bat,.bin,.com,.cmd,.exe,.msi,.msp,.ocx,.pif,.scr,.sct,.sh,.shs,.vbs + /usr/local/jboss-3.2.6/server/default/conf/lams.tck + + 86400 + + + false + Index: lams_admin/conf/windows/authentication/authentication.dtd =================================================================== diff -u --- lams_admin/conf/windows/authentication/authentication.dtd (revision 0) +++ lams_admin/conf/windows/authentication/authentication.dtd (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file Index: lams_admin/conf/windows/authentication/authentication.xml =================================================================== diff -u --- lams_admin/conf/windows/authentication/authentication.xml (revision 0) +++ lams_admin/conf/windows/authentication/authentication.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,53 @@ + + + + + + + com.sun.jndi.ldap.LdapCtxFactory + ldap://mams.melcoe.mq.edu.au:636 + simple + ssl + uid= + ,ou=mams,dc=melcoe,dc=mq,dc=edu,dc=au + java:/MySqlDS + select password from lams_user where login=? + select name,'Roles' from lams_role, lams_user where login=? + D:/MQLdapTrustStore + webauth + + + + + java:/MySqlDS + select password from lams_user where login=? + select name,'Roles' from lams_role, lams_user where login=? + + + + WEBAUTH_USER + https://array00.melcoe.mq.edu.au/webauth.html + dummy + java:/MySqlDS + select name,'Roles' from lams_role, lams_user where login=? + + + + + ldap://mams.melcoe.mq.edu.au:636 + ssl + + MQLdapTrustStore + simple + cn=admin,dc=melcoe,dc=mq,dc=edu,dc=au + KingKong + ou=mams,dc=melcoe,dc=mq,dc=edu,dc=au + + login=uid,firstName=givenName,lastName=sn,email=mail + com.sun.jndi.ldap.LdapCtxFactory + java:/MySqlDS + select password from lams_user where login=? + select name,'Roles' from lams_role, lams_user where login=? + + + Index: lams_admin/conf/windows/jboss/login-config.xml =================================================================== diff -u --- lams_admin/conf/windows/jboss/login-config.xml (revision 0) +++ lams_admin/conf/windows/jboss/login-config.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + guest + java:/DefaultDS + SELECT PASSWD FROM JMS_USERS WHERE USERID=? + SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=? + + + + + + + + + sa + sa + + jboss.jca:service=LocalTxCM,name=DefaultDS + + + + + + + + sysdba + sysdba + masterkey + jboss.jca:service=XaTxCM,name=FirebirdDS + + + + + + + + guest + guest + guest + jboss.jca:service=TxCM,name=JmsXA + + + + + + + + + jmx-console-users.properties + jmx-console-roles.properties + + + + + + + + + web-console-users.properties + web-console-roles.properties + + + + + + + + + + + + + + + + + java:/MySqlDS + select password from lams_user where login=? + select name,'Roles' from lams_role, lams_user where login=? + + + + + + + + c:/lamsconf/authentication.xml + + + + + + + Index: lams_admin/conf/windows/jboss/service/mysql-ds.xml =================================================================== diff -u --- lams_admin/conf/windows/jboss/service/mysql-ds.xml (revision 0) +++ lams_admin/conf/windows/jboss/service/mysql-ds.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,17 @@ + + + + + + + + + + + MySqlDS + jdbc:mysql://localhost:3306/lams11 + com.mysql.jdbc.Driver + lams + lamsdemo + + \ No newline at end of file Index: lams_admin/conf/windows/lams/lams.dtd =================================================================== diff -u --- lams_admin/conf/windows/lams/lams.dtd (revision 0) +++ lams_admin/conf/windows/lams/lams.dtd (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_admin/conf/windows/lams/lams.xml =================================================================== diff -u --- lams_admin/conf/windows/lams/lams.xml (revision 0) +++ lams_admin/conf/windows/lams/lams.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,22 @@ + + + + + C:/lams + C:/lams/temp + mail.lib.mq.edu.au + lams_support@melcoe.mq.edu.au + 1048576 + 10485760 + 4096 + + 9800 + c:/jboss-3.2.6/server/default/deploy/upload.war + .bat,.bin,.com,.cmd,.exe,.msi,.msp,.ocx,.pif,.scr,.sct,.sh,.shs,.vbs + c:/jboss-3.2.6/server/default/conf/lams.tck + + 86400 + + + false + Index: lams_admin/conf/xdoclet/global-forwards.xml =================================================================== diff -u --- lams_admin/conf/xdoclet/global-forwards.xml (revision 0) +++ lams_admin/conf/xdoclet/global-forwards.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,3 @@ + + + Index: lams_admin/conf/xdoclet/struts-message-resources.xml =================================================================== diff -u --- lams_admin/conf/xdoclet/struts-message-resources.xml (revision 0) +++ lams_admin/conf/xdoclet/struts-message-resources.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,2 @@ + + Index: lams_admin/conf/xdoclet/struts-plugins.xml =================================================================== diff -u --- lams_admin/conf/xdoclet/struts-plugins.xml (revision 0) +++ lams_admin/conf/xdoclet/struts-plugins.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/applicationResources.properties =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/applicationResources.properties (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/applicationResources.properties (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,8 @@ +# Resources for parameter 'com.lamsinternational.lams.applicationResources' + +#=========================labels===========================# + +#=========================Error Messages===========================# +error.authorisation=You are not authorised to do this. +error.newpassword.mismatch=Your new passwords don't match each other. +error.oldpassword.mismatch=Your old password is not correct. \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/HomeAction.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/HomeAction.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/HomeAction.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,223 @@ +package org.lamsfoundation.lams.admin.login.web; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.actions.DispatchAction; + +import org.springframework.web.context.support.WebApplicationContextUtils; +import org.springframework.web.context.WebApplicationContext; + +import org.lamsfoundation.lams.admin.login.web.PasswordChangeActionForm; +import org.lamsfoundation.lams.admin.util.AdminPreparer; +import org.lamsfoundation.lams.web.HttpSessionManager; +import org.lamsfoundation.lams.usermanagement.Role; +import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; + +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; + + +/** + * this is an action where all lams client environments launch. + * initial configuration of the individual environment setting is done here. + * + * @struts:action path="/home" + * validate="false" + * parameter="method" + * @struts:action-forward name="admin" path=".admin" + * @struts:action-forward name="learner" path="/learner.jsp" + * @struts:action-forward name="author" path="/author.jsp" + * @struts:action-forward name="staff" path="/staff.jsp" + * @struts:action-forward name="error" path=".error" + * @struts:action-forward name="passwordChange" path=".passwordChange" + * + */ +public class HomeAction extends DispatchAction { + + private static Logger log = Logger.getLogger(HomeAction.class); + private static WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); + private static UserManagementService service = (UserManagementService) ctx.getBean("userManagementServiceTarget"); + + + private boolean isUserInRole(String login,int orgId, String roleName) + { + if (service.getUserOrganisationRole(login, new Integer(orgId),roleName)==null) + return false; + return true; + } + + /** + * request for sysadmin environment + */ + public ActionForward admin(ActionMapping mapping, ActionForm form, + HttpServletRequest req, HttpServletResponse res) + throws IOException, ServletException { + + try { + log.debug("request admin"); + + String login = req.getRemoteUser(); + + int orgId = new Integer(req.getParameter("orgId")).intValue(); + + if ( isUserInRole(login,orgId,Role.ADMIN)) + { + log.debug("user is admin"); + Organisation org = service.getOrganisationById(new Integer(orgId)); + AdminPreparer.prepare(org,req,service); + return mapping.findForward("admin"); + } + else + { + log.error("User "+login+" tried to get admin screen but isn't admin in organisation: "+orgId); + return mapping.findForward("error"); + } + + } catch (Exception e) { + e.printStackTrace(); + return mapping.findForward("error"); + } + } + + /** + * request for learner environment + */ + public ActionForward learner(ActionMapping mapping, ActionForm form, + HttpServletRequest req, HttpServletResponse res) + throws IOException, ServletException { + + try { + log.debug("request learner"); + + String login = req.getRemoteUser(); + + int orgId = new Integer(req.getParameter("orgId")).intValue(); + + if ( isUserInRole(login,orgId,Role.LEARNER) ) + { + log.debug("user is learner"); + + String serverUrl = Configuration.get(ConfigurationKeys.SERVER_URL); + + req.setAttribute("serverUrl", serverUrl); + return mapping.findForward("learner"); + } + else + { + log.error("User "+login+" tried to get learner screen but isn't learner in organisation: "+orgId); + return mapping.findForward("error"); + } + + } catch (Exception e) { + e.printStackTrace(); + return mapping.findForward("error"); + } + } + + + /** + * request for author environment + */ + public ActionForward author(ActionMapping mapping, ActionForm form, + HttpServletRequest req, HttpServletResponse res) + throws IOException, ServletException { + + try { + log.debug("request author"); + + String login = req.getRemoteUser(); + + int orgId = new Integer(req.getParameter("orgId")).intValue(); + + if ( isUserInRole(login,orgId,Role.AUTHOR) ) + { + log.debug("user is author"); + + String serverUrl = Configuration.get(ConfigurationKeys.SERVER_URL); + + req.setAttribute("serverUrl", serverUrl); + return mapping.findForward("author"); + } + else + { + log.error("User "+login+" tried to get author screen but isn't author in organisation: "+orgId); + return mapping.findForward("error"); + } + + } catch (Exception e) { + e.printStackTrace(); + return mapping.findForward("error"); + } + } + + + /** + * request for staff environment + */ + public ActionForward staff(ActionMapping mapping, ActionForm form, + HttpServletRequest req, HttpServletResponse res) + throws IOException, ServletException { + + try { + log.debug("request staff"); + + String login = req.getRemoteUser(); + + int orgId = new Integer(req.getParameter("orgId")).intValue(); + + if (isUserInRole(login, orgId, Role.STAFF)) { + log.debug("user is staff"); + + String serverUrl = Configuration + .get(ConfigurationKeys.SERVER_URL); + + req.setAttribute("serverUrl", serverUrl); + return mapping.findForward("staff"); + } else { + log + .error("User " + + login + + " tried to get staff screen but isn't staff in organisation: " + + orgId); + return mapping.findForward("error"); + } + + } catch (Exception e) { + e.printStackTrace(); + return mapping.findForward("error"); + } + } + + /** + * Loads up the user password change form + * @return screen reference name - "passwordChange" + */ + public ActionForward passwordChange( + ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) + throws IOException, ServletException { + + String login = request.getRemoteUser(); + + PasswordChangeActionForm newForm = new PasswordChangeActionForm(); + newForm.setLogin(login); + + request.getSession(true).setAttribute( + PasswordChangeActionForm.formName, + newForm); + + return mapping.findForward("passwordChange"); + } + +} \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/PasswordChangeAction.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/PasswordChangeAction.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/PasswordChangeAction.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,112 @@ +package org.lamsfoundation.lams.admin.login.web; + + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; + +import org.springframework.web.context.support.WebApplicationContextUtils; +import org.springframework.web.context.WebApplicationContext; + + +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.Action; + +/** + * @author Fei Yang + * + * @struts:action path="/passwordChanged" + * name="PasswordChangeActionForm" + * input=".passwordChange" + * validate="true" + * + * @struts:action-forward name="okay" path=".passwordChangeOk" + * @struts:action-forward name="cancelled" path="/index.jsp" + */ +public class PasswordChangeAction extends Action { + + private static Logger log = Logger.getLogger(PasswordChangeAction.class); + + /** + * @param mapping The ActionMapping used to select this instance + * @param actionForm The optional ActionForm bean for this request (if any) + * @param request The HTTP request we are processing + * @param response The HTTP response we are creating + * + */ + public ActionForward execute(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) + throws Exception + { + // -- isCancelled? + if (isCancelled(request)) { + request.getSession().removeAttribute(PasswordChangeActionForm.formName); + return mapping.findForward("cancelled"); + } + + + ActionErrors errors = new ActionErrors(); + + PasswordChangeActionForm passwordChangeForm = (PasswordChangeActionForm) form; + + if (errors.isEmpty()) + { + try { + + String loggedInUser = request.getRemoteUser(); + String login = passwordChangeForm.getLogin(); + String oldPassword = passwordChangeForm.getOldPassword(); + String password = passwordChangeForm.getPassword(); + + if ( loggedInUser == null || ! loggedInUser.equals(login) ) + { + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.authorisation")); + } + else + { + + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession(true).getServletContext()); + UserManagementService service = (UserManagementService)ctx.getBean("userManagementServiceTarget"); + if(!service.getUserByLogin(login).getPassword().equals(oldPassword)) + { + errors.add("oldPassword", new ActionMessage("error.oldpassword.mismatch")); + } + else + { + service.updatePassword(login, password ); + } + } + + } catch (Exception e) { + log.error("Exception occured ",e); + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(e.getMessage())); + } + + } // end if no errors + + // -- Report any errors + if (!errors.isEmpty()) { + addErrors(request, errors); + if (mapping.getInput()!=null) + { + passwordChangeForm.reset(mapping,request); + return (new ActionForward(mapping.getInput())); + } + // If no input page, use error forwarding + return (mapping.findForward("error")); + } + return mapping.findForward("okay"); + + } +} + + Index: lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/PasswordChangeActionForm.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/PasswordChangeActionForm.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/login/web/PasswordChangeActionForm.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,145 @@ +package org.lamsfoundation.lams.admin.login.web; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; + +/** + * @author fmalikoff + * @Modified by Fei Yang + * + * @struts:form name="PasswordChangeActionForm" + * include-pk="true" + * include-all="true" + */ +public class PasswordChangeActionForm extends ActionForm { + + public static final String formName = "PasswordChangeActionForm"; // must match name in @struts:action section above + + private static Logger log = Logger.getLogger(PasswordChangeActionForm.class); + + private String oldPassword; + + private String password; + + private String passwordConfirm; + + private String login; + + public PasswordChangeActionForm() { + } + + /** + * Returns the login. + * @return String + */ + public String getLogin() { + return login; + } + + /** + * Returns the password. + * @return String + */ + public String getPassword() { + return password; + } + + /** + * Returns the passwordConfirm. + * @return String + */ + public String getPasswordConfirm() { + return passwordConfirm; + } + + /** + * Sets the login. + * @param login The login to set + */ + public void setLogin(String login) { + this.login = StringUtils.trimToEmpty(login); + } + + /** + * Sets the password. + * @param password The password to set + */ + public void setPassword(String password) { + this.password = StringUtils.trimToEmpty(password); + } + + /** + * Sets the passwordConfirm. + * @param passwordConfirm The passwordConfirm to set + */ + public void setPasswordConfirm(String passwordConfirm) { + this.passwordConfirm = StringUtils.trimToEmpty(passwordConfirm); + } + + /** + * @return Returns the oldPassword. + */ + public String getOldPassword() { + return oldPassword; + } + + /** + * @param oldPassword The oldPassword to set. + */ + public void setOldPassword(String oldPassword) { + this.oldPassword = StringUtils.trimToEmpty(oldPassword); + } + + /** + * Reset all properties to their default values. + * + * @param mapping The mapping used to select this instance + * @param request The servlet request we are processing + */ + public void reset(ActionMapping mapping, HttpServletRequest request) { + setOldPassword(null); + setPassword(null); + setPasswordConfirm(null); + } + + /** + * Validate the properties that have been set from this HTTP request, + * and return an ActionErrors object that encapsulates any + * validation errors that have been found. If no errors are found, return + * null or an ActionErrors object with no + * recorded error messages. + *

+ * @param mapping The mapping used to select this instance + * @param request The servlet request we are processing + */ + public ActionErrors validate(ActionMapping mapping, + HttpServletRequest request) { + ActionErrors errors = super.validate(mapping, request); + + if (errors == null) + errors = new ActionErrors(); + + if (getPassword() == null || getPassword().length() == 0 + || !getPassword().equals(getPasswordConfirm())) { + errors.add("password", new ActionMessage("error.newpassword.mismatch")); + } + + if (errors.isEmpty()) + return null; + else { + // don't want to pass back what they had as the password + setOldPassword(null); + setPassword(null); + setPasswordConfirm(null); + return errors; + } + + } + +} \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/AbstractServerLoginModule.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/AbstractServerLoginModule.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/AbstractServerLoginModule.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,284 @@ +package org.lamsfoundation.lams.admin.security; + +import java.security.Principal; +import java.security.acl.Group; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.lang.reflect.Constructor; + +import javax.security.auth.Subject; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.login.LoginException; +import javax.security.auth.spi.LoginModule; + +import org.apache.log4j.Logger; + +public class AbstractServerLoginModule implements LoginModule +{ + protected Subject subject; + protected CallbackHandler callbackHandler; + protected Map sharedState; + protected Map options; + protected Logger log = Logger.getLogger(AbstractServerLoginModule.class); + /** Flag indicating if the shared credential should be used */ + protected boolean useFirstPass; + /** Flag indicating if the login phase succeeded. Subclasses that override + the login method must set this to true on successful completion of login + */ + protected boolean loginOk; + /** An optional custom Principal class implementation */ + protected String principalClassName; + /** the principal to use when a null username and password are seen */ + protected Principal unauthenticatedIdentity; + + /** Initialize the login module. This stores the subject, callbackHandler + * and sharedState and options for the login session. Subclasses should override + * if they need to process their own options. A call to super.initialize(...) + * must be made in the case of an override. + *

+ * @option password-stacking: If this is set to "useFirstPass", the login + * identity will be taken from the javax.security.auth.login.name + * value of the sharedState map, and the proof of identity from the + * javax.security.auth.login.password value of the sharedState + * map. + * @option principalClass: A Principal implementation that support a ctor + * taking a String argument for the princpal name. + * @option unauthenticatedIdentity: the name of the principal to asssign + * and authenticate when a null username and password are seen. + * + * @param subject the Subject to update after a successful login. + * @param callbackHandler the CallbackHandler that will be used to obtain the + * the user identity and credentials. + * @param sharedState a Map shared between all configured login module instances + * @param options the parameters passed to the login module. + */ + public void initialize(Subject subject, CallbackHandler callbackHandler, + Map sharedState, Map options) + { + this.subject = subject; + this.callbackHandler = callbackHandler; + this.sharedState = sharedState; + this.options = options; + log = Logger.getLogger(getClass()); + log.info("initialize"); + /* Check for password sharing options. Any non-null value for + password_stacking sets useFirstPass as this module has no way to + validate any shared password. + */ + String passwordStacking = (String) options.get("password-stacking"); + if( passwordStacking != null && passwordStacking.equalsIgnoreCase("useFirstPass") ) + useFirstPass = true; + + // Check for a custom Principal implementation + principalClassName = (String) options.get("principalClass"); + + // Check for unauthenticatedIdentity option. + String name = (String) options.get("unauthenticatedIdentity"); + if( name != null ) + { + try + { + unauthenticatedIdentity = createIdentity(name); + log.info("Saw unauthenticatedIdentity="+name); + } + catch(Exception e) + { + log.warn("Failed to create custom unauthenticatedIdentity", e); + } + } + } + + /** Looks for javax.security.auth.login.name and javax.security.auth.login.password + values in the sharedState map if the useFirstPass option was true and returns + true if they exist. If they do not or are null this method returns false. + + Note that subclasses that override the login method must set the loginOk + ivar to true if the login succeeds in order for the commit phase to + populate the Subject. This implementation sets loginOk to true if the + login() method returns true, otherwise, it sets loginOk to false. + */ + public boolean login() throws LoginException + { + log.info("login"); + loginOk = false; + // If useFirstPass is true, look for the shared password + if( useFirstPass == true ) + { + try + { + Object identity = sharedState.get("javax.security.auth.login.name"); + Object credential = sharedState.get("javax.security.auth.login.password"); + if( identity != null && credential != null ) + { + loginOk = true; + return true; + } + // Else, fall through and perform the login + } + catch(Exception e) + { // Dump the exception and continue + log.error("login failed", e); + } + } + return false; + } + + /** Method to commit the authentication process (phase 2). If the login + method completed successfully as indicated by loginOk == true, this + method adds the getIdentity() value to the subject getPrincipals() Set. + It also adds the members of each Group returned by getRoleSets() + to the subject getPrincipals() Set. + + @see javax.security.auth.Subject; + @see java.security.acl.Group; + @return true always. + */ + public boolean commit() throws LoginException + { + log.info("commit, loginOk="+loginOk); + if( loginOk == false ) + return false; + + Set principals = subject.getPrincipals(); + Principal identity = getIdentity(); + principals.add(identity); + Group[] roleSets = getRoleSets(); + for(int g = 0; g < roleSets.length; g ++) + { + Group group = roleSets[g]; + String name = group.getName(); + Group subjectGroup = createGroup(name, principals); + if( subjectGroup instanceof NestableGroup ) + { + /* A NestableGroup only allows Groups to be added to it so we + need to add a SimpleGroup to subjectRoles to contain the roles + */ + SimpleGroup tmp = new SimpleGroup("Roles"); + subjectGroup.addMember(tmp); + subjectGroup = tmp; + } + // Copy the group members to the Subject group + Enumeration members = group.members(); + while( members.hasMoreElements() ) + { + Principal role = (Principal) members.nextElement(); + subjectGroup.addMember(role); + } + } + return true; + } + + /** Method to abort the authentication process (phase 2). + @return true alaways + */ + public boolean abort() throws LoginException + { + log.info("abort"); + return true; + } + + /** Remove the user identity and roles added to the Subject during commit. + @return true always. + */ + public boolean logout() throws LoginException + { + log.info("logout"); + // Remove the user identity + Principal identity = getIdentity(); + Set principals = subject.getPrincipals(); + principals.remove(identity); + // Remove any added Groups... + return true; + } + //--- End LoginModule interface methods + + // --- Protected methods + + /** Overriden by subclasses to return the Principal that corresponds to + the user primary identity. + */ + protected Principal getIdentity() + { + return null; + } + /** Overriden by subclasses to return the Groups that correspond to the + to the role sets assigned to the user. Subclasses should create at + least a Group named "Roles" that contains the roles assigned to the user. + A second common group is "CallerPrincipal" that provides the application + identity of the user rather than the security domain identity. + @return Group[] containing the sets of roles + */ + protected Group[] getRoleSets() throws LoginException + { + return null; + } + + protected boolean getUseFirstPass() + { + return useFirstPass; + } + protected Principal getUnauthenticatedIdentity() + { + return unauthenticatedIdentity; + } + + /** Find or create a Group with the given name. Subclasses should use this + method to locate the 'Roles' group or create additional types of groups. + @return A named Group from the principals set. + */ + protected Group createGroup(String name, Set principals) + { + Group roles = null; + Iterator iter = principals.iterator(); + while( iter.hasNext() ) + { + Object next = iter.next(); + if( (next instanceof Group) == false ) + continue; + Group grp = (Group) next; + if( grp.getName().equals(name) ) + { + roles = grp; + break; + } + } + // If we did not find a group create one + if( roles == null ) + { + roles = new SimpleGroup(name); + principals.add(roles); + } + return roles; + } + + /** Utility method to create a Principal for the given username. This + * creates an instance of the principalClassName type if this option was + * specified using the class constructor matching: ctor(String). If + * principalClassName was not specified, a SimplePrincipal is created. + * + * @param username the name of the principal + * @return the principal instance + * @throws java.lang.Exception thrown if the custom principal type cannot be created. + */ + protected Principal createIdentity(String username) + throws Exception + { + Principal p = null; + if( principalClassName == null ) + { + p = new SimplePrincipal(username); + } + else + { + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + Class clazz = loader.loadClass(principalClassName); + Class[] ctorSig = {String.class}; + Constructor ctor = clazz.getConstructor(ctorSig); + Object[] ctorArgs = {username}; + p = (Principal) ctor.newInstance(ctorArgs); + } + return p; + } +} \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/AuthenticationMethodConfigurer.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/AuthenticationMethodConfigurer.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/AuthenticationMethodConfigurer.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,114 @@ +/* + * Created on 2004-12-16 + * + * Last modified on 2004-12-16 + */ +package org.lamsfoundation.lams.admin.security; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; + +import org.lamsfoundation.lams.usermanagement.AuthenticationMethodParameter; +import org.lamsfoundation.lams.usermanagement.AuthenticationMethod; +import org.lamsfoundation.lams.util.XmlFileLoader; + +/** + * TODO Add description here + * + *

+ * View Source + *

+ * + * @author Fei Yang + */ +public class AuthenticationMethodConfigurer { + + private static Document authConfigureDoc = null; + + private static String configFilePath; + + /** + * @return Returns the configFilePath. + */ + public static String getConfigFilePath() { + return configFilePath; + } + /** + * @param configFilePath The configFilePath to set. + */ + public static void setConfigFilePath(String configFilePath) { + AuthenticationMethodConfigurer.configFilePath = configFilePath; + } + + private static void loadConfiguration() + throws IOException,SAXException,SAXParseException,ParserConfigurationException{ + + if(authConfigureDoc==null){ + authConfigureDoc = XmlFileLoader.getDocumentFromFilePath(configFilePath); + } + } + + private static Element findMethodElement(String methodName) + throws IOException,SAXException,SAXParseException,ParserConfigurationException + { + NodeList nodeList = authConfigureDoc.getElementsByTagName("Method"); + for(int i=0; i + * View Source + *

+ * + * @author Kevin Han + * Fei Yang + */ +public class JspRedirectStrategy { + + public static final String AUTH_OBJECT_NAME = "authorizationObjectName"; + + public static final String SECURITY_CHECK_NOT_PASSED = "SecurityCheckNotPassed"; + + public static final String SECURITY_CHECK_PASSED = "securityCheckPassed"; + + public static final String WELCOME_PAGE = "index.jsp "; + + private static Logger log = Logger.getLogger(JspRedirectStrategy.class); + + /** + * login page (defined in web.xml) calls this method to have its response + * redirected whenever necessary, and have its authorization object updated + * as well. + * + * @param request + * @param response + * @return true if response has been redirected; false if login page should + * continue. + * + */ + public static boolean loginPageRedirected(HttpServletRequest request,HttpServletResponse response) throws java.io.IOException { + HttpSession session = request.getSession(false); + if (session == null) { + log.debug("===>LOGIN PAGE: session not found, simply stop here."); + return true; + } + String checkStatus = (String) session.getAttribute(AUTH_OBJECT_NAME); + String id = session.getId(); + + if (checkStatus == null) { + log.debug("===>LOGIN PAGE: there is no auth obj in session, auth obj created. session id: " + id); + session.setAttribute(AUTH_OBJECT_NAME, SECURITY_CHECK_NOT_PASSED); + response.sendRedirect(WELCOME_PAGE); + return true; + } else if (checkStatus.equals(SECURITY_CHECK_NOT_PASSED)) { + log.debug("===>LOGIN PAGE: accessing login page before login succeed, display login page. session id: "+ id); + return false; + } else if (checkStatus.equals(SECURITY_CHECK_PASSED)) { + log.debug("===>LOGIN PAGE: accessing login after login succeed. Invalidate the session: " + id + " and redirect to "+ WELCOME_PAGE); + session.invalidate(); + response.sendRedirect(WELCOME_PAGE); + return true; + } else { + log.debug("===>LOGIN PAGE: logically impossible to be here, no valid status found : "+ id); + session.invalidate(); + response.sendRedirect(WELCOME_PAGE); + return true; + } + + } + + public static void welcomePageStatusUpdate(HttpServletRequest request, + HttpServletResponse response) { + HttpSession session = request.getSession(false); + if (session == null) { + log.debug("===>INDEX PAGE: session not found, simply stop here."); + return; + } + if (!session.getAttribute(AUTH_OBJECT_NAME).equals(SECURITY_CHECK_PASSED)) + session.setAttribute(AUTH_OBJECT_NAME, new String(SECURITY_CHECK_PASSED)); + + } + +} \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/LDAPAuthenticator.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/LDAPAuthenticator.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/LDAPAuthenticator.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,96 @@ +package org.lamsfoundation.lams.admin.security; + +import java.util.Properties; +import javax.naming.Context; +import javax.naming.ldap.InitialLdapContext; + +import org.apache.log4j.Logger; + +import org.lamsfoundation.lams.usermanagement.AuthenticationMethod; + +public class LDAPAuthenticator { + private static Logger log = Logger.getLogger(LDAPAuthenticator.class); + + private static final String USE_OBJECT_CREDENTIAL_OPT = "useObjectCredential"; + + private static final String PRINCIPAL_DN_PREFIX_OPT = "principalDNPrefix"; + + private static final String PRINCIPAL_DN_SUFFIX_OPT = "principalDNSuffix"; + + private static final String ROLES_CTX_DN_OPT = "rolesCtxDN"; + + private static final String USER_ROLES_CTX_DN_ATTRIBUTE_ID_OPT = "userRolesCtxDNAttributeName"; + + private static final String UID_ATTRIBUTE_ID_OPT = "uidAttributeID"; + + private static final String ROLE_ATTRIBUTE_ID_OPT = "roleAttributeID"; + + private static final String MATCH_ON_USER_DN_OPT = "matchOnUserDN"; + + private static final String ROLE_ATTRIBUTE_IS_DN_OPT = "roleAttributeIsDN"; + + private static final String ROLE_NAME_ATTRIBUTE_ID_OPT = "roleNameAttributeID"; + + private AuthenticationMethod method; + + public LDAPAuthenticator(AuthenticationMethod method) { + this.method = method; + } + + public boolean authenticate(String username, String inputPassword) { + return authentication(username, inputPassword); + } + + private boolean authentication(String username, Object credential) { + Properties env = new Properties(); + + // Load all authentication method parameters into env + env.setProperty(Context.INITIAL_CONTEXT_FACTORY, method.getParameterByName(Context.INITIAL_CONTEXT_FACTORY).getValue()); + env.setProperty(Context.SECURITY_AUTHENTICATION, method.getParameterByName(Context.SECURITY_AUTHENTICATION).getValue()); + env.setProperty(Context.SECURITY_PROTOCOL, method.getParameterByName(Context.SECURITY_PROTOCOL).getValue()); + + String principalDNPrefix = method.getParameterByName(PRINCIPAL_DN_PREFIX_OPT).getValue(); + String principalDNSuffix = method.getParameterByName(PRINCIPAL_DN_SUFFIX_OPT).getValue(); + String userDN = principalDNPrefix + username + principalDNSuffix; + env.setProperty(Context.SECURITY_PRINCIPAL, userDN); + + env.setProperty(Context.PROVIDER_URL, method.getParameterByName(Context.PROVIDER_URL).getValue()); + env.put(Context.SECURITY_CREDENTIALS, credential); + + Object originalTrustStore = System.getProperty("javax.net.ssl.trustStore"); + Object originalTrustPass = System.getProperty("javax.net.ssl.trustStorePassword"); + //FIXME: synchronization issue: dynamically load certificate into + // system instead of overwritting it. + System.setProperty("javax.net.ssl.trustStore", method.getParameterByName("truststore.path").getValue()); + System.setProperty("javax.net.ssl.trustStorePassword", method.getParameterByName("truststore.password").getValue()); + + log.debug("===> LDAP authenticator: " + env); + + InitialLdapContext ctx = null; + try { + ctx = new InitialLdapContext(env, null); + log.debug("===> ldap context created: "+ctx); + return true; + } catch (Exception e) { + log.error("===> Ldap exception: " + e); + return false; + } finally { + + try { + //FIXME: synchronization issue -- dynamically load certificate + // instead of overwritting system properties + //System.setProperty("javax.net.ssl.trustStore",(String)originalTrustStore + // ); + //System.setProperty("javax.net.ssl.trustStorePassword",(String)originalTrustPass + // ); + + if (ctx != null) + ctx.close(); + } catch (Exception e) { + log.error("===> gettting problem when closing context. Excetion: "+e); + } + } + + } + +} \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/NestableGroup.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/NestableGroup.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/NestableGroup.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,116 @@ +package org.lamsfoundation.lams.admin.security; + +import java.security.Principal; +import java.security.acl.Group; +import java.util.Enumeration; +import java.util.LinkedList; + +public class NestableGroup extends SimplePrincipal implements Group +{ + /** The stack of the Groups. Elements are pushed/poped by + inserting/removing element 0. + */ + private LinkedList rolesStack; + + /** Creates new NestableGroup with the given name + */ + public NestableGroup(String name) + { + super(name); + rolesStack = new LinkedList(); + } + +// --- Begin Group interface methods + /** Returns an enumeration that contains the single active Principal. + @return an Enumeration of the single active Principal. + */ + public Enumeration members() + { + return new IndexEnumeration(); + } + + /** Removes the first occurence of user from the Principal stack. + + @param user the principal to remove from this group. + @return true if the principal was removed, or + * false if the principal was not a member. + */ + public boolean removeMember(Principal user) + { + return rolesStack.remove(user); + } + + /** Pushes the group onto the Group stack and makes it the active + Group. + @param group, the instance of Group that contains the roles to set as the + active Group. + @exception IllegalArgumentException, thrown if group is not an instance of Group. + @return true always. + */ + public boolean addMember(Principal group) throws IllegalArgumentException + { + if( (group instanceof Group) == false ) + throw new IllegalArgumentException("The addMember argument must be a Group"); + + rolesStack.addFirst(group); + return true; + } + + /** Returns true if the passed principal is a member of the active group. + This method does a recursive search, so if a principal belongs to a + group which is a member of this group, true is returned. + + @param member the principal whose membership is to be checked. + + @return true if the principal is a member of this group, false otherwise. + */ + public boolean isMember(Principal member) + { + if( rolesStack.size() == 0 ) + return false; + Group activeGroup = (Group) rolesStack.getFirst(); + boolean isMember = activeGroup.isMember(member); + return isMember; + } + + public String toString() + { + StringBuffer tmp = new StringBuffer(getName()); + tmp.append("(members:"); + Enumeration iter = members(); + while( iter.hasMoreElements() ) + { + tmp.append(iter.nextElement()); + tmp.append(','); + } + tmp.setCharAt(tmp.length()-1, ')'); + return tmp.toString(); + } +// --- End Group interface methods + + private class IndexEnumeration implements Enumeration + { + private Enumeration iter; + + IndexEnumeration() + { + if( rolesStack.size() > 0 ) + { + Group grp = (Group) rolesStack.get(0); + iter = grp.members(); + } + } + public boolean hasMoreElements() + { + boolean hasMore = iter != null && iter.hasMoreElements(); + return hasMore; + } + public Object nextElement() + { + Object next = null; + if( iter != null ) + next = iter.nextElement(); + return next; + } + } +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/SimpleGroup.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/SimpleGroup.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/SimpleGroup.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,113 @@ +package org.lamsfoundation.lams.admin.security; + +import java.security.Principal; +import java.security.acl.Group; +import java.util.Collections; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.HashMap; + +public class SimpleGroup extends SimplePrincipal implements Group +{ + private HashMap members; + + public SimpleGroup(String groupName) + { + super(groupName); + members = new HashMap(3); + } + + /** Adds the specified member to the group. + @param user the principal to add to this group. + @return true if the member was successfully added, + false if the principal was already a member. + */ + public boolean addMember(Principal user) + { + boolean isMember = members.containsKey(user); + if( isMember == false ) + members.put(user, user); + return isMember == false; + } + /** Returns true if the passed principal is a member of the group. + This method does a recursive search, so if a principal belongs to a + group which is a member of this group, true is returned. + + A special check is made to see if the member is an instance of + org.jboss.security.AnybodyPrincipal or org.jboss.security.NobodyPrincipal + since these classes do not hash to meaningful values. + @param member the principal whose membership is to be checked. + @return true if the principal is a member of this group, + false otherwise. + */ + + public boolean isMember(Principal member) + { + //not implemented. + return false; + + /* + // First see if there is a key with the member name + boolean isMember = members.containsKey(member); + if( isMember == false ) + { // Check the AnybodyPrincipal & NobodyPrincipal special cases + isMember = (member instanceof org.jboss.security.AnybodyPrincipal); + if( isMember == false ) + { + if( member instanceof org.jboss.security.NobodyPrincipal ) + return false; + } + } + if( isMember == false ) + { // Check any Groups for membership + Collection values = members.values(); + Iterator iter = values.iterator(); + while( isMember == false && iter.hasNext() ) + { + Object next = iter.next(); + if( next instanceof Group ) + { + Group group = (Group) next; + isMember = group.isMember(member); + } + } + } + return isMember; + */ + } + + /** Returns an enumeration of the members in the group. + The returned objects can be instances of either Principal + or Group (which is a subinterface of Principal). + @return an enumeration of the group members. + */ + public Enumeration members() + { + return Collections.enumeration(members.values()); + } + + /** Removes the specified member from the group. + @param user the principal to remove from this group. + @return true if the principal was removed, or + false if the principal was not a member. + */ + public boolean removeMember(Principal user) + { + Object prev = members.remove(user); + return prev != null; + } + + public String toString() + { + StringBuffer tmp = new StringBuffer(getName()); + tmp.append("(members:"); + Iterator iter = members.keySet().iterator(); + while( iter.hasNext() ) + { + tmp.append(iter.next()); + tmp.append(','); + } + tmp.setCharAt(tmp.length()-1, ')'); + return tmp.toString(); + } +} \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/SimplePrincipal.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/SimplePrincipal.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/SimplePrincipal.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,44 @@ +package org.lamsfoundation.lams.admin.security; + +import java.security.Principal; + +public class SimplePrincipal implements Principal, java.io.Serializable +{ + private String name; + + public SimplePrincipal(String name) + { + this.name = name; + } + + /** Compare this SimplePrincipal's name against another Principal + @return true if name equals another.getName(); + */ + public boolean equals(Object another) + { + if( !(another instanceof Principal) ) + return false; + String anotherName = ((Principal)another).getName(); + boolean equals = false; + if( name == null ) + equals = anotherName == null; + else + equals = name.equals(anotherName); + return equals; + } + + public int hashCode() + { + return (name == null ? 0 : name.hashCode()); + } + + public String toString() + { + return name; + } + + public String getName() + { + return name; + } +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/UniversalLoginModule.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/UniversalLoginModule.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/UniversalLoginModule.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,258 @@ +package org.lamsfoundation.lams.admin.security; + +/** + * UniversalLoginModule is LAMS's own implementation of login module + * based on JBoss 3.0.*, 3.2.* and possibly higher versions. + * + * It's named "universal" as currently it supports WebAuth, LDAP and + * database based authentication mechanisms. + * + */ + +import java.security.acl.Group; +import java.security.Principal; +import javax.security.auth.Subject; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.login.FailedLoginException; + +import javax.naming.NamingException; +import javax.security.auth.login.LoginException; +import javax.naming.InitialContext; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import javax.sql.DataSource; +import java.util.HashMap; +import java.util.Map; +import java.util.*; + +import org.lamsfoundation.lams.usermanagement.AuthenticationMethod; + +import org.apache.log4j.Logger; +import org.springframework.web.context.support.WebApplicationContextUtils; +import org.springframework.web.context.WebApplicationContext; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.web.HttpSessionManager; +import org.lamsfoundation.lams.usermanagement.*; + +public class UniversalLoginModule extends UsernamePasswordLoginModule { + private static Logger log = Logger.getLogger(UniversalLoginModule.class); + + private static final String USE_OBJECT_CREDENTIAL_OPT = "useObjectCredential"; + + private static final String PRINCIPAL_DN_PREFIX_OPT = "principalDNPrefix"; + + private static final String PRINCIPAL_DN_SUFFIX_OPT = "principalDNSuffix"; + + private static final String ROLES_CTX_DN_OPT = "rolesCtxDN"; + + private static final String USER_ROLES_CTX_DN_ATTRIBUTE_ID_OPT = "userRolesCtxDNAttributeName"; + + private static final String UID_ATTRIBUTE_ID_OPT = "uidAttributeID"; + + private static final String ROLE_ATTRIBUTE_ID_OPT = "roleAttributeID"; + + private static final String MATCH_ON_USER_DN_OPT = "matchOnUserDN"; + + private static final String ROLE_ATTRIBUTE_IS_DN_OPT = "roleAttributeIsDN"; + + private static final String ROLE_NAME_ATTRIBUTE_ID_OPT = "roleNameAttributeID"; + + public UniversalLoginModule() { + } + + private transient SimpleGroup userRoles = new SimpleGroup("Roles"); + + protected String dsJndiName; + + protected String rolesQuery; + + protected String propertyFilePath; + + public void initialize(Subject subject, CallbackHandler callbackHandler, + Map sharedState, Map options) { + super.initialize(subject, callbackHandler, sharedState, options); + + //from options to get path to property file -> authentication.xml + propertyFilePath = (String) options.get("authenticationPropertyFile"); + //load authentication property file + AuthenticationMethodConfigurer.setConfigFilePath(propertyFilePath); + + } + + protected boolean validatePassword(String inputPassword, + String expectedPassword) { + boolean isValid = false; + if (inputPassword != null) { + // empty password not allowed + if (inputPassword.length() == 0) + return false; + + log.debug("===> validatePassword() called: " + inputPassword + + " : " + expectedPassword); + + try { + String username = getUsername(); + HttpSessionManager sessionManager = HttpSessionManager.getInstance(); + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); + UserManagementService service = (UserManagementService) ctx.getBean("userManagementServiceTarget"); + User user = service.getUserByLogin(username); + + log.debug("===> authenticating user: " + username); + if (user == null) + return false; + + AuthenticationMethod method = null; + try { + method = service.getAuthenticationMethodForUser(username); + AuthenticationMethodConfigurer.configure(method); + + this.dsJndiName = method.getParameterByName("dsJndiName").getValue(); + this.rolesQuery = method.getParameterByName("rolesQuery").getValue(); + } catch (Exception e) { + log.debug("===>Exception : " + e); + return false; + } + + List parameters = method.getAuthenticationMethodParameters(); + + //for debug purpose only + for (int i = 0; i < parameters.size(); i++) { + AuthenticationMethodParameter mp = (AuthenticationMethodParameter) parameters.get(i); + log.debug("===>" + mp.getName() + " = " + mp.getValue()); + } + + String type = method.getAuthenticationMethodType().getDescription(); + log.debug("===> authentication type :" + type); + if ("LDAP".equals(type)) { + LDAPAuthenticator authenticator = new LDAPAuthenticator(method); + isValid = authenticator.authenticate(username,inputPassword); + log.debug("===> LDAP :: user:" + username + ":" + + inputPassword + " authenticated! "); + } else if ("LAMS".equals(type)) { + DatabaseAuthenticator authenticator = new DatabaseAuthenticator(method); + isValid = authenticator.authenticate(username,inputPassword); + log.debug("===> LAMS:: user:" + username + ":" + + inputPassword + " authenticated! "); + } else if ("WEB_AUTH".equals(type)) { + log.debug("===> WEBAUTH: " + username + " type: " + type); + WebAuthAuthenticator authenticator = new WebAuthAuthenticator(); + log.debug("===> webauth authenticator is:" + authenticator); + isValid = authenticator.authenticate(username,inputPassword); + log.debug("===> WEBAUTH :: user:" + username + ":" + + inputPassword + " authenticated! "); + + } else { + log.debug("Unexpected authentication type!"); + return false; + } + } catch (Exception e) { + e.printStackTrace(); + log.debug("===> exception: " + e); + } + } + return isValid; + } + + /** + * According to Lams's security policy, all the authorization + * must be done locally, in other word, through Lams database + * or other "local"(logically) data resource. + * + @return Group[] containing the sets of roles + */ + protected Group[] getRoleSets() throws LoginException { + String username = getUsername(); + Connection conn = null; + HashMap setsMap = new HashMap(); + PreparedStatement ps = null; + ResultSet rs = null; + + try { + + InitialContext ctx = new InitialContext(); + DataSource ds = (DataSource) ctx.lookup(this.dsJndiName); + + log.debug("===> getRoleSets() called: " + dsJndiName + ":" + rolesQuery); + conn = ds.getConnection(); + // Get the user role names + ps = conn.prepareStatement(this.rolesQuery); + try { + ps.setString(1, username); + } catch (ArrayIndexOutOfBoundsException ignore) { + // The query may not have any parameters so just try it + } + rs = ps.executeQuery(); + if (rs.next() == false) { + if (getUnauthenticatedIdentity() == null) + throw new FailedLoginException("No matching username found in Roles"); + /* We are running with an unauthenticatedIdentity so create an + empty Roles set and return. + */ + Group[] roleSets = { new SimpleGroup("Roles") }; + return roleSets; + } + + do { + String name = rs.getString(1); + String groupName = rs.getString(2); + if (groupName == null || groupName.length() == 0) + groupName = "Roles"; + Group group = (Group) setsMap.get(groupName); + if (group == null) { + group = new SimpleGroup(groupName); + setsMap.put(groupName, group); + } + + try { + Principal p = super.createIdentity(name); + log.info("Assign user to role " + name); + group.addMember(p); + } catch (Exception e) { + log.debug("Failed to create principal: " + name, e); + } + } while (rs.next()); + } catch (NamingException ex) { + throw new LoginException(ex.toString(true)); + } catch (SQLException ex) { + super.log.error("SQL failure", ex); + throw new LoginException(ex.toString()); + } finally { + if (rs != null) { + try { + rs.close(); + } catch (SQLException e) { + } + } + if (ps != null) { + try { + ps.close(); + } catch (SQLException e) { + } + } + if (conn != null) { + try { + conn.close(); + } catch (Exception ex) { + } + } + } + + Group[] roleSets = new Group[setsMap.size()]; + setsMap.values().toArray(roleSets); + return roleSets; + } + + /** + * Overriden to return an empty password string as typically one cannot + * obtain a user's password. We also override the validatePassword so + * this is ok. + * @return and empty password String + */ + protected String getUsersPassword() throws LoginException { + return ""; + } + +} \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/UsernamePasswordLoginModule.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/UsernamePasswordLoginModule.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/UsernamePasswordLoginModule.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,317 @@ +package org.lamsfoundation.lams.admin.security; + +import java.security.Principal; +import java.util.Map; + +import javax.security.auth.Subject; +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.NameCallback; +import javax.security.auth.callback.PasswordCallback; +import javax.security.auth.callback.UnsupportedCallbackException; +import javax.security.auth.login.FailedLoginException; +import javax.security.auth.login.LoginException; + +public abstract class UsernamePasswordLoginModule extends AbstractServerLoginModule +{ + /** The login identity */ + private Principal identity; + /** The proof of login identity */ + private char[] credential; + /** the message digest algorithm used to hash passwords. If null then + plain passwords will be used. */ + private String hashAlgorithm = null; + /** the name of the charset/encoding to use when converting the password + String to a byte array. Default is the platform's default encoding. + */ + private String hashCharset = null; + /** the string encoding format to use. Defaults to base64. */ + private String hashEncoding = null; + /** A flag indicating if the password comparison should ignore case */ + private boolean ignorePasswordCase; + + /** Override the superclass method to look for the following options after + first invoking the super version. + @param options : + @option hashAlgorithm: the message digest algorithm used to hash passwords. + If null then plain passwords will be used. + @option hashCharset: the name of the charset/encoding to use when converting + the password String to a byte array. Default is the platform's default + encoding. + @option hashEncoding: the string encoding format to use. Defaults to base64. + @option ignorePasswordCase: A flag indicating if the password comparison + should ignore case + */ + public void initialize(Subject subject, CallbackHandler callbackHandler, + Map sharedState, Map options) + { + super.initialize(subject, callbackHandler, sharedState, options); + + // Check to see if password hashing has been enabled. + // If an algorithm is set, check for a format and charset. + hashAlgorithm = (String) options.get("hashAlgorithm"); + if( hashAlgorithm != null ) + { + hashEncoding = (String) options.get("hashEncoding"); + if( hashEncoding == null ) + hashEncoding = "BASE64"; //Util.BASE64_ENCODING; + hashCharset = (String) options.get("hashCharset"); + log.debug("Passworg hashing activated: algorithm = " + hashAlgorithm + + ", encoding = " + hashEncoding+ (hashCharset == null ? "" : "charset = " + hashCharset)); + } + String flag = (String) options.get("ignorePasswordCase"); + ignorePasswordCase = Boolean.valueOf(flag).booleanValue(); + } + + /** Perform the authentication of the username and password. + */ + public boolean login() throws LoginException + { + // See if shared credentials exist + if( super.login() == true ) + { + // Setup our view of the user + Object username = sharedState.get("javax.security.auth.login.name"); + if( username instanceof Principal ) + identity = (Principal) username; + else + { + String name = username.toString(); + try + { + identity = createIdentity(name); + } + catch(Exception e) + { + log.debug("Failed to create principal", e); + throw new LoginException("Failed to create principal: "+ e.getMessage()); + } + } + Object password = sharedState.get("javax.security.auth.login.password"); + if( password instanceof char[] ) + credential = (char[]) password; + else if( password != null ) + { + String tmp = password.toString(); + credential = tmp.toCharArray(); + } + return true; + } + + super.loginOk = false; + String[] info = getUsernameAndPassword(); + String username = info[0]; + String password = info[1]; + if( username == null && password == null ) + { + identity = unauthenticatedIdentity; + super.log.info("Authenticating as unauthenticatedIdentity="+identity); + } + + if( identity == null ) + { + try + { + identity = createIdentity(username); + } + catch(Exception e) + { + log.debug("Failed to create principal", e); + throw new LoginException("Failed to create principal: "+ e.getMessage()); + } + + // Hash the user entered password if password hashing is in use + if( hashAlgorithm != null ) + password = createPasswordHash(username, password); + // Validate the password supplied by the subclass + String expectedPassword = getUsersPassword(); + if( validatePassword(password, expectedPassword) == false ) + { + super.log.debug("Bad password for username="+username); + throw new FailedLoginException("Password Incorrect/Password Required"); + } + } + + if( getUseFirstPass() == true ) + { // Add the username and password to the shared state map + sharedState.put("javax.security.auth.login.name", username); + sharedState.put("javax.security.auth.login.password", credential); + } + super.loginOk = true; + super.log.info("User '" + identity + "' authenticated, loginOk="+loginOk); + return true; + } + + protected Principal getIdentity() + { + return identity; + } + protected Principal getUnauthenticatedIdentity() + { + return unauthenticatedIdentity; + } + + protected Object getCredentials() + { + return credential; + } + protected String getUsername() + { + String username = null; + if( getIdentity() != null ) + username = getIdentity().getName(); + return username; + } + + /** Called by login() to acquire the username and password strings for + authentication. This method does no validation of either. + @return String[], [0] = username, [1] = password + @exception LoginException thrown if CallbackHandler is not set or fails. + */ + protected String[] getUsernameAndPassword() throws LoginException + { + String[] info = {null, null}; + // prompt for a username and password + if( callbackHandler == null ) + { + throw new LoginException("Error: no CallbackHandler available " + + "to collect authentication information"); + } + NameCallback nc = new NameCallback("User name: ", "guest"); + PasswordCallback pc = new PasswordCallback("Password: ", false); + Callback[] callbacks = {nc, pc}; + String username = null; + String password = null; + try + { + callbackHandler.handle(callbacks); + username = nc.getName(); + char[] tmpPassword = pc.getPassword(); + if( tmpPassword != null ) + { + credential = new char[tmpPassword.length]; + System.arraycopy(tmpPassword, 0, credential, 0, tmpPassword.length); + pc.clearPassword(); + password = new String(credential); + } + } + catch(java.io.IOException ioe) + { + throw new LoginException(ioe.toString()); + } + catch(UnsupportedCallbackException uce) + { + throw new LoginException("CallbackHandler does not support: " + uce.getCallback()); + } + info[0] = username; + info[1] = password; + return info; + } + + /** + * If hashing is enabled, this method is called from login() + * prior to password validation. + *

+ * Subclasses may override it to provide customized password hashing, + * for example by adding user-specific information or salting. + *

+ * The default version calculates the hash based on the following options: + *

+ * It will return null if the hash fails for any reason, which will in turn + * cause validatePassword() to fail. + * + * @param username ignored in default version + * @param password the password string to be hashed + */ + protected String createPasswordHash(String username, String password) + { + String passwordHash = createPasswordHash(hashAlgorithm, hashEncoding, + hashCharset, username, password); + return passwordHash; + } + + /** A hook that allows subclasses to change the validation of the input + password against the expected password. This version checks that + neither inputPassword or expectedPassword are null that that + inputPassword.equals(expectedPassword) is true; + @return true if the inputPassword is valid, false otherwise. + */ + protected boolean validatePassword(String inputPassword, String expectedPassword) + { + if( inputPassword == null || expectedPassword == null ) + return false; + boolean valid = false; + if( ignorePasswordCase == true ) + valid = inputPassword.equalsIgnoreCase(expectedPassword); + else + valid = inputPassword.equals(expectedPassword); + return valid; + } + + + /** Get the expected password for the current username available via + the getUsername() method. This is called from within the login() + method after the CallbackHandler has returned the username and + candidate password. + @return the valid password String + */ + abstract protected String getUsersPassword() throws LoginException; + + public static String createPasswordHash(String hashAlgorithm, String hashEncoding, + String hashCharset, String username, String password) + { + //currently no implementation for password hashing. + return password; + /* + byte[] passBytes; + String passwordHash = null; + + // convert password to byte data + try + { + if(hashCharset == null) + passBytes = password.getBytes(); + else + passBytes = password.getBytes(hashCharset); + } + catch(Exception uee) + { + Logger log = Logger.getLogger(UsernamePasswordLoginModule.class); + log.error("charset " + hashCharset + " not found. Using platform default.", uee); + passBytes = password.getBytes(); + } + + // calculate the hash and apply the encoding. + try + { + byte[] hash = MessageDigest.getInstance(hashAlgorithm).digest(passBytes); + if(hashEncoding.equalsIgnoreCase("BASE64")) + { + passwordHash = Util.encodeBase64(hash); + } + else if(hashEncoding.equalsIgnoreCase("HEX")) + { + passwordHash = Util.encodeBase16(hash); + } + else + { + Logger log = Logger.getLogger(UsernamePasswordLoginModule.class); + log.error("Unsupported hash encoding format " + hashEncoding); + } + } + catch(Exception e) + { + Logger log = Logger.getLogger(UsernamePasswordLoginModule.class); + log.error("Password hash calculation failed ", e); + } + return passwordHash; + */ + + } + +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/WebAuthAuthenticator.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/WebAuthAuthenticator.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/WebAuthAuthenticator.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,25 @@ +/* + * Created on 2004-12-15 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package org.lamsfoundation.lams.admin.security; + +/** + * @author kevin + * + */ +public class WebAuthAuthenticator +{ + public WebAuthAuthenticator() + { + } + + public boolean authenticate(String username, String inputPassword) + { + //as for now, alway return true for webauth authenticated users + //TODO check session to see if the user is from webauth + return true; + } +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/security/WebAuthServlet.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/security/WebAuthServlet.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/security/WebAuthServlet.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,63 @@ +package org.lamsfoundation.lams.admin.security; + +import java.io.*; +import javax.servlet.*; +import javax.servlet.http.*; + +import org.springframework.web.context.support.WebApplicationContextUtils; +import org.springframework.web.context.WebApplicationContext; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.usermanagement.*; + +/** + * @author kevin + * + */ +public class WebAuthServlet extends HttpServlet { + + private static final String WEBAUTH_TOKEN = "WEBAUTH_USER"; + + public void init() throws ServletException + { + } + + public void service(HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException + { + HttpSession oldSession = request.getSession(false); + if ( oldSession != null ) + { + oldSession.invalidate(); + } + + String webAuthUserID = (String)request.getAttribute(WEBAUTH_TOKEN); + HttpSession session = request.getSession(true); + if ( webAuthUserID == null ) + //there is no valid WebAuth authenticated user + { + session.removeAttribute(WEBAUTH_TOKEN); + } + else + { + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext()); + UserManagementService service = (UserManagementService)ctx.getBean("userManagementServiceTarget"); + User webAuthUser = service.getUserByLogin(webAuthUserID); + + if (webAuthUser != null) + //valid webauth user also is registered in Lams as well + { + session.setAttribute(WEBAUTH_TOKEN, webAuthUserID); + } + else + //though webauth authenticated, but not registered. + { + session.removeAttribute(WEBAUTH_TOKEN); + } + } + + //In anycase, goto Lams welcome page + response.sendRedirect("index.jsp"); + + } + +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/util/AdminPreparer.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/util/AdminPreparer.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/util/AdminPreparer.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,55 @@ +/* + * Created on 2005-1-28 + * + * Last modified on 2005-1-28 + */ +package org.lamsfoundation.lams.admin.util; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; + +import org.lamsfoundation.lams.admin.web.AttributeNames; +import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.Role; +import org.lamsfoundation.lams.usermanagement.UserOrganisationRole; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; + +/** + * TODO Add description here + * + *

+ * View Source + *

+ * + * @author Fei Yang + */ +public class AdminPreparer { + + public static void prepare(Organisation org, HttpServletRequest request, UserManagementService service){ + UserOrganisationRole userOrgRole = null; + if(org.getParentOrganisation()!=null){ + userOrgRole = service.getUserOrganisationRole(request.getRemoteUser(),org.getParentOrganisation().getOrganisationId(),Role.ADMIN); + } + List childOrgs = service.getChildOrganisations(org); + for(int i=0; i + * View Source + *

+ * + * @author Fei Yang + */ +public class ExcelUserImportFileParser implements IUserImportFileParser{ + + /* + * start of definition of property keys used in the excel file + */ + private static final short LOGIN = 0; + private static final short PASSWORD = 1; + private static final short AUTH_METHOD = 2; + private static final short ROLE = 3; + private static final short STATUS = 4; + private static final short TITLE = 5; + private static final short FIRST_NAME = 6; + private static final short LAST_NAME = 7; + private static final short EMAIL = 8; + private static final short ADDRESS1 = 9; + private static final short ADDRESS2 = 10; + private static final short ADDRESS3 = 11; + private static final short CITY = 12; + private static final short STATE = 13; + private static final short COUNTRY = 14; + private static final short DAY_PHONE = 15; + private static final short EVE_PHONE = 16; + private static final short MOB_PHONE = 17; + private static final short FAX = 18; + + + private static String[] errMsgArray = + new String[]{LOGIN_REQUIRED,PASSWORD_REQUIRED,AUTH_METHOD_REQUIRED,ROLE_REQUIRED}; + //end of definition + + private boolean emptyRow; + private boolean hasError; + private String errMsgForRow; + private IUserManagementService service; + + public ExcelUserImportFileParser(IUserManagementService service){ + this.service = service; + } + + /** + * @see org.lamsfoundation.lams.admin.util.IUserImportFileParser#parseUsersInOrganisation(FileItem fileItem, Organisation org, String adminLogin, boolean existingUsersOnly) + */ + public String parseUsersInOrganisation(FileItem fileItem, Organisation org, String adminLogin, boolean existingUsersOnly) throws IOException{ + String errorMessage = ""; + POIFSFileSystem fs = new POIFSFileSystem(fileItem.getInputStream()); + HSSFWorkbook wb = new HSSFWorkbook(fs); + HSSFSheet sheet = wb.getSheetAt(0); + int startRow = sheet.getFirstRowNum(); + int endRow = sheet.getLastRowNum(); + int count = 0; + Double dbl; + Long l; + HSSFCell cell = null; + for (int i = startRow + 1; i < endRow + 1; i++) + { + emptyRow = true; + hasError = false; + errMsgForRow = ""; + HSSFRow row = sheet.getRow(i); + User user = new User(); + Set roles = null; + + user.setLogin(parseStringCell(row.getCell(LOGIN),i,LOGIN)); + if(existingUsersOnly){//if existingUsersOnly, ignore all the other columns + user = service.getUserByLogin(user.getLogin()); + if(user==null) + { + errMsgForRow = errMsgForRow + ROW + i + SKIP + parseStringCell(row.getCell(LOGIN),i,LOGIN) + USER_NOT_EXIST ; + hasError = true; + } + else{//check if the admin is authorised + List userOrgs = service.getUserOrganisationsForUser(user); + Iterator iter = userOrgs.iterator(); + boolean userOrgExisted = false; + boolean authorised = false; + while(iter.hasNext()){ + UserOrganisation userOrg = (UserOrganisation)iter.next(); + if(userOrg.getOrganisation().getOrganisationId().equals(org.getOrganisationId())){ + userOrgExisted = true; + break; + } + User admin = service.getUserByLogin(adminLogin); + Iterator iter2 = service.getUserOrganisationsForUser(admin).iterator(); + while(iter2.hasNext()){ + UserOrganisation adminOrg = (UserOrganisation)iter2.next(); + if(adminOrg.getOrganisation().getOrganisationId().equals(userOrg.getOrganisation().getOrganisationId())){ + authorised = true; + break; + } + } + if(authorised) + break; + } + if(!authorised) + { + errMsgForRow = errMsgForRow + ROW + i + SKIP + parseStringCell(row.getCell(LOGIN),i,LOGIN) + NO_AUTHORISATION; + hasError = true; + } + if(userOrgExisted){ + errMsgForRow = errMsgForRow + ROW + i + SKIP + parseStringCell(row.getCell(LOGIN),i,LOGIN) + MEMBERSHIP_EXIST + org.getName(); + hasError = true; + } + roles = parseRoleCell(row.getCell(ROLE),i,ROLE); + } + }else{ + user.setPassword(parseStringCell(row.getCell(PASSWORD),i,PASSWORD)); + user.setAuthenticationMethod(parseAuthMethodCell(row.getCell(AUTH_METHOD),i,AUTH_METHOD)); + roles = parseRoleCell(row.getCell(ROLE),i,ROLE); + user.setDisabledFlag(parseStatusCell(row.getCell(STATUS),i)); + user.setTitle(parseStringCell(row.getCell(TITLE),i,-1)); + user.setFirstName(parseStringCell(row.getCell(FIRST_NAME),i,-1)); + user.setLastName(parseStringCell(row.getCell(LAST_NAME),i,-1)); + user.setEmail(parseStringCell(row.getCell(EMAIL),i,-1)); + user.setAddressLine1(parseStringCell(row.getCell(ADDRESS1),i,-1)); + user.setAddressLine2(parseStringCell(row.getCell(ADDRESS2),i,-1)); + user.setAddressLine3(parseStringCell(row.getCell(ADDRESS3),i,-1)); + user.setCity(parseStringCell(row.getCell(CITY),i,-1)); + user.setState(parseStringCell(row.getCell(STATE),i,-1)); + user.setCountry(parseStringCell(row.getCell(COUNTRY),i,-1)); + user.setDayPhone(parseStringCell(row.getCell(DAY_PHONE),i,-1)); + user.setEveningPhone(parseStringCell(row.getCell(EVE_PHONE),i,-1)); + user.setMobilePhone(parseStringCell(row.getCell(MOB_PHONE),i,-1)); + user.setFax(parseStringCell(row.getCell(FAX),i,-1)); + } + + if (emptyRow) + { + break; + } + if (hasError) + { + errorMessage = errorMessage + errMsgForRow; + continue; + } + else + { + try + { + if(!existingUsersOnly){ + user.setCreateDate(new Date()); + user.setBaseOrganisation(service.getBaseOrganisation(org)); + service.createUser(user); + } + UserOrganisation userOrg = new UserOrganisation(); + userOrg.setUser(user); + userOrg.setOrganisation(org); + service.saveOrUpdateUserOrganisation(userOrg); + Iterator iter = roles.iterator(); + while(iter.hasNext()){ + UserOrganisationRole userOrgRole = new UserOrganisationRole(); + userOrgRole.setUserOrganisation(userOrg); + userOrgRole.setRole((Role)iter.next()); + service.saveOrUpdateUserOrganisationRole(userOrgRole); + } + count++; + } + catch (Exception e) + { + errMsgForRow = + errMsgForRow + + ROW + + i + + FAIL_ADD + + user.getLogin() + + SKIP + + e.getMessage(); + errorMessage = errorMessage + errMsgForRow; + } + } + } + return (count + SUCCESS_ADD + errorMessage); + } + + private String parseStringCell(HSSFCell cell, int row, int msgIndex){ + if ((msgIndex!=-1)&&(cell == null)) + { + if (hasError) + { + errMsgForRow = errMsgForRow + errMsgArray[msgIndex]; + } + else + { + errMsgForRow = errMsgForRow + ROW + row + SKIP + errMsgArray[msgIndex]; + hasError = true; + } + return null; + } + else if(cell!=null) + { + try{ + cell.setCellType(HSSFCell.CELL_TYPE_STRING); + if(cell.getStringCellValue()!= null){ + if(cell.getStringCellValue().trim().length()!= 0){ + emptyRow = false; + } + }else{ + return null; + } + return cell.getStringCellValue().trim(); + }catch(Exception e) + { + cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC); + double d = cell.getNumericCellValue(); + emptyRow = false; + return (new Long(new Double(d).longValue()).toString()); + } + } + return null; + } + + private AuthenticationMethod parseAuthMethodCell(HSSFCell cell, int row, int msgIndex){ + String authMethodName = parseStringCell(cell,row,msgIndex); + if(authMethodName==null){ + return null; + }else{ + return service.getAuthenticationMethodByName(authMethodName); + } + } + + private Set parseRoleCell(HSSFCell cell, int row, int msgIndex) + { + String roleDescription = ""; + if ((msgIndex!=-1)&&(cell == null)) + { + if (hasError) + { + errMsgForRow = errMsgForRow + errMsgArray[msgIndex]; + } + else + { + errMsgForRow = errMsgForRow + ROW + row + SKIP + errMsgArray[msgIndex]; + hasError = true; + } + return null; + } + else if(cell!=null) + { + try{ + cell.setCellType(HSSFCell.CELL_TYPE_STRING); + if(cell.getStringCellValue()!= null){ + if(cell.getStringCellValue().trim().length()!= 0){ + emptyRow = false; + } + }else{ + return null; + } + roleDescription = cell.getStringCellValue().trim(); + }catch(Exception e) + { + return null; + } + + } + Set roles = new HashSet(); + int fromIndex = 0; + int index = roleDescription.indexOf(SEPERATOR, fromIndex); + while (index != -1) + { + Role role = service.getRoleByName(roleDescription.substring(fromIndex, index)); + if(role!=null)//ignore wrong spelled role + { + roles.add(role); + } + fromIndex = index + 1; + index = roleDescription.indexOf(SEPERATOR, fromIndex); + } + Role role = service.getRoleByName(roleDescription.substring(fromIndex, roleDescription.length())); + if(role!=null){ + roles.add(role); + } + return roles; + } + + private Boolean parseStatusCell(HSSFCell cell, int row) + { + String status = parseStringCell(cell,row,-1); + return new Boolean(STATUS_DISABLED.equals(status)); + } +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/util/IUserImportFileParser.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/util/IUserImportFileParser.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/util/IUserImportFileParser.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,44 @@ +/* + * Created on 2005-1-19 + * + * Last modified on 2005-1-19 + */ +package org.lamsfoundation.lams.admin.util; + +import java.io.IOException; + +import org.apache.commons.fileupload.FileItem; + +import org.lamsfoundation.lams.usermanagement.Organisation; + +/** + * TODO Add description here + * + *

+ * View Source + *

+ * + * @author Fei Yang + */ +public interface IUserImportFileParser { + + public static final String STATUS_DISABLED = "disabled"; + public static final String SEPERATOR = "|"; + public static final String NO_AUTHORISATION = + "
You are not authorised to select the user!"; + public static final String ROW = "
Row "; + public static final String FAIL_ADD = ": Failed to add "; + public static final String SUCCESS_ADD = + " user(s) have been added successfully!"; + public static final String SKIP = ": Skipped. Error was: "; + public static final String USER_NOT_EXIST = " does not exist! "; + public static final String MEMBERSHIP_EXIST = " is already a member of the current org: "; + + public static final String LOGIN_REQUIRED = "Login is required."; + public static final String PASSWORD_REQUIRED = "Password is required."; + public static final String AUTH_METHOD_REQUIRED = "Authentication method is required."; + public static final String ROLE_REQUIRED = "Role is required."; + + public String parseUsersInOrganisation(FileItem fileItem, Organisation org, String adminLogin, boolean existingUsersOnly) throws IOException; + +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/AdminAction.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/AdminAction.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/AdminAction.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,486 @@ +package org.lamsfoundation.lams.admin.web; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.Iterator; +import java.util.List; +import java.util.ArrayList; +import java.util.Date; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.actions.DispatchAction; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import org.lamsfoundation.lams.admin.util.AdminPreparer; +import org.lamsfoundation.lams.admin.util.ExcelUserImportFileParser; +import org.lamsfoundation.lams.admin.web.UserActionForm; +import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.UserOrganisation; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.Role; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.web.HttpSessionManager; +import org.lamsfoundation.lams.util.UploadFileUtil; + +/** + * Main access calls for the normal user adminstration screens. + * + * @author Fei Yang + * + * @struts:action path="/admin" validate="false" parameter="method" + * @struts:action-forward name="admin" path=".admin" + * @struts:action-forward name="organisation" path=".admin.organisation" + * @struts:action-forward name="user" path=".admin.user" + * @struts:action-forward name="usersadd" path=".admin.usersadd" + * @struts:action-forward name="usersremove" path=".admin.usersremove" + * @struts:action-forward name="error" path=".admin.error" + */ +public class AdminAction extends DispatchAction { + + private static Logger log = Logger.getLogger(AdminAction.class); + + private static WebApplicationContext ctx = WebApplicationContextUtils + .getWebApplicationContext(HttpSessionManager.getInstance() + .getServletContext()); + + private static UserManagementService service = (UserManagementService) ctx + .getBean("userManagementServiceTarget"); + + public ActionForward getAdmin(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + log.debug("getAdmin"); + Integer orgId = null; + try { + if (request.getParameter("orgId") != null) { + orgId = new Integer(request.getParameter("orgId").trim()); + } + } catch (NumberFormatException e) { + } + + boolean error = false; + + if (orgId == null) { + log.error("There is no 'orgId' parameter in the request"); + error = true; + } else {//edit organisation + Organisation org = service.getOrganisationById(orgId); + if (org != null) { + log.debug("Copying properties from org " + org.toString()); + AdminPreparer.prepare(org,request,service); + } else { + log.error("Organisation id " + orgId + " not found"); + error = true; + } + } + + return mapping.findForward(error ? "error" : "admin"); + } + + + /** + * Initial call that loads up the form for editing the name/description of + * an organisation. + */ + public ActionForward getOrganisationEdit(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + log.debug("getOrganisationEdit"); + + Integer orgId = null; + try { + if (request.getParameter("orgId") != null) { + orgId = new Integer(request.getParameter("orgId").trim()); + } + } catch (NumberFormatException e) { + } + + boolean error = false; + + OrganisationActionForm orgForm = new OrganisationActionForm(); + + if (orgId == null) { + log.error("There is no 'orgId' parameter in the request"); + error = true; + } else if (orgId.intValue() == -1) {//create child organisation + orgForm.setOrgId(new Integer(-1)); + orgForm.setName(""); + orgForm.setDescription(""); + Integer parentOrgId = new Integer(request.getParameter( + "parentOrgId").trim()); + Organisation parent = service.getOrganisationById(parentOrgId); + if (parent != null) { + orgForm.setParentOrgId(parent.getOrganisationId()); + orgForm.setParentOrgName(parent.getName()); + } else { + log + .error("Creating new top level organisation (parent organisation id not found)"); + error = true; + } + } else {//edit organisation + Organisation org = service.getOrganisationById(orgId); + if (org != null) { + log.debug("Copying properties from org " + org.toString()); + orgForm.setOrgId(org.getOrganisationId()); + orgForm.setName(org.getName()); + orgForm.setDescription(org.getDescription()); + } else { + log.error("Organisation id " + orgId + " not found"); + error = true; + } + } + + request.getSession(true).setAttribute(OrganisationActionForm.formName, + orgForm); + return mapping.findForward(error ? "error" : "organisation"); + } + + /** + * import users form file + * + * @return screen reference name - "error" or "admin" + */ + public ActionForward importUsersFromFile(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + boolean error = false; + if (request.getParameter("orgId") == null) { + error = true; + log.error("There is no 'orgId' parameter in the reuqest"); + } else { + Integer orgId = new Integer(request.getParameter("orgId").trim()); + Organisation org = service.getOrganisationById(orgId); + FileItem fileToUpload = null; + String errorMessage = null; + List items = null; + try { + items = UploadFileUtil.getUploadItems(request, false, null); + Iterator iter = items.iterator(); + while (iter.hasNext()) { + FileItem item = (FileItem) iter.next(); + log.debug("Request item: " + item.toString()); + if (!(item.getName() == null || item.getSize() == 0)) { + fileToUpload = item; + } + } + if (fileToUpload == null) { + error = true; + log.error("There is no file uploaded"); + } else { + ExcelUserImportFileParser parser = new ExcelUserImportFileParser( + service); + //TODO Test if existingUserOnly works + boolean existingUsersOnly = ((String) request + .getParameter("existingUsersOnly")).equals("true"); + errorMessage = parser.parseUsersInOrganisation( + fileToUpload, org, request.getRemoteUser(), + existingUsersOnly); + } + } catch (FileUploadException fue) { + log.error("Unable to upload file. Exception occured: ", fue); + errorMessage = "Unable to upload file. Error was:" + + fue.getMessage(); + } catch (IOException e) { + log + .error("IOException happened when processing uploaded file: " + + e); + errorMessage = "IOException happened when processing uploaded file: " + + e.getMessage(); + } catch (Exception e) { + log.error("Exception happened when uploading file: " + e); + errorMessage = "Exception happened when uploading file: " + + e.getMessage(); + } + AdminPreparer.prepare(org,request,service); + if (errorMessage != null) { + request.setAttribute(AttributeNames.ADMIN_ERR_MSG,errorMessage); + } + } + return mapping.findForward(error ? "error" : "admin"); + } + + /** + * Does the actual work that loads up the user form for editing. + * + * @return Screen reference name - "error" or "userentry" + */ + public ActionForward getUserEdit(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + + log.debug("getUserEdit"); + Integer editUserId = null; // the user to modify + String adminUserLogin = null; + + try { + if (request.getParameter("userid") != null) { + editUserId = new Integer(request.getParameter("userid").trim()); + } + } catch (NumberFormatException e) { + } + + UserActionForm newForm = null; + boolean error = false; + + try { + + adminUserLogin = request.getRemoteUser(); + + Integer orgId = null; + try { + if (request.getParameter("orgId") != null) { + orgId = new Integer(request.getParameter("orgId").trim()); + } + } catch (NumberFormatException e) { + } + + Organisation org = service.getOrganisationById(orgId); + if (org == null) { + log.error("implUserEdit: Organisation not found " + orgId); + error = true; + } else { + request.setAttribute(AttributeNames.ADMIN_ORGANISATION, org); + User user = null; + if (editUserId == null) { + editUserId = new Integer(-1); + } else { + user = service.getUserById(editUserId); + } + + if (user != null) { + newForm = setupEditUserActionForm(editUserId, org, user); + } else { + newForm = setupNewUserActionForm(org); + } + + } + + } catch (IllegalAccessException e) { + log.error("Exception occured ", e); + error = true; + } catch (InvocationTargetException e) { + log.error("Exception occured ", e); + error = true; + } + + log.debug("getUserEdit: Form is " + newForm.toMap().toString()); + + // Form bean has to go in the session otherwise end up with two form + // beans + // floating around the system. + request.getSession(true).setAttribute(UserActionForm.formName, newForm); + return mapping.findForward(error ? "error" : "user"); + } + + private UserActionForm setupNewUserActionForm(Organisation org) { + UserActionForm newForm = new UserActionForm(); + + newForm.setOrgId(org.getOrganisationId()); + newForm.setCreateNew(true); + newForm.setDisabledFlag(new Boolean(false)); + newForm.setCreateDate(new Date()); + newForm.setRoleNames(new String[0]); + newForm.setNewMembershipOrganisationId(org.getOrganisationId()); + newForm.setAllAuthMethods(service.getAllAuthenticationMethods()); + newForm.setNewMembershipOrgName(org.getName()); + return newForm; + } + + private UserActionForm setupEditUserActionForm(Integer editUserId, + Organisation org, User user) throws IllegalAccessException, + InvocationTargetException { + + UserActionForm newForm = new UserActionForm(); + BeanUtils.copyProperties(newForm, user); + newForm.setPasswordConfirm(newForm.getPassword()); + newForm.setOrgId(org.getOrganisationId()); + newForm.setOtherMemberships(service.getUserOrganisationsForUser(user)); + newForm.setAllAuthMethods(service.getAllAuthenticationMethods()); + newForm.setCreateNew(false); + newForm.setRoleNames(getRoleNames(user, org.getOrganisationId())); + return newForm; + } + + // get the users roles + private String[] getRoleNames(User user, Integer orgId) { + + String rolenames[] = new String[service.getRolesForUserByOrganisation( + user, orgId).size()]; + Iterator iter = service.getRolesForUserByOrganisation(user, orgId) + .iterator(); + int i = 0; + while (iter.hasNext()) { + Role role = (Role) iter.next(); + rolenames[i] = role.getName(); + i++; + } + + return rolenames; + } + + /** + * Do the actual work that loads up the organisation add user form for + * editing + * + * @return screen reference name - "error" or "usersadd" + */ + public ActionForward getUsersAdd(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + + log.debug("getUsersAdd"); + Integer orgId = null; + try { + if (request.getParameter("orgId") != null) { + orgId = new Integer(request.getParameter("orgId").trim()); + } + } catch (NumberFormatException e) { + } + + UsersAddActionForm newForm = null; + boolean error = false; + + if (orgId == null) { + log.error("getUsersAdd: Missing parameter " + "orgId"); + error = true; + } else { + newForm = setupOrgAddUserForm(request, orgId); + } + + if (newForm == null || error) { + request.getSession(true).removeAttribute(UsersAddActionForm.formName); + return mapping.findForward("error"); + } else { + // has to go in the session otherwise end up with two form beans + // floating around the system. + request.getSession(true).setAttribute(UsersAddActionForm.formName,newForm); + return mapping.findForward("usersadd"); + } + } + + private UsersAddActionForm setupOrgAddUserForm(HttpServletRequest request, + Integer orgId) { + + boolean error = false; + UsersAddActionForm newForm = new UsersAddActionForm(); + try { + Organisation org = service.getOrganisationById(orgId); + if (org != null) { + log.debug("Copying properties from org " + org.toString()); + newForm.setName(org.getName()); + newForm.setDescription(org.getDescription()); + newForm.setOrgId(org.getOrganisationId()); + } else { + log.error("getUsersAdd: Organisation not found or not available to this user. Id #="+ orgId); + error = true; + } + + // get all the organisation that the user can select from. + User adminUser = service.getUserByLogin(request.getRemoteUser()); + List userOrgs = service.getUserOrganisationsForUser(adminUser); + newForm.setAvailableOrgs(getOrgsWithAdminRole(userOrgs, org)); + + newForm.setSelectedOrgId(new Integer(-1)); + + } catch (Exception e) { + log.error("Exception occured ", e); + error = true; + } + + if (error) { + newForm = null; + return null; + } else { + return newForm; + } + } + + private List getOrgsWithAdminRole(List userOrgs, Organisation currentOrg) { + List orgs = new ArrayList(); + Iterator iter = userOrgs.iterator(); + while (iter.hasNext()) { + UserOrganisation userOrg = (UserOrganisation) iter.next(); + List roles = service.getRolesForUserByOrganisation(userOrg + .getUser(), userOrg.getOrganisation().getOrganisationId()); + if (!userOrg.getOrganisation().getOrganisationId().equals( + currentOrg.getOrganisationId())) { + Iterator iter2 = roles.iterator(); + while (iter2.hasNext()) { + Role role = (Role) iter2.next(); + if (role.getName().equals(Role.ADMIN)) { + orgs.add(userOrg.getOrganisation()); + } + } + } + } + return orgs; + } + + /** + * Initial call that loads up the organisation remove user form for editing + */ + public ActionForward getUsersRemove(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { + + log.debug("getUsersRemove"); + Integer orgId = null; + try { + if (request.getParameter("orgId") != null) { + orgId = new Integer(request.getParameter("orgId").trim()); + } + } catch (NumberFormatException e) { + } + + UsersRemoveActionForm newForm = new UsersRemoveActionForm(); + log.debug("orgId=" + orgId); + boolean error = false; + + if (orgId == null) { + log.error("getOrganisationAddUsers: Missing parameter " + "orgId"); + error = true; + } else { + Organisation org = service.getOrganisationById(orgId); + if (org != null) { + log.debug("Copying properties from org " + org.toString()); + newForm.setName(org.getName()); + newForm.setDescription(org.getDescription()); + newForm.setOrgId(org.getOrganisationId()); + // need only the users who aren't home users! + List users = service.getUsersFromOrganisation(orgId); + for(int i=0; i + * View Source + *

+ * + * @author Fei Yang + */ +public class AttributeNames { + + public static final String ADMIN_ORGANISATION = "organisation"; + public static final String ADMIN_PARENT_ACCESS = "parentAccess"; + public static final String ADMIN_USER = "user"; + public static final String ADMIN_ERR_MSG = "errormsg"; + +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationAction.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationAction.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationAction.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,145 @@ +package org.lamsfoundation.lams.admin.web; + +import java.io.IOException; +import java.util.Date; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessages; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import org.lamsfoundation.lams.admin.util.AdminPreparer; +import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.Role; +import org.lamsfoundation.lams.usermanagement.UserOrganisation; +import org.lamsfoundation.lams.usermanagement.UserOrganisationRole; +import org.lamsfoundation.lams.usermanagement.OrganisationType; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.web.HttpSessionManager; + +/** + * @author Fei Yang + * + * @struts:action path="/admin/organisation" + * name="OrganisationActionForm" + * input=".admin.organisation" + * scope="session" + * validate="true" + * + * @struts:action-forward name="admin" path=".admin" + * @struts:action-forward name="error" path=".admin.error" + */ +public class OrganisationAction extends Action { + + private static Logger log = Logger.getLogger(OrganisationAction.class); + private static WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); + private static UserManagementService service = (UserManagementService) ctx.getBean("userManagementServiceTarget"); + + /** + * Perform is called when the OrganisationActionForm is processed. + * + * @param mapping The ActionMapping used to select this instance + * @param actionForm The optional ActionForm bean for this request (if any) + * @param request The HTTP request we are processing + * @param response The HTTP response we are creating + * + * @exception IOException if an input/output error occurs + * @exception ServletException if a servlet exception occurs + */ + public ActionForward execute(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws Exception + { + + ActionErrors errors = new ActionErrors(); + log.debug("Form type is "+form.getClass().toString()); + log.debug("Form is "+form.toString()); + + OrganisationActionForm orgForm = (OrganisationActionForm) form; + Organisation org = null; + + // -- isCancelled? + if (isCancelled(request)) { + if(orgForm.getOrgId().intValue()!=-1){ + org=service.getOrganisationById(orgForm.getOrgId()); + }else{ + org=service.getOrganisationById(orgForm.getParentOrgId()); + } + AdminPreparer.prepare(org,request,service); + request.getSession(true).removeAttribute(OrganisationActionForm.formName); + return mapping.findForward("admin"); + } + + if (errors.isEmpty()) + { + log.debug("Call update organisation, based on form data "+orgForm); + + try { + if(orgForm.getOrgId().intValue()!=-1){//edit organisation + org = service.getOrganisationById(orgForm.getOrgId()); + org.setName(orgForm.getName()); + org.setDescription(orgForm.getDescription()); + service.saveOrUpdateOrganisation(org); + }else{//create child organisation + org = new Organisation(); + org.setName(orgForm.getName()); + org.setDescription(orgForm.getDescription()); + Organisation parentOrg = service.getOrganisationById(orgForm.getParentOrgId()); + org.setParentOrganisation(parentOrg); + org.setCreateDate(new Date()); + OrganisationType orgType; + if(parentOrg.getOrganisationType().getName().equals(OrganisationType.ROOT)){ + orgType = service.getOrganisationTypeByName(OrganisationType.BASE); + }else{ + orgType = service.getOrganisationTypeByName(OrganisationType.SUB); + } + org.setOrganisationType(orgType); + service.saveOrUpdateOrganisation(org); + UserOrganisation userOrg = new UserOrganisation(); + User user = service.getUserByLogin(request.getRemoteUser()); + userOrg.setUser(user); + userOrg.setOrganisation(org); + service.saveOrUpdateUserOrganisation(userOrg); + UserOrganisationRole userOrgRole = new UserOrganisationRole(); + userOrgRole.setUserOrganisation(userOrg); + userOrgRole.setRole(service.getRoleByName(Role.ADMIN)); + service.saveOrUpdateUserOrganisationRole(userOrgRole); + } + AdminPreparer.prepare(org,request,service); + } catch (Exception e) { + log.error("Exception happened when getOrganisationEdit",e); + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(e.getMessage())); + } + + } + + // -- Report any errors + if (!errors.isEmpty()) { + addErrors(request, errors); + if (mapping.getInput()!=null) + return (new ActionForward(mapping.getInput())); + // If no input page, use error forwarding + return (mapping.findForward("error")); + }else{ + return mapping.findForward("admin"); + } + + + } // end ActionForward + + +} // end Action + + Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationActionForm.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationActionForm.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationActionForm.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,159 @@ +package org.lamsfoundation.lams.admin.web; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; + +/** + * @author Fei Yang + * + * @struts:form name="OrganisationActionForm" + * include-pk="true" + * include-all="true" + */ +public class OrganisationActionForm extends ActionForm { + + private static Logger log = Logger.getLogger(OrganisationActionForm.class); + public static final String formName = "OrganisationActionForm"; // must match name in @struts:action section above + + private Integer orgId; + private String name; + private String description; + private Integer parentOrgId; // display only - don't update + private String parentOrgName; //display only - don't update + + public OrganisationActionForm() + { + orgId = new Integer(-1); + } + + /** + * Returns the name + * @return String + */ + public String getName() { + return name; + } + + /** + * Returns the description + * @return String + */ + public String getDescription() { + return description; + } + + + /** + * Sets the name. + * @param name The name to set + */ + public void setName(String name) { + this.name = StringUtils.trimToEmpty(name); + } + + /** + * Sets the description. + * @param description The description to set + */ + public void setDescription(String description) { + this.description = StringUtils.trimToEmpty(description); + } + + + /** + * Sets the sid. + * @param sid The sid to set + */ + public void setOrgId(Integer orgId) { + log.debug("Setting orgId "+orgId); + this.orgId = orgId; + } + + /** + * Returns the orgId. + * @return Integer + */ + public Integer getOrgId() { + return orgId; + } + + /** + * Reset all properties to their default values. + * + * @param mapping The mapping used to select this instance + * @param request The servlet request we are processing + */ + public void reset(ActionMapping mapping, HttpServletRequest request) { + setOrgId(new Integer(-1)); + setName(null); + setDescription(null); + } + + /** + * Validate the properties that have been set from this HTTP request, + * and return an ActionErrors object that encapsulates any + * validation errors that have been found. If no errors are found, return + * null or an ActionErrors object with no + * recorded error messages. + *

+ * @param mapping The mapping used to select this instance + * @param request The servlet request we are processing + */ + public ActionErrors validate(ActionMapping mapping, + HttpServletRequest request) { + ActionErrors errors = super.validate(mapping, request); + + if (errors==null) errors = new ActionErrors(); + + if ( getName() == null || getName().length()==0) + { + errors.add("name", new ActionMessage("error.name.required")); + } + if ( getDescription() == null || getDescription().length()==0) + { + errors.add("description", new ActionMessage("error.description.required")); + } + if (errors.isEmpty()) return null; + else return errors; + + } + + /** + * Returns the parentOrgName. + * @return String + */ + public String getParentOrgName() { + return parentOrgName; + } + + /** + * Returns the parentOrgOrgId. + * @return Integer + */ + public Integer getParentOrgId() { + return parentOrgId; + } + + /** + * Sets the parentOrgName. + * @param parentOrgName The parentOrgName to set + */ + public void setParentOrgName(String parentOrgName) { + this.parentOrgName = parentOrgName; + } + + /** + * Sets the parentOrgId. + * @param parentOrgId The parentOrgId to set + */ + public void setParentOrgId(Integer parentOrgId) { + this.parentOrgId = parentOrgId; + } + +} Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserAction.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserAction.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserAction.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,151 @@ +package org.lamsfoundation.lams.admin.web; + +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + + +import org.apache.commons.beanutils.BeanUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import org.lamsfoundation.lams.admin.util.AdminPreparer; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.Role; +import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.UserOrganisation; +import org.lamsfoundation.lams.usermanagement.UserOrganisationRole; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.web.HttpSessionManager; + + +/** + * @author Fei Yang + * + * @struts:action path="/user" + * name="UserActionForm" + * input=".admin.user" + * scope="session" + * validate="true" + * + * @struts:action-forward name="admin" path=".admin" + * @struts:action-forward name="error" path=".admin.error" + * + */ +public class UserAction extends Action { + + private static Logger log = Logger.getLogger(UserAction.class); + private static WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); + private static UserManagementService service = (UserManagementService) ctx.getBean("userManagementServiceTarget"); + + + /** + * Perform is called when the UserActionForm is processed. + * + * @param mapping The ActionMapping used to select this instance + * @param actionForm The optional ActionForm bean for this request (if any) + * @param request The HTTP request we are processing + * @param response The HTTP response we are creating + * + * @exception IOException if an input/output error occurs + * @exception ServletException if a servlet exception occurs + */ + public ActionForward execute(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws Exception + { + + ActionErrors errors = new ActionErrors(); + + UserActionForm userForm = (UserActionForm) form; + Integer editUserId = null; // id of the user being modified + Integer orgId = userForm.getOrgId(); + Organisation org = service.getOrganisationById(orgId); + + // -- isCancelled? + if (isCancelled(request)) { + AdminPreparer.prepare(org,request,service); + request.getSession(true).removeAttribute(UserActionForm.formName); + return mapping.findForward("admin"); + } + + // Okay, update the database + if (errors.isEmpty()) + { + log.debug("Call update user, based on form data "+userForm.toMap().toString()); + + User user = new User(); + + try { + + BeanUtils.copyProperties(user,userForm.toMap()); + log.debug("Copied values "+user.toString()); + String authMethodName = userForm.getAuthMethodName(); + user.setAuthenticationMethod(service.getAuthenticationMethodByName(authMethodName)); + service.saveOrUpdateUser(user); + editUserId = user.getUserId(); + UserOrganisation userOrg; + if(userForm.isCreateNew()){ + userOrg = new UserOrganisation(); + userOrg.setUser(user); + userOrg.setOrganisation(org); + service.saveOrUpdateUserOrganisation(userOrg); + }else{ + userOrg = service.getUserOrganisation(user.getUserId(),orgId); + } + + // interpret the role strings returned by the checkboxes. + String roleNames[] = userForm.getRoleNames(); + log.debug("Rolenames from form: "+roleNames); + + List roles = new ArrayList(); + for(int i=0; iActionErrors object that encapsulates any + * validation errors that have been found. If no errors are found, return + * null or an ActionErrors object with no + * recorded error messages. + *

+ * + * @param mapping + * The mapping used to select this instance + * @param request + * The servlet request we are processing + */ + public ActionErrors validate(ActionMapping mapping, + HttpServletRequest request) { + + ActionErrors errors = super.validate(mapping, request); + + if (errors == null) + errors = new ActionErrors(); + + if (getLogin() == null || getLogin().length() == 0) { + errors.add("login", new ActionMessage("error.username.required")); + } + if ((getAuthMethodName() == null) + || (getAuthMethodName().length() == 0)) { + errors.add("authmethod", new ActionMessage( + "error.authmethod.required")); + } + if ((getPassword() != null && getPassword().length() != 0) + || (getPasswordConfirm() != null && getPasswordConfirm() + .length() != 0)) { + // something entered in the password fields, make sure that they + // both the same + if (getPassword() == null + || !getPassword().equals(getPasswordConfirm())) { + errors.add("password", new ActionMessage("error.password.match")); + } + } + if (isCreateNew() + && (getPassword() == null || getPassword().length() == 0)) { + errors.add("password", new ActionMessage("error.password.required")); + } + if (getRoleNames() == null || getRoleNames().length == 0) { + errors.add("roles", new ActionMessage("error.role.required")); + } + + if (errors.isEmpty()) + return null; + else { + // don't want to pass back what they had as the password +System.err.println("=====>UserActionForm validation errors: " + errors); + setPassword(null); + setPasswordConfirm(null); + return errors; + } + + } + +} \ No newline at end of file Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UsersAddAction.java =================================================================== diff -u --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UsersAddAction.java (revision 0) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UsersAddAction.java (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,200 @@ +package org.lamsfoundation.lams.admin.web; + +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.util.Iterator; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + + +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import org.lamsfoundation.lams.admin.util.AdminPreparer; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.Role; +import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.UserOrganisation; +import org.lamsfoundation.lams.usermanagement.UserOrganisationRole; +import org.lamsfoundation.lams.usermanagement.service.UserManagementService; +import org.lamsfoundation.lams.web.HttpSessionManager; + +/** + * @author Fei Yang + * + * @struts:action path="/usersadd" + * name="UsersAddActionForm" + * input=".admin.usersadd" + * scope="session" + * validate="false" + * + * @struts:action-forward name="admin" path=".admin" + * @struts:action-forward name="usersadd" path=".admin.usersadd" + * @struts:action-forward name="error" path=".admin.error" + */ +public class UsersAddAction extends Action { + + private static Logger log = Logger.getLogger(UsersAddAction.class); + private static WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(HttpSessionManager.getInstance().getServletContext()); + private static UserManagementService service = (UserManagementService) ctx.getBean("userManagementServiceTarget"); + + public static final String SUBMIT_SHOW_USERS = "Show Users"; + public static final String SUBMIT_ADD_USERS = "Add Selected Users"; + + /** + * @param mapping The ActionMapping used to select this instance + * @param actionForm The optional ActionForm bean for this request (if any) + * @param request The HTTP request we are processing + * @param response The HTTP response we are creating + * + * @exception Exception if any error occurs + */ + public ActionForward execute(ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws Exception + { + + UsersAddActionForm dataForm = (UsersAddActionForm) form; + // -- isCancelled? + if (isCancelled(request)) { + Organisation org = service.getOrganisationById(dataForm.getOrgId()); + AdminPreparer.prepare(org,request,service); + request.getSession(true).removeAttribute(UsersAddActionForm.formName); + return mapping.findForward("admin"); + } + + ActionErrors errors = new ActionErrors(); + + Integer orgId = null; + boolean finished = false; + + // Okay, update the database + if (errors.isEmpty()) + { + try { + log.debug("dataForm is "+dataForm); + orgId = dataForm.getOrgId(); + if ( orgId == null || orgId.intValue()==-1) + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.system")); + else{ + if ( isShowUsers(request) ) + { + addUsersToForm(request, dataForm); + } + else + { + addUsersToOrg(request, dataForm,errors); + finished = true; + } + } + } catch (Exception e) { + log.error("Exception occured ",e); + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.system")); + } + + } // end if errors empty + + // -- Report any errors + if (!errors.isEmpty()) { + addErrors(request, errors); + request.getSession(true).removeAttribute(UsersAddActionForm.formName); + if (mapping.getInput()!=null) + return (new ActionForward(mapping.getInput())); + // If no input page, use error forwarding + return (mapping.findForward("error")); + } + + if ( finished ) + { + request.getSession(true).removeAttribute(UsersAddActionForm.formName); + Organisation org = service.getOrganisationById(orgId); + AdminPreparer.prepare(org,request,service); + return ( mapping.findForward("admin") ); + } + else + { + return ( mapping.findForward("usersadd")); + } + } + + private void addUsersToOrg(HttpServletRequest request, + UsersAddActionForm dataForm,ActionErrors errors) + { + Integer orgId = dataForm.getOrgId(); + Organisation org = service.getOrganisationById(orgId); + String[] potentialRoleNames = dataForm.getPotentialRoleNames(); + String lastLogin=""; + UserOrganisation lastUserOrg = null; + for(int i=0; i + + + + + java:/jaas/lams + + + Index: lams_admin/web/WEB-INF/jstl/c-rt.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/jstl/c-rt.tld (revision 0) +++ lams_admin/web/WEB-INF/jstl/c-rt.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,393 @@ + + + + 1.0 + 1.2 + c_rt + http://java.sun.com/jstl/core_rt + JSTL core RT + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + Provides core validation features for JSTL tags. + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + true + boolean + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + true + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + true + + + charEncoding + false + true + + + + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + true + java.lang.Object + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + true + java.lang.String + + + delims + true + true + java.lang.String + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + true + + + default + false + true + + + escapeXml + false + true + + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + true + + + value + false + true + + + + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + false + true + + + context + false + true + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + true + + + target + false + true + + + property + false + true + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + Creates a URL with optional query parameters. + + + var + false + false + + + scope + false + false + + + value + false + true + + + context + false + true + + + + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + true + boolean + + + + Index: lams_admin/web/WEB-INF/jstl/c.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/jstl/c.tld (revision 0) +++ lams_admin/web/WEB-INF/jstl/c.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,416 @@ + + + + 1.0 + 1.2 + c + http://java.sun.com/jstl/core + JSTL core + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + expressionAttributes + + out:value + out:default + out:escapeXml + if:test + import:url + import:context + import:charEncoding + forEach:items + forEach:begin + forEach:end + forEach:step + forTokens:items + forTokens:begin + forTokens:end + forTokens:step + param:encode + param:name + param:value + redirect:context + redirect:url + set:property + set:target + set:value + url:context + url:value + when:test + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + false + + + default + false + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.el.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + false + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.el.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + false + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + false + + + charEncoding + false + false + + + + + forEach + org.apache.taglibs.standard.tag.el.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.el.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + false + + + delims + true + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + false + + + value + false + false + + + + + redirect + org.apache.taglibs.standard.tag.el.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + true + false + + + context + false + false + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.el.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + false + + + target + false + false + + + property + false + false + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.el.core.UrlTag + JSP + + Prints or exposes a URL with optional query parameters + (via the c:param tag). + + + var + false + false + + + scope + false + false + + + value + true + false + + + context + false + false + + + + + when + org.apache.taglibs.standard.tag.el.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + false + + + + Index: lams_admin/web/WEB-INF/jstl/fmt-rt.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/jstl/fmt-rt.tld (revision 0) +++ lams_admin/web/WEB-INF/jstl/fmt-rt.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,403 @@ + + + + 1.0 + 1.2 + fmt_rt + http://java.sun.com/jstl/fmt_rt + JSTL fmt RT + JSTL 1.0 i18n-capable formatting library + + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + Provides core validation features for JSTL tags. + + + + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + Sets the request character encoding + + + value + false + true + + + + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + Stores the given locale in the locale configuration variable + + + value + true + true + + + variant + false + true + + + scope + false + false + + + + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + + value + true + true + + + + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + Stores the given time zone in the time zone configuration variable + + + value + true + true + + + var + false + false + + + scope + false + false + + + + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + Loads a resource bundle to be used by its tag body + + + basename + true + true + + + prefix + false + true + + + + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + + basename + true + true + + + var + false + false + + + scope + false + false + + + + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + Maps key to localized message and performs parametric replacement + + + key + false + true + + + bundle + false + true + + + var + false + false + + + scope + false + false + + + + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + Supplies an argument for parametric replacement to a containing + <message> tag + + + value + false + true + + + + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + Formats a numeric value as a number, currency, or percentage + + + value + false + true + + + type + false + true + + + pattern + false + true + + + currencyCode + false + true + + + currencySymbol + false + true + + + groupingUsed + false + true + + + maxIntegerDigits + false + true + + + minIntegerDigits + false + true + + + maxFractionDigits + false + true + + + minFractionDigits + false + true + + + var + false + false + + + scope + false + false + + + + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + Parses the string representation of a number, currency, or percentage + + + value + false + true + + + type + false + true + + + pattern + false + true + + + parseLocale + false + true + + + integerOnly + false + true + + + var + false + false + + + scope + false + false + + + + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + Formats a date and/or time using the supplied styles and pattern + + + value + true + true + + + type + false + true + + + dateStyle + false + true + + + timeStyle + false + true + + + pattern + false + true + + + timeZone + false + true + + + var + false + false + + + scope + false + false + + + + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + Parses the string representation of a date and/or time + + + value + false + true + + + type + false + true + + + dateStyle + false + true + + + timeStyle + false + true + + + pattern + false + true + + + timeZone + false + true + + + parseLocale + false + true + + + var + false + false + + + scope + false + false + + + + Index: lams_admin/web/WEB-INF/jstl/fmt.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/jstl/fmt.tld (revision 0) +++ lams_admin/web/WEB-INF/jstl/fmt.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,442 @@ + + + + 1.0 + 1.2 + fmt + http://java.sun.com/jstl/fmt + JSTL fmt + JSTL 1.0 i18n-capable formatting library + + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + expressionAttributes + + requestEncoding:value + setLocale:value + setLocale:variant + timeZone:value + setTimeZone:value + bundle:basename + bundle:prefix + setBundle:basename + message:key + message:bundle + param:value + formatNumber:value + formatNumber:pattern + formatNumber:currencyCode + formatNumber:currencySymbol + formatNumber:groupingUsed + formatNumber:maxIntegerDigits + formatNumber:minIntegerDigits + formatNumber:maxFractionDigits + formatNumber:minFractionDigits + parseNumber:value + parseNumber:pattern + parseNumber:parseLocale + parseNumber:integerOnly + formatDate:value + formatDate:pattern + formatDate:timeZone + parseDate:value + parseDate:pattern + parseDate:timeZone + parseDate:parseLocale + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + requestEncoding + org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag + empty + + Sets the request character encoding + + + value + false + false + + + + + setLocale + org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag + empty + + Stores the given locale in the locale configuration variable + + + value + true + false + + + variant + false + false + + + scope + false + false + + + + + timeZone + org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag + JSP + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + + value + true + false + + + + + setTimeZone + org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag + empty + + Stores the given time zone in the time zone configuration variable + + + value + true + false + + + var + false + false + + + scope + false + false + + + + + bundle + org.apache.taglibs.standard.tag.el.fmt.BundleTag + JSP + + Loads a resource bundle to be used by its tag body + + + basename + true + false + + + prefix + false + false + + + + + setBundle + org.apache.taglibs.standard.tag.el.fmt.SetBundleTag + empty + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + + basename + true + false + + + var + false + false + + + scope + false + false + + + + + message + org.apache.taglibs.standard.tag.el.fmt.MessageTag + JSP + + Maps key to localized message and performs parametric replacement + + + key + false + false + + + bundle + false + false + + + var + false + false + + + scope + false + false + + + + + param + org.apache.taglibs.standard.tag.el.fmt.ParamTag + JSP + + Supplies an argument for parametric replacement to a containing + <message> tag + + + value + false + false + + + + + formatNumber + org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag + JSP + + Formats a numeric value as a number, currency, or percentage + + + value + false + false + + + type + false + false + + + pattern + false + false + + + currencyCode + false + false + + + currencySymbol + false + false + + + groupingUsed + false + false + + + maxIntegerDigits + false + false + + + minIntegerDigits + false + false + + + maxFractionDigits + false + false + + + minFractionDigits + false + false + + + var + false + false + + + scope + false + false + + + + + parseNumber + org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag + JSP + + Parses the string representation of a number, currency, or percentage + + + value + false + false + + + type + false + false + + + pattern + false + false + + + parseLocale + false + false + + + integerOnly + false + false + + + var + false + false + + + scope + false + false + + + + + formatDate + org.apache.taglibs.standard.tag.el.fmt.FormatDateTag + empty + + Formats a date and/or time using the supplied styles and pattern + + + value + true + false + + + type + false + false + + + dateStyle + false + false + + + timeStyle + false + false + + + pattern + false + false + + + timeZone + false + false + + + var + false + false + + + scope + false + false + + + + + parseDate + org.apache.taglibs.standard.tag.el.fmt.ParseDateTag + JSP + + Parses the string representation of a date and/or time + + + value + false + false + + + type + false + false + + + dateStyle + false + false + + + timeStyle + false + false + + + pattern + false + false + + + timeZone + false + false + + + parseLocale + false + false + + + var + false + false + + + scope + false + false + + + + Index: lams_admin/web/WEB-INF/jstl/sql-rt.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/jstl/sql-rt.tld (revision 0) +++ lams_admin/web/WEB-INF/jstl/sql-rt.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,188 @@ + + + + 1.0 + 1.2 + sql_rt + http://java.sun.com/jstl/sql_rt + JSTL sql RT + JSTL 1.0 sql library + + + + org.apache.taglibs.standard.tlv.JstlSqlTLV + + + Provides core validation features for JSTL tags. + + + + + transaction + org.apache.taglibs.standard.tag.rt.sql.TransactionTag + JSP + + Provides nested database action elements with a shared Connection, + set up to execute all statements as one transaction. + + + dataSource + false + true + + + isolation + false + true + + + + + query + org.apache.taglibs.standard.tag.rt.sql.QueryTag + JSP + + Executes the SQL query defined in its body or through the + sql attribute. + + + var + true + false + + + scope + false + false + + + sql + false + true + + + dataSource + false + true + + + startRow + false + true + + + maxRows + false + true + + + + + update + org.apache.taglibs.standard.tag.rt.sql.UpdateTag + JSP + + Executes the SQL update defined in its body or through the + sql attribute. + + + var + false + false + + + scope + false + false + + + sql + false + true + + + dataSource + false + true + + + + + param + org.apache.taglibs.standard.tag.rt.sql.ParamTag + JSP + + Sets a parameter in an SQL statement to the specified value. + + + value + false + true + + + + + dateParam + org.apache.taglibs.standard.tag.rt.sql.DateParamTag + empty + + Sets a parameter in an SQL statement to the specified java.util.Date value. + + + value + true + true + + + type + false + true + + + + + setDataSource + org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag + empty + + Creates a simple DataSource suitable only for prototyping. + + + var + false + false + + + scope + false + false + + + dataSource + false + true + + + driver + false + true + + + url + false + true + + + user + false + true + + + password + false + true + + + Index: lams_admin/web/WEB-INF/jstl/sql.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/jstl/sql.tld (revision 0) +++ lams_admin/web/WEB-INF/jstl/sql.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,213 @@ + + + + 1.0 + 1.2 + sql + http://java.sun.com/jstl/sql + JSTL sql + JSTL 1.0 sql library + + + + org.apache.taglibs.standard.tlv.JstlSqlTLV + + + expressionAttributes + + transaction:dataSource + transaction:isolation + query:sql + query:dataSource + query:startRow + query:maxRows + update:sql + update:dataSource + param:value + dateParam:value + dateParam:type + setDataSource:dataSource + setDataSource:driver + setDataSource:url + setDataSource:user + setDataSource:password + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + transaction + org.apache.taglibs.standard.tag.el.sql.TransactionTag + JSP + + Provides nested database action elements with a shared Connection, + set up to execute all statements as one transaction. + + + dataSource + false + false + + + isolation + false + false + + + + + query + org.apache.taglibs.standard.tag.el.sql.QueryTag + JSP + + Executes the SQL query defined in its body or through the + sql attribute. + + + var + true + false + + + scope + false + false + + + sql + false + false + + + dataSource + false + false + + + startRow + false + false + + + maxRows + false + false + + + + + update + org.apache.taglibs.standard.tag.el.sql.UpdateTag + JSP + + Executes the SQL update defined in its body or through the + sql attribute. + + + var + false + false + + + scope + false + false + + + sql + false + false + + + dataSource + false + false + + + + + param + org.apache.taglibs.standard.tag.el.sql.ParamTag + JSP + + Sets a parameter in an SQL statement to the specified value. + + + value + false + false + + + + + dateParam + org.apache.taglibs.standard.tag.el.sql.DateParamTag + empty + + Sets a parameter in an SQL statement to the specified java.util.Date val +ue. + + + value + true + true + + + type + false + true + + + + + setDataSource + org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag + empty + + Creates a simple DataSource suitable only for prototyping. + + + var + false + false + + + scope + false + false + + + dataSource + false + false + + + driver + false + false + + + url + false + false + + + user + false + false + + + password + false + false + + + Index: lams_admin/web/WEB-INF/jstl/x-rt.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/jstl/x-rt.tld (revision 0) +++ lams_admin/web/WEB-INF/jstl/x-rt.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,256 @@ + + + + 1.0 + 1.2 + x_rt + http://java.sun.com/jstl/xml_rt + JSTL XML RT + JSTL 1.0 XML library + + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + Provides validation features for JSTL XML tags. + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.rt.xml.ExprTag + empty + + Like <%= ... >, but for XPath expressions. + + + select + true + false + + + escapeXml + false + true + + + + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + + select + true + false + + + var + false + false + + + scope + false + false + + + + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + XML iteration tag. + + + var + false + false + + + select + true + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.rt.xml.ParamTag + JSP + + Adds a parameter to a containing 'transform' tag's Transformer + + + name + true + true + + + value + false + true + + + + + parse + org.apache.taglibs.standard.tag.rt.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + Parses XML content from 'source' attribute or 'body' + + + var + false + false + + + varDom + false + false + + + scope + false + false + + + scopeDom + false + false + + + xml + false + true + + + systemId + false + true + + + filter + false + true + + + + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + Saves the result of an XPath expression evaluation in a 'scope' + + + var + true + false + + + select + false + false + + + scope + false + false + + + + + transform + org.apache.taglibs.standard.tag.rt.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + + var + false + false + + + scope + false + false + + + result + false + true + + + xml + false + true + + + xmlSystemId + false + true + + + xslt + false + true + + + xsltSystemId + false + true + + + + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + + select + true + false + + + + Index: lams_admin/web/WEB-INF/jstl/x.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/jstl/x.tld (revision 0) +++ lams_admin/web/WEB-INF/jstl/x.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,273 @@ + + + + 1.0 + 1.2 + x + http://java.sun.com/jstl/xml + JSTL XML + JSTL 1.0 XML library + + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + expressionAttributes + + out:escapeXml + parse:xml + parse:systemId + parse:filter + transform:xml + transform:xmlSystemId + transform:xslt + transform:xsltSystemId + transform:result + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.xml.ExprTag + empty + + Like <%= ... >, but for XPath expressions. + + + select + true + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + + select + true + false + + + var + false + false + + + scope + false + false + + + + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + XML iteration tag. + + + var + false + false + + + select + true + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.xml.ParamTag + JSP + + Adds a parameter to a containing 'transform' tag's Transformer + + + name + true + false + + + value + false + false + + + + + parse + org.apache.taglibs.standard.tag.el.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + Parses XML content from 'source' attribute or 'body' + + + var + false + false + + + varDom + false + false + + + scope + false + false + + + scopeDom + false + false + + + xml + false + false + + + systemId + false + false + + + filter + false + false + + + + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + Saves the result of an XPath expression evaluation in a 'scope' + + + var + true + false + + + select + false + false + + + scope + false + false + + + + + transform + org.apache.taglibs.standard.tag.el.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + + var + false + false + + + scope + false + false + + + result + false + false + + + xml + false + false + + + xmlSystemId + false + false + + + xslt + false + false + + + xsltSystemId + false + false + + + + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + + select + true + false + + + + Index: lams_admin/web/WEB-INF/log4j.xml =================================================================== diff -u --- lams_admin/web/WEB-INF/log4j.xml (revision 0) +++ lams_admin/web/WEB-INF/log4j.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_admin/web/WEB-INF/spring/adminApplicationContext.xml =================================================================== diff -u --- lams_admin/web/WEB-INF/spring/adminApplicationContext.xml (revision 0) +++ lams_admin/web/WEB-INF/spring/adminApplicationContext.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,9 @@ + + + + + + + Index: lams_admin/web/WEB-INF/spring/applicationContext.xml =================================================================== diff -u --- lams_admin/web/WEB-INF/spring/applicationContext.xml (revision 0) +++ lams_admin/web/WEB-INF/spring/applicationContext.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + messages + + + + + + + + + + + + + + + + + org/lamsfoundation/lams/usermanagement/AuthenticationMethod.hbm.xml + org/lamsfoundation/lams/usermanagement/AuthenticationMethodType.hbm.xml + org/lamsfoundation/lams/usermanagement/Organisation.hbm.xml + org/lamsfoundation/lams/usermanagement/OrganisationType.hbm.xml + org/lamsfoundation/lams/usermanagement/Role.hbm.xml + org/lamsfoundation/lams/usermanagement/User.hbm.xml + org/lamsfoundation/lams/usermanagement/UserOrganisation.hbm.xml + org/lamsfoundation/lams/usermanagement/UserOrganisationRole.hbm.xml + org/lamsfoundation/lams/usermanagement/Workspace.hbm.xml + org/lamsfoundation/lams/usermanagement/WorkspaceFolder.hbm.xml + + + org/lamsfoundation/lams/learningdesign/Activity.hbm.xml + org/lamsfoundation/lams/learningdesign/Group.hbm.xml + org/lamsfoundation/lams/learningdesign/Grouping.hbm.xml + org/lamsfoundation/lams/learningdesign/LearningDesign.hbm.xml + org/lamsfoundation/lams/learningdesign/LearningLibrary.hbm.xml + org/lamsfoundation/lams/learningdesign/Transition.hbm.xml + + + + org/lamsfoundation/lams/lesson/LearnerProgress.hbm.xml + org/lamsfoundation/lams/lesson/Lesson.hbm.xml + + + org/lamsfoundation/lams/tool/Tool.hbm.xml + org/lamsfoundation/lams/tool/ToolContent.hbm.xml + org/lamsfoundation/lams/tool/ToolSession.hbm.xml + + + + + net.sf.hibernate.dialect.MySQLDialect + false + 5 + 20 + 1800 + 50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_REQUIRED,readOnly + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_admin/web/WEB-INF/spring/dataAccessContext.xml =================================================================== diff -u --- lams_admin/web/WEB-INF/spring/dataAccessContext.xml (revision 0) +++ lams_admin/web/WEB-INF/spring/dataAccessContext.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,74 @@ + + + + + + + + + + + + + /WEB-INF/spring/dbConnection.properties + + + + + + + + + + ${jdbc.driverClassName} + ${jdbc.url} + ${jdbc.username} + ${jdbc.password} + + + + + + + + + + + + + Index: lams_admin/web/WEB-INF/spring/dbConnection.properties =================================================================== diff -u --- lams_admin/web/WEB-INF/spring/dbConnection.properties (revision 0) +++ lams_admin/web/WEB-INF/spring/dbConnection.properties (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,19 @@ +# Properties file with Hibernate-related settings. +# Applied by PropertyPlaceholderConfigurer from "dbConnection.xml". +# Targetted at system administrators, to avoid touching the context XML files. + +#jdbc configuration +jdbc.driverClassName=com.mysql.jdbc.Driver +jdbc.url=jdbc:mysql://localhost/lams11 +jdbc.username=lams +jdbc.password=lamsdemo + +#Hibernate configuration +hibernate.show_sql=false +hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect + +#Connection Pooling configuration +hibernate.c3p0.minPoolSize=5 +hibernate.c3p0.maxPoolSize=20 +hibernate.c3p0.timeout=1800 +hibernate.c3p0.max_statement=50 \ No newline at end of file Index: lams_admin/web/WEB-INF/struts/.struts-config.mex =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/.struts-config.mex (revision 0) +++ lams_admin/web/WEB-INF/struts/.struts-config.mex (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1 @@ + \ No newline at end of file Index: lams_admin/web/WEB-INF/struts/struts-bean-el.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-bean-el.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-bean-el.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,212 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean-el + +include +org.apache.strutsel.taglib.bean.ELIncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.strutsel.taglib.bean.ELMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.strutsel.taglib.bean.ELPageTag +empty + +id +true +false + + +property +true +true + + + +resource +org.apache.strutsel.taglib.bean.ELResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.strutsel.taglib.bean.ELSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.strutsel.taglib.bean.ELStrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + + + + Index: lams_admin/web/WEB-INF/struts/struts-bean.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-bean.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-bean.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,382 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + Index: lams_admin/web/WEB-INF/struts/struts-config.xml =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-config.xml (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-config.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: lams_admin/web/WEB-INF/struts/struts-html-el.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-html-el.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-html-el.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,3032 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html-el + +base +org.apache.strutsel.taglib.html.ELBaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.strutsel.taglib.html.ELButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.strutsel.taglib.html.ELCancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.strutsel.taglib.html.ELCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.strutsel.taglib.html.ELErrorsTag +empty + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + + +file +org.apache.strutsel.taglib.html.ELFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.strutsel.taglib.html.ELFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.strutsel.taglib.html.ELFrameTag + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.strutsel.taglib.html.ELHiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.strutsel.taglib.html.ELHtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.strutsel.taglib.html.ELImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.strutsel.taglib.html.ELImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.strutsel.taglib.html.ELJavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + + +link +org.apache.strutsel.taglib.html.ELLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.strutsel.taglib.html.ELMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.strutsel.taglib.html.ELMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.strutsel.taglib.html.ELOptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.strutsel.taglib.html.ELOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.strutsel.taglib.html.ELOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.strutsel.taglib.html.ELPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.strutsel.taglib.html.ELRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.strutsel.taglib.html.ELResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.strutsel.taglib.html.ELRewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.strutsel.taglib.html.ELSelectTag +JSP + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.strutsel.taglib.html.ELSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.strutsel.taglib.html.ELTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.strutsel.taglib.html.ELTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +cols +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_admin/web/WEB-INF/struts/struts-html.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-html.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-html.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,3032 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +cols +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_admin/web/WEB-INF/struts/struts-logic-el.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-logic-el.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-logic-el.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,382 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic-el + +forward +org.apache.strutsel.taglib.logic.ELForwardTag +empty + +name +true +true + + + +iterate +org.apache.strutsel.taglib.logic.ELIterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +match +org.apache.strutsel.taglib.logic.ELMatchTag +JSP + +cookie +false +true + + +expr +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.strutsel.taglib.logic.ELMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.strutsel.taglib.logic.ELMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notMatch +org.apache.strutsel.taglib.logic.ELNotMatchTag +JSP + +cookie +false +true + + +expr +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.strutsel.taglib.logic.ELNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.strutsel.taglib.logic.ELPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.strutsel.taglib.logic.ELRedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_admin/web/WEB-INF/struts/struts-logic.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-logic.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-logic.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,652 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_admin/web/WEB-INF/struts/struts-nested.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-nested.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-nested.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,2886 @@ + + + + + + + + + +1.2 +1.1 +nested +http://struts.apache.org/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +org.apache.struts.taglib.nested.NestedWriteNestingTei +JSP + +property +false +true + + +id +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +enctype +false +true + + +focus +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +styleClass +false +true + + +styleId +false +true + + +value +false +true + + +write +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +cols +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + Index: lams_admin/web/WEB-INF/struts/struts-tiles-el.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-tiles-el.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-tiles-el.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,343 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles-el + +insert +org.apache.strutsel.taglib.tiles.ELInsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.strutsel.taglib.tiles.ELDefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.strutsel.taglib.tiles.ELPutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.strutsel.taglib.tiles.ELPutListTag +JSP + +name +true +false + + + +add +org.apache.strutsel.taglib.tiles.ELAddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.strutsel.taglib.tiles.ELGetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.strutsel.taglib.tiles.ELGetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.strutsel.taglib.tiles.ELUseAttributeTag +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.strutsel.taglib.tiles.ELImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.strutsel.taglib.tiles.ELInitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_admin/web/WEB-INF/struts/struts-tiles.tld =================================================================== diff -u --- lams_admin/web/WEB-INF/struts/struts-tiles.tld (revision 0) +++ lams_admin/web/WEB-INF/struts/struts-tiles.tld (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,344 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles + +insert +org.apache.struts.taglib.tiles.InsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.struts.taglib.tiles.DefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.struts.taglib.tiles.PutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.struts.taglib.tiles.PutListTag +JSP + +name +true +false + + + +add +org.apache.struts.taglib.tiles.AddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.struts.taglib.tiles.GetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.struts.taglib.tiles.GetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.struts.taglib.tiles.UseAttributeTag +org.apache.struts.taglib.tiles.UseAttributeTei +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.struts.taglib.tiles.ImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.struts.taglib.tiles.InitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_admin/web/WEB-INF/tiles/tiles-defs.xml =================================================================== diff -u --- lams_admin/web/WEB-INF/tiles/tiles-defs.xml (revision 0) +++ lams_admin/web/WEB-INF/tiles/tiles-defs.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: lams_admin/web/WEB-INF/web.xml =================================================================== diff -u --- lams_admin/web/WEB-INF/web.xml (revision 0) +++ lams_admin/web/WEB-INF/web.xml (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,241 @@ + + + + + + + + LAMS + + Learning Acitivity Management System + + + + log4jConfigLocation + /WEB-INF/log4j.xml + + + + + contextConfigLocation + + /WEB-INF/spring/dataAccessContext.xml /WEB-INF/spring/applicationContext.xml + + + + + org.lamsfoundation.lams.web.SessionListener + + + + + context + org.springframework.web.context.ContextLoaderServlet + 1 + + + + + action + + org.apache.struts.action.ActionServlet + + + config + /WEB-INF/struts/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 2 + + + + webauthservlet + + org.lamsfoundation.lams.admin.security.WebAuthServlet + + 2 + + + + + + + action + *.do + + + + webauthservlet + /webauth + + + + 3600 + + + + csv + text/plain + + + + pdf + application/pdf + + + + + + + /WEB-INF/struts-bean.tld + + /WEB-INF/struts/struts-bean.tld + + + + /WEB-INF/struts-html.tld + + /WEB-INF/struts/struts-html.tld + + + + /WEB-INF/struts-logic.tld + + /WEB-INF/struts/struts-logic.tld + + + + /WEB-INF/struts-tiles.tld + + /WEB-INF/struts/struts-tiles.tld + + + + /WEB-INF/struts-bean-el.tld + + /WEB-INF/struts/struts-bean-el.tld + + + + /WEB-INF/struts-logic-el.tld + + /WEB-INF/struts/struts-logic-el.tld + + + + /WEB-INF/struts-html-el.tld + + /WEB-INF/struts/struts-html-el.tld + + + + /WEB-INF/struts-tiles-el.tld + + /WEB-INF/struts/struts-tiles-el.tld + + + + /WEB-INF/struts-nested.tld + + /WEB-INF/struts/struts-nested.tld + + + + + + http://java.sun.com/jstl/core + /WEB-INF/jstl/c.tld + + + http://java.sun.com/jstl/core_rt + /WEB-INF/jstl/c-rt.tld + + + http://java.sun.com/jstl/fmt + /WEB-INF/jstl/fmt.tld + + + http://java.sun.com/jstl/fmt_rt + /WEB-INF/jstl/fmt-rt.tld + + + http://java.sun.com/jstl/xml + /WEB-INF/jstl/x.tld + + + http://java.sun.com/jstl/xml_rt + /WEB-INF/jstl/x-rt.tld + + + + + + Secure Content + *.jsp + *.html + + + + * + + + + + + FORM + lams + + /login.jsp + /login.jsp?failed=y + + + + Index: lams_admin/web/admin/adminContent.jsp =================================================================== diff -u --- lams_admin/web/admin/adminContent.jsp (revision 0) +++ lams_admin/web/admin/adminContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,274 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.List" %> +<%@ page import="java.io.IOException" %> +<%@ page import="javax.servlet.jsp.JspWriter" %> +<%@ page import="javax.servlet.http.HttpServletRequest" %> +<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %> +<%@ page import="org.springframework.web.context.WebApplicationContext" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.service.UserManagementService" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.Organisation" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.Role" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.User" %> +<%@ page import="org.lamsfoundation.lams.admin.web.AttributeNames" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/jstl/c.tld" prefix="c" %> + + + + + + +<%! + /* Display the user map */ + public void displayUsers( List users, Organisation org, JspWriter out, HttpServletRequest request, UserManagementService service) + { + if ( users == null) + return; + + try { + Iterator iter = users.iterator(); + while ( iter.hasNext() ) + { + User user = (User) iter.next(); + displayUser(user, org, out, request,service); + } + } catch (IOException e ) { + System.err.println("Internal Error: Unable to show user details"); + e.printStackTrace(System.err); + } + } + + /* Display the user details, in a single column table row */ + public void displayUser( User user,Organisation org, JspWriter out, HttpServletRequest request,UserManagementService service) throws IOException + { + out.println(""); + + out.println(""+user.getLogin()+": "+user.getFirstName()+" "+user.getLastName()); + out.println(""); + out.print(""); + Iterator iter = service.getRolesForUserByOrganisation(user,org.getOrganisationId()).iterator(); + while ( iter.hasNext() ) + { + Role role = (Role) iter.next(); + out.print(role.getName()+"  "); + } + out.print(""); + out.print(""); + out.print(user.getAuthenticationMethod().getAuthenticationMethodName()); + out.println(""); + out.println(""); + out.println(""); + + out.println(""); + } +%> + + + + +
+ Maintain Organisations and Users + + + + + + + + + + + + + + + + + + + + +
Organisation: + Parent Organisation: + + + "> + + + + + + + +
Creation Date: +
+ + + + + + +
+ Switch to child: + + + + +
+
+
+ +
+ Organisation Description: +
+ Organisation Type: +
+ Organisation Type Description: +
+
+ +

+ ';" + onMouseOver="changeStyle(this,'extendingButtonover')" + onMouseOut="changeStyle(this,'extendingButton')" + value="Update this Organisation" /> +   + ';" + onMouseOver="changeStyle(this,'extendingButtonover')" + onMouseOut="changeStyle(this,'extendingButton')" + value="Create child organisation" /> +

+ +
+ + + Create records for all the people in your organisation who will use LAMS. Add each person only once. + +

+ +
" onsubmit="return validateForm()" method="post" ENCTYPE='multipart/form-data' name="form1" id="form1"> + +

<%=(String)request.getAttribute(AttributeNames.ADMIN_ERR_MSG)%>

+
+

If you are not sure of the file format, please download template file

+ + + + + + + + + + +
Import Users From File:
+ +
 
+ + existing users only +
+
+
+
+ +

+ ';" + onMouseOver="changeStyle(this,'extendingButtonover')" + onMouseOut="changeStyle(this,'extendingButton')" + value="Create new user" /> +   + ';" + onMouseOver="changeStyle(this,'extendingButtonover')" + onMouseOut="changeStyle(this,'extendingButton')" + value="Add existing user" /> +   + ';" + onMouseOver="changeStyle(this,'extendingButtonover')" + onMouseOut="changeStyle(this,'extendingButton')" + value="Remove Users" /> +

+ +

+ + + + + + + + + + + + + + + <% + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext()); + UserManagementService service = (UserManagementService)ctx.getBean("userManagementServiceTarget"); + List users = service.getUsersFromOrganisation(organisation.getOrganisationId()); + displayUsers(users, organisation, out, request,service); + %> +
Users 
UserRolesAuthentication 
+ +

+ + + + + +
+ +
+
+ \ No newline at end of file Index: lams_admin/web/admin/errorContent.jsp =================================================================== diff -u --- lams_admin/web/admin/errorContent.jsp (revision 0) +++ lams_admin/web/admin/errorContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,22 @@ + + + + + + + + + + +
+

An error has occured

+

+ +

+
+ + \ No newline at end of file Index: lams_admin/web/admin/file/tmpl_admin.xls =================================================================== diff -u Binary files differ Index: lams_admin/web/admin/organisationContent.jsp =================================================================== diff -u --- lams_admin/web/admin/organisationContent.jsp (revision 0) +++ lams_admin/web/admin/organisationContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,58 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> +<%@ page import="org.lamsfoundation.lams.admin.web.OrganisationActionForm" %> +<%@ taglib uri="/WEB-INF/jstl/c.tld" prefix="c" %> +<%@ taglib uri="/WEB-INF/struts/struts-html.tld" prefix="html" %> + + + + + + +
+ Organisation Entry + +

+ An "organisation" is a grouping of users. It could be a high school, a particular year or a single class. + If could be a set of people doing a particular course. +

+ +

Required fields are marked with an asterisk.

+ + + + + + + + + + + + + + + + +
+ + Name: + + * +
+ Description: + + + * +
+ Parent Organisation: + + +
+

+ + + Save   + Cancel +

+
+
Index: lams_admin/web/admin/userContent.jsp =================================================================== diff -u --- lams_admin/web/admin/userContent.jsp (revision 0) +++ lams_admin/web/admin/userContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,214 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.UserOrganisation" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.Organisation" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.Role" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.User" %> +<%@ taglib uri="/WEB-INF/jstl/c.tld" prefix="c" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> + + + + + + +
+ User edit +

+ Required fields are marked with an asterisk.
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Membership:
+ <%=memberItem.getOrganisation().getName()%>
+ <%=memberItem.getOrganisation().getDescription()%> +
+ Adding to organisation: + + + + +
+ + + Login: * + + + + + + + + +
+ Authentication Method: * + + + + + + +
Title: + +
First Name: + +
Last Name: + +
Password:
+ Only enter a password if you are creating a new user or wish to change a current password. +
Password: + +
Confirm Password: + +
Details:
+ Email: + + +
Address Line 1: + +
Address Line 2: + +
Address Line 3: + +
City: + +
State: + +
Country: + +
Day Phone: + +
Evening Phone: + +
Mobile Phone: + +
Fax: + +
Roles: + + + + + + +
  +
+

+ Save   + Cancel +

+
+
Index: lams_admin/web/admin/usersaddContent.jsp =================================================================== diff -u --- lams_admin/web/admin/usersaddContent.jsp (revision 0) +++ lams_admin/web/admin/usersaddContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,100 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/jstl/c.tld" prefix="c" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.User"%> +<%@ page import="org.lamsfoundation.lams.admin.web.UsersAddAction"%> + + + + + + + + + + + + + + + +
+

Add Existing Users To

+ + +

Select an organisation from which to pick new users:

+ +

+       + +

+

+ +

+
+ +

Please select an organisation from the list above.

+
+ +

Select Users and Assign Roles

+ + + + + + + + + + +
+ : + + + + + + _"> + + + +
+
+

Cancel  + <%=UsersAddAction.SUBMIT_ADD_USERS%>   +

+
+ + \ No newline at end of file Index: lams_admin/web/admin/usersremoveContent.jsp =================================================================== diff -u --- lams_admin/web/admin/usersremoveContent.jsp (revision 0) +++ lams_admin/web/admin/usersremoveContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,89 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.List" %> +<%@ page import="javax.servlet.jsp.JspWriter" %> +<%@ page import="javax.servlet.http.HttpServletRequest" %> +<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %> +<%@ page import="org.springframework.web.context.WebApplicationContext" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.service.UserManagementService" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.Role" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.User" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.Organisation" %> +<%@ page import="org.lamsfoundation.lams.admin.web.UsersRemoveActionForm" %> +<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> +<%@ taglib uri="/WEB-INF/jstl/c.tld" prefix="c" %> + +<%! + /* Display ther user map, for a particular right */ + public void displayUsers( List users, Organisation org, javax.servlet.jsp.JspWriter out, UserManagementService service ) + { + if ( users == null ) + return; + + try { + out.println(""); + out.println(""); + Iterator iter = users.iterator(); + while ( iter.hasNext() ) + { + displayUser((User)iter.next(),org,out,service ); + } + out.println("
Remove?UserLAMS Roles
"); + } catch ( java.io.IOException e ) { + System.err.println("Internal Error: Unable to show user details"); + e.printStackTrace(System.err); + } + + } + + /* Display the user details, in a single column table row */ + public void displayUser( User user, Organisation org, javax.servlet.jsp.JspWriter out, UserManagementService service) throws java.io.IOException + { + out.println(""); + + out.println(""); + + out.println(""+user.getLogin()+": "+user.getFirstName()+" "+user.getLastName()+""); + + out.print(""); + Iterator iter = service.getRolesForUserByOrganisation(user,org.getOrganisationId()).iterator(); + while ( iter.hasNext() ) + { + Role role = (Role) iter.next(); + out.print(role.getName()+"  "); + } + out.println(""); + out.println(""); + } +%> + + + + + + +
+ + <% + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext()); + UserManagementService service = (UserManagementService)ctx.getBean("userManagementServiceTarget"); + Organisation org = service.getOrganisationById(orgId); + %> +

Remove Users From <%=org.getName()%>

+

Select the users that you wish to remove from the organisation.

+ +
+ + <% + displayUsers(users,org,out,service); + %> +
+

+ Remove Users   + Cancel   +

+
+
Index: lams_admin/web/adminHeader.jsp =================================================================== diff -u --- lams_admin/web/adminHeader.jsp (revision 0) +++ lams_admin/web/adminHeader.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,24 @@ + + + + + + + + + + + + +
+ spacer.gif +
+ learner_header_logo.jpg + + learner_header_right.gif +
+ spacer.gif +
Index: lams_admin/web/changeStyle.js =================================================================== diff -u --- lams_admin/web/changeStyle.js (revision 0) +++ lams_admin/web/changeStyle.js (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,5 @@ + Index: lams_admin/web/doc/LAMS_Learner_Guide_b60.pdf =================================================================== diff -u Binary files differ Index: lams_admin/web/errorContent.jsp =================================================================== diff -u --- lams_admin/web/errorContent.jsp (revision 0) +++ lams_admin/web/errorContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,11 @@ + + + + +
+
+

Sorry, there has been an error.

+

There is a problem processing this request. Close the browser and try again.

+

If the problem persists please contact technical support via the website www.uklams.net

+
+
Index: lams_admin/web/footer.jsp =================================================================== diff -u --- lams_admin/web/footer.jsp (revision 0) +++ lams_admin/web/footer.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,5 @@ + + + + +
Index: lams_admin/web/getSysInfo.js =================================================================== diff -u --- lams_admin/web/getSysInfo.js (revision 0) +++ lams_admin/web/getSysInfo.js (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,113 @@ + Index: lams_admin/web/header.jsp =================================================================== diff -u --- lams_admin/web/header.jsp (revision 0) +++ lams_admin/web/header.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,17 @@ + + + + + + + + +
+ spacer.gif + + + + [HELP] + + spacer.gif +
Index: lams_admin/web/images/1pxGreen.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/1pxGrey.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/1pxRed.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/Thumbs.db =================================================================== diff -u Binary files differ Index: lams_admin/web/images/circle_empty.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/circle_filled.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/cross.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/customer_logo.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/flash_get.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/green_arrow_down_right.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/greyBullet.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/lams_welcome_header.jpg =================================================================== diff -u Binary files differ Index: lams_admin/web/images/launch_page_graphic.jpg =================================================================== diff -u Binary files differ Index: lams_admin/web/images/ld_logo.jpg =================================================================== diff -u Binary files differ Index: lams_admin/web/images/learner_footer.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/learner_header_logo.jpg =================================================================== diff -u Binary files differ Index: lams_admin/web/images/learner_header_right.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/log_on_blank.jpg =================================================================== diff -u Binary files differ Index: lams_admin/web/images/log_on_divider.jpg =================================================================== diff -u Binary files differ Index: lams_admin/web/images/log_on_logo.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/spacer.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/synch_active.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/synch_not_active.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/images/tick.gif =================================================================== diff -u Binary files differ Index: lams_admin/web/index.jsp =================================================================== diff -u --- lams_admin/web/index.jsp (revision 0) +++ lams_admin/web/index.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,14 @@ +<%@ taglib uri="/WEB-INF/struts/struts-tiles.tld" prefix="tiles" %> +<%@ page import="org.lamsfoundation.lams.admin.security.JspRedirectStrategy" %> +<%@ page import="org.lamsfoundation.lams.web.HttpSessionManager" %> + +<%JspRedirectStrategy.welcomePageStatusUpdate(request,response);%> +<%HttpSessionManager.getInstance().updateHttpSessionByLogin(request.getSession(),request.getRemoteUser()); %> + + + + + + + + Index: lams_admin/web/indexContent.jsp =================================================================== diff -u --- lams_admin/web/indexContent.jsp (revision 0) +++ lams_admin/web/indexContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,148 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> +<%@ page import="java.util.List" %> +<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %> +<%@ page import="org.springframework.web.context.WebApplicationContext" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.service.UserManagementService" %> +<%@ page import="org.lamsfoundation.lams.usermanagement.*" %> +<%@ taglib uri="/WEB-INF/jstl/c.tld" prefix="c" %> + + + + + +

+ + + + + + + + + + +
spacer.gif
+ <%String login = request.getRemoteUser(); + WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext()); + UserManagementService service = (UserManagementService)ctx.getBean("userManagementServiceTarget"); + User user = service.getUserByLogin(login); + if ( login==null ){%> +

An error has occured. You have tried to log + in but we didn't get the username. Try closing your browser and starting + again.

+ <%}%> + + + + + + + + +
+

Welcome <%=user.getFirstName()%>

+

+ You are logged into LAMS.Please choose a workspace from the buttons on the right or + Change Password here. +

+ +
+ + <%List list = service.getOrganisationsForUserByRole(user,Role.ADMIN); + if(list.size()>0){%> + + + + + <%}%> + <%list = service.getOrganisationsForUserByRole(user,Role.STAFF); + if(list.size()>0){%> + + + + + <%}%> + <%list = service.getOrganisationsForUserByRole(user,Role.AUTHOR); + if(list.size()>0){%> + + + + + <%}%> + <%list = service.getOrganisationsForUserByRole(user,Role.LEARNER); + if(list.size()>0){%> + + + + + <%}%> +
+ + + +
+ + + +
+ + + +
+ + + +
+
launch_page_graphic.jpg
+
+ + + + + + +
+ © 2002-2004 LAMS Foundation. + + + This copy of LAMS™ is authorised for use by the registered users only. + Version 1.1
+
+
+ \ No newline at end of file Index: lams_admin/web/login.jsp =================================================================== diff -u --- lams_admin/web/login.jsp (revision 0) +++ lams_admin/web/login.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,30 @@ + +<%@ taglib uri="/WEB-INF/struts/struts-tiles.tld" prefix="tiles" %> +<%@ page import="org.lamsfoundation.lams.admin.security.JspRedirectStrategy" %> +<% + if (JspRedirectStrategy.loginPageRedirected(request,response)) + { + return; + } + + String webAuthUser = (String) session.getAttribute("WEBAUTH_USER"); + if (webAuthUser != null) + { + response.sendRedirect("j_security_check?j_username=" + webAuthUser + "&j_password=Dummy"); + } +%> + + + + + + + + + + + + Index: lams_admin/web/loginContent.jsp =================================================================== diff -u --- lams_admin/web/loginContent.jsp (revision 0) +++ lams_admin/web/loginContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,77 @@ +<%@ page contentType="text/html; charset=iso-8859-1" language="java" %> + + + + + + + + + + + + + + +
+ spacer.gif +
+

customer_logo.gif

+
+   + +
" method="post" name="loginForm" id="loginForm"> + <%String failed = request.getParameter("failed"); + if ( failed != null ){%> + + Sorry, that username or password is not known. Please try again. + + <%}%> + + + + + + + + + + + + + + + + + + + + +
+ Username + + +
+ Password + + +
+ +
+


+
+ WebAuth Users: click here +
+
+ spacer.gif +
+ © 2002-2005 LAMS Foundation. + + + This copy of LAMS™ is authorised for use by the registered users only. + + Version 1.1 +
Index: lams_admin/web/loginHeader.jsp =================================================================== diff -u --- lams_admin/web/loginHeader.jsp (revision 0) +++ lams_admin/web/loginHeader.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,18 @@ + + + + + + + + + + +
+ spacer.gif +
+ learner_header_right.gif +
+ Welcome + spacer.gif +
Index: lams_admin/web/openUrls.js =================================================================== diff -u --- lams_admin/web/openUrls.js (revision 0) +++ lams_admin/web/openUrls.js (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,104 @@ + Index: lams_admin/web/passwordChangeContent.jsp =================================================================== diff -u --- lams_admin/web/passwordChangeContent.jsp (revision 0) +++ lams_admin/web/passwordChangeContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,51 @@ +<%@page import="org.lamsfoundation.lams.admin.login.web.PasswordChangeActionForm" %> +<%@ taglib uri="/WEB-INF/struts/struts-html.tld" prefix="html" %> +<%@ taglib uri="/WEB-INF/struts/struts-bean.tld" prefix="bean" %> + + + + + + +
+

Change Password

+

+ + + + + + + + + + + + + + + + + +
+ Username: + + + +
+ Old Password: + + +
+ Password: + + +
+ Confirm Password: + + +
+

Save   Cancel

+
+
+ \ No newline at end of file Index: lams_admin/web/passwordChangeOkContent.jsp =================================================================== diff -u --- lams_admin/web/passwordChangeOkContent.jsp (revision 0) +++ lams_admin/web/passwordChangeOkContent.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,22 @@ + + + + + + + + + + +
+

Your password has been changed.

+

+ +

+
+ + \ No newline at end of file Index: lams_admin/web/style.css =================================================================== diff -u --- lams_admin/web/style.css (revision 0) +++ lams_admin/web/style.css (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,340 @@ +.mainHeader { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 16pt; + color: #000000; +} + +.button{ + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; color: #666666; + background-color: #E0E7EB + border: #666666; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + width: 80px; +} + +.buttonover{ + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + background-color: #708A8B; + width: 80px; + border: #666666; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; +} + +.longButton { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; color: #666666; + background-color: #E0E7EB + border: #666666; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + width: 120px; +} + +.longButtonover { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + color: #FFFFFF; + background-color: #708A8B; + width: 120px; + border: #666666; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; +} + +.extendingButton { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; color: #666666; + background-color: #E0E7EB + border: #666666; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; +} + +.extendingButtonover { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + color: #FFFFFF; + background-color: #708A8B; + border: #666666; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; +} + + +.body { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #000000; +} +.lightBody { + + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #666666; +} +.note { + + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9px; + color: #000000; +} +.subHeader { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 14px; + color: #666666; + font-weight: bold; + letter-spacing: normal; + + +} +.error { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #FF0000; + font-weight: bold; + +} +.smallText { + + + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + color: #333333; +} +.heading { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 14pt; + color: #666666; + font-style: normal; + +} +.tableHeader { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #FFFFFF; + font-weight: bold; + +} +.bodyBold { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #000000; + font-weight: bold; + +} + +a.nav:link { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #000000; + font-weight: bold; + text-decoration: none; +} + +a.nav:hover { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #000000; + font-weight: bold; + text-decoration: underline; +} + +a.nav:visited { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #666666; + font-weight: bold; + text-decoration: underline; +} + +a.brightNav:link { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #6600FF; + font-weight: bold; + text-decoration: none; +} + +a.brightNav:hover { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #CC3399; + font-weight: bold; + text-decoration: underline; +} + +a.brightNav:visited { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #6699FF; + font-weight: bold; + text-decoration: none; +} + +a.navLarge:link { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 18px; + color: #666666; + font-weight: normal; + text-decoration: none; +} + +a.navLarge:hover { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 18px; + color: #000000; + font-weight: bold; + text-decoration: underline; + background-color: #3399CC; + +} + + +a.navLarge:visited { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 18px; + color: #666666; + font-weight: normal; + text-decoration: none; +} + + + + +.textField { + background-color: #FFFFFF; + font-family: Arial; + font-size: 10pt; + color: #000000; + font-weight: plain; + border: 1px solid #666666; + +} + +textarea { + background-color: #FFFFFF; + font-family: Arial; + font-size: 10pt; + color: #000000; + font-weight: plain; + border: 1px solid #666666; +} + +body { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + color: #000000; +} + + +.mouseOverTableRow { + background-color: #B5CECE; +} + +.lightTableBorders { + margin-left:auto; + border-collapse:seperated; + border-spacing:0; + border: 0px; + empty-cells: show; + margin-right: auto; + cell-spacing:0px; + padding:2 px; +} + +.lightTableBorders TD { + margin-left:auto; + border: 1px solid #CCCCCC; + empty-cells: show; + margin-right: auto; + padding:2 px; +} + +.lightTableBorders TR { + margin-left:auto; + border: 1px solid #CCCCCC; + empty-cells: show; + margin-right: auto; + padding:2 px; +} + +#footer +{ +position: absolute; +top: 4px; +right:10px; +z-index: 5; +} + +#footerTable +{ +position: relative; +top: 0px; +left: 0px; +z-index: 4; +} + + +.lightNote { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9px; + color: #666666; +} + + +a.lightNoteLink:link { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9px; + color: #666666; + text-decoration: underline; +} + +a.lightNoteLink:hover { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9px; + color: #666666; + text-decoration: underline; +} + +a.lightNoteLink:visited { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9px; + color: #666666; + text-decoration: underline; +} + +.tableStyle { + border: thin solid #668A80; + +} + +.tableHeaderStyle { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 12px; + font-weight: bold; + color: #FFFFFF; + background: #668A80; + +} \ No newline at end of file Index: lams_admin/web/template.jsp =================================================================== diff -u --- lams_admin/web/template.jsp (revision 0) +++ lams_admin/web/template.jsp (revision f8845fdf880cec49384de0f55bd7a49400fcdf6f) @@ -0,0 +1,37 @@ + +<%@ taglib uri="/WEB-INF/struts/struts-tiles.tld" prefix="tiles" %> +<%@ taglib uri="/WEB-INF/struts/struts-html.tld" prefix="html" %> + + + + + + <tiles:getAsString name="title"/> + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ +
+ +