You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(57) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(86) |
Mar
(385) |
Apr
(198) |
May
(359) |
Jun
(199) |
Jul
(202) |
Aug
(667) |
Sep
(519) |
Oct
(128) |
Nov
(96) |
Dec
(65) |
2008 |
Jan
(145) |
Feb
(539) |
Mar
(1042) |
Apr
(48) |
May
(26) |
Jun
(11) |
Jul
(36) |
Aug
(9) |
Sep
(25) |
Oct
(46) |
Nov
(23) |
Dec
(19) |
2009 |
Jan
(6) |
Feb
|
Mar
(4) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <id...@us...> - 2008-10-29 08:43:49
|
Revision: 4837 http://openuss.svn.sourceforge.net/openuss/?rev=4837&view=rev Author: idueppe Date: 2008-10-29 08:43:33 +0000 (Wed, 29 Oct 2008) Log Message: ----------- Current Development of Plexus 3.1 without AndroMDA, Migration, Themes, and Framework-Deployer. Added Paths: ----------- branches/openuss-plexus-3.1-light/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-22 10:25:28
|
Revision: 4835 http://openuss.svn.sourceforge.net/openuss/?rev=4835&view=rev Author: idueppe Date: 2008-10-22 09:46:58 +0000 (Wed, 22 Oct 2008) Log Message: ----------- removed design selection from institute registration formular Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/institute/instituteDataRegistration.xhtml Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/institute/instituteDataRegistration.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/institute/instituteDataRegistration.xhtml 2008-10-22 09:41:21 UTC (rev 4834) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/institute/instituteDataRegistration.xhtml 2008-10-22 09:46:58 UTC (rev 4835) @@ -32,9 +32,11 @@ <f:selectItems value="#{visit.supportedLocaleItems}"/> </h:selectOneListbox> + <!-- <h:outputLabel value="#{msg.institute_theme}" for="themeSelect" styleClass="field_label"/> <h:selectOneListbox id="themeSelect" size="1" value="#{instituteRegistration.instituteInfo.theme}" styleClass="pulldown" > <f:selectItems value="#{applicationScope.themeManager.selectableThemes}"/> </h:selectOneListbox> + --> </ui:composition> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-22 10:25:10
|
Revision: 4834 http://openuss.svn.sourceforge.net/openuss/?rev=4834&view=rev Author: idueppe Date: 2008-10-22 09:41:21 +0000 (Wed, 22 Oct 2008) Log Message: ----------- code polishing Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/newsletter/NewsletterServiceImpl.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/newsletter/NewsletterServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/newsletter/NewsletterServiceImpl.java 2008-10-22 09:25:07 UTC (rev 4833) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/newsletter/NewsletterServiceImpl.java 2008-10-22 09:41:21 UTC (rev 4834) @@ -40,6 +40,7 @@ * org.openuss.security.User) */ protected void handleSubscribe(NewsletterInfo newsletter, UserInfo user) throws java.lang.Exception { + Validate.notNull(user.getId(), "UserInfo id must not be empty!"); Newsletter ml = loadNewsletter(newsletter); User userObject = getSecurityService().getUserObject(user); Subscriber subscriber = getSubscriberDao().findByUserAndNewsletter(userObject, ml); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-22 10:22:49
|
Revision: 4832 http://openuss.svn.sourceforge.net/openuss/?rev=4832&view=rev Author: idueppe Date: 2008-10-22 09:24:51 +0000 (Wed, 22 Oct 2008) Log Message: ----------- Add a simple implementation of a method interceptor to handle concurrent update exceptions by trying the operation again Added Paths: ----------- branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/transaction/ branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/transaction/ConcurrentUpdateInterceptor.java Added: branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/transaction/ConcurrentUpdateInterceptor.java =================================================================== --- branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/transaction/ConcurrentUpdateInterceptor.java (rev 0) +++ branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/transaction/ConcurrentUpdateInterceptor.java 2008-10-22 09:24:51 UTC (rev 4832) @@ -0,0 +1,54 @@ +package org.openuss.framework.transaction; + +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; +import org.hibernate.FlushMode; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.springframework.jdbc.UncategorizedSQLException; + +public class ConcurrentUpdateInterceptor implements MethodInterceptor { + + private final Exception UNKNOWN = new Exception("Unknown!"); + + private SessionFactory sessionFactory; + + private int maxTries; + + @Override + public Object invoke(MethodInvocation invocation) throws Throwable { + int tries = 0; + Throwable exception = UNKNOWN; + while (tries++ < maxTries) { + try { + return invocation.proceed(); + } catch (Throwable ex) { + if (ex instanceof UncategorizedSQLException && tries < maxTries) { + Session session = sessionFactory.getCurrentSession(); + session.setFlushMode(FlushMode.AUTO); + exception = ex; + } else { + throw ex; + } + } + } + throw exception; + } + + public int getMaxTries() { + return maxTries; + } + + public void setMaxTries(int maxTries) { + this.maxTries = maxTries; + } + + public SessionFactory getSessionFactory() { + return sessionFactory; + } + + public void setSessionFactory(SessionFactory sessionFactory) { + this.sessionFactory = sessionFactory; + } + +} Property changes on: branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/transaction/ConcurrentUpdateInterceptor.java ___________________________________________________________________ Added: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-22 10:22:31
|
Revision: 4836 http://openuss.svn.sourceforge.net/openuss/?rev=4836&view=rev Author: idueppe Date: 2008-10-22 09:47:12 +0000 (Wed, 22 Oct 2008) Log Message: ----------- code polishing Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/commands/ClusterCommandProcessor.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/commands/ClusterCommandProcessor.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/commands/ClusterCommandProcessor.java 2008-10-22 09:46:58 UTC (rev 4835) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/commands/ClusterCommandProcessor.java 2008-10-22 09:47:12 UTC (rev 4836) @@ -132,6 +132,7 @@ * Load all commands that are newer than the last processed one. * @return Collection<Command> */ + @SuppressWarnings("unchecked") private Collection<Command> loadNextNodeCommands() { LastProcessedCommand last = lastProcessedCommandDao.load(systemService.getInstanceIdentity()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-22 09:27:53
|
Revision: 4833 http://openuss.svn.sourceforge.net/openuss/?rev=4833&view=rev Author: idueppe Date: 2008-10-22 09:25:07 +0000 (Wed, 22 Oct 2008) Log Message: ----------- code polishing Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/SecurityServiceImpl.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/SecurityServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/SecurityServiceImpl.java 2008-10-22 09:24:51 UTC (rev 4832) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/SecurityServiceImpl.java 2008-10-22 09:25:07 UTC (rev 4833) @@ -45,7 +45,8 @@ private static final String ROLE_PREFIX = "ROLE_"; @Override - protected Collection handleGetAllUsers() throws Exception { + @SuppressWarnings("unchecked") + protected Collection<UserInfo> handleGetAllUsers() throws Exception { return getUserDao().loadAll(UserDao.TRANSFORM_USERINFO); } @@ -399,13 +400,15 @@ } @Override - protected Collection handleGetAllGroups() throws Exception { + @SuppressWarnings("unchecked") + protected Collection<GroupItem> handleGetAllGroups() throws Exception { GroupDao groupDao = getGroupDao(); return groupDao.loadAll(GroupDao.TRANSFORM_GROUPITEM); } @Override - protected List handleGetUsers(UserCriteria criteria) throws Exception { + @SuppressWarnings("unchecked") + protected List<UserInfo> handleGetUsers(UserCriteria criteria) throws Exception { return getUserDao().findUsersByCriteria(UserDao.TRANSFORM_USERINFO, criteria); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-10 09:58:43
|
Revision: 4831 http://openuss.svn.sourceforge.net/openuss/?rev=4831&view=rev Author: idueppe Date: 2008-10-10 09:56:03 +0000 (Fri, 10 Oct 2008) Log Message: ----------- bug fixing - wiki permission were too restrictive - fixed wiki breadcrumb link on wiki overview page Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/wiki/WikiOverviewPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/pages.xml Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/wiki/WikiOverviewPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/wiki/WikiOverviewPage.java 2008-10-10 09:55:03 UTC (rev 4830) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/wiki/WikiOverviewPage.java 2008-10-10 09:56:03 UTC (rev 4831) @@ -40,6 +40,7 @@ wikiBreadCrumb.setLink(PageLinks.WIKI_MAIN); wikiBreadCrumb.setName(i18n(Constants.WIKI_MAIN_HEADER)); wikiBreadCrumb.setHint(i18n(Constants.WIKI_MAIN_HEADER)); + wikiBreadCrumb.addParameter("course",courseInfo.getId()); breadcrumbs.addCrumb(wikiBreadCrumb); final BreadCrumb wikiSiteBreadCrumb = new BreadCrumb(); Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/pages.xml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/pages.xml 2008-10-10 09:55:03 UTC (rev 4830) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/pages.xml 2008-10-10 09:56:03 UTC (rev 4831) @@ -460,49 +460,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <page view-id="/views/secured/wiki/*"> - <securityConstraint domainObject="#{courseInfo}" - permissions="#{ACL.READ}" /> - <parameter name="course" value="#{courseInfo.id}" - converterId="javax.faces.Long" /> + <securityConstraint domainObject="#{courseInfo}" permissions="#{ACL.PARTICIPATE}" /> + <parameter name="course" value="#{courseInfo.id}" converterId="javax.faces.Long" /> </page> <page view-id="/views/secured/wiki/wikimain.xhtml"> - <parameter name="page" - value="#{wiki_current_site_version.name}" /> - <parameter name="version" - value="#{wiki_current_site_version.id}" - converterId="javax.faces.Long" /> + <parameter name="page" value="#{wiki_current_site_version.name}" /> + <parameter name="version" value="#{wiki_current_site_version.id}" converterId="javax.faces.Long" /> </page> <page view-id="/views/secured/wiki/wikiversion.xhtml"> - <parameter name="page" - value="#{views$secured$wiki$wikimain.siteVersionInfo.name}" /> + <parameter name="page" value="#{views$secured$wiki$wikimain.siteVersionInfo.name}" /> </page> <page view-id="/views/secured/wiki/wikioverview.xhtml"></page> <page view-id="/views/secured/wiki/wikiprintpreview.xhtml"> - <parameter name="page" - value="#{wiki_current_site_version.name}" /> - <parameter name="version" - value="#{wiki_current_site_version.id}" - converterId="javax.faces.Long" /> + <parameter name="page" value="#{wiki_current_site_version.name}" /> + <parameter name="version" value="#{wiki_current_site_version.id}" converterId="javax.faces.Long" /> </page> - <page - view-id="/views/secured/wiki/wikisiteoverwriteconfirmation.xhtml"> - <securityConstraint domainObject="#{courseInfo}" - permissions="#{ACL.DELETE}" /> - <parameter name="page" - value="#{views$secured$wiki$wikimain.siteVersionInfo.name}" /> + <page view-id="/views/secured/wiki/wikisiteoverwriteconfirmation.xhtml"> + <securityConstraint domainObject="#{courseInfo}" permissions="#{ACL.DELETE}" /> + <parameter name="page" value="#{views$secured$wiki$wikimain.siteVersionInfo.name}" /> </page> - <page - view-id="/views/secured/wiki/wikisiteremoveconfirmation.xhtml"> - <securityConstraint domainObject="#{courseInfo}" - permissions="#{ACL.DELETE}" /> - <parameter name="site" value="#{wiki_site_to_remove.wikiSiteId}" - converterId="javax.faces.Long" /> + <page view-id="/views/secured/wiki/wikisiteremoveconfirmation.xhtml"> + <securityConstraint domainObject="#{courseInfo}" permissions="#{ACL.DELETE}" /> + <parameter name="site" value="#{wiki_site_to_remove.wikiSiteId}" converterId="javax.faces.Long" /> </page> <page view-id="/views/secured/wiki/wikiimport.xhtml"> @@ -518,35 +503,25 @@ </page> <page view-id="/views/secured/wiki/wikicreatenewsite.xhtml"> - <securityConstraint domainObject="#{courseInfo}" - permissions="#{ACL.CREATE}" /> + <securityConstraint domainObject="#{courseInfo}" permissions="#{ACL.PARTICIPATE}" /> </page> <page view-id="/views/secured/wiki/wikichooseimage.xhtml"> - <parameter name="version" - value="#{wiki_current_site_version.id}" - converterId="javax.faces.Long" /> - <parameter name="image" value="#{wiki_image.id}" - converterId="javax.faces.Long" /> + <parameter name="version" value="#{wiki_current_site_version.id}" converterId="javax.faces.Long" /> + <parameter name="image" value="#{wiki_image.id}" converterId="javax.faces.Long" /> <parameter name="imagename" value="#{wiki_image.name}" /> </page> - <page - view-id="/views/secured/wiki/wikiimageremoveconfirmation.xhtml"> - <parameter name="version" - value="#{wiki_current_site_version.id}" /> - <parameter name="image" value="#{wiki_image.id}" - converterId="javax.faces.Long" /> + <page view-id="/views/secured/wiki/wikiimageremoveconfirmation.xhtml"> + <parameter name="version" value="#{wiki_current_site_version.id}" /> + <parameter name="image" value="#{wiki_image.id}" converterId="javax.faces.Long" /> <parameter name="imagename" value="#{wiki_image.name}" /> </page> <page view-id="/views/secured/wiki/wikiedit.xhtml"> - <securityConstraint domainObject="#{courseInfo}" - permissions="#{ACL.UPDATE}" /> - <parameter name="page" - value="#{wiki_current_site_version.name}" /> - <parameter name="version" - value="#{wiki_current_site_version.id}" /> + <securityConstraint domainObject="#{courseInfo}" permissions="#{ACL.PARTICIPATE}" /> + <parameter name="page" value="#{wiki_current_site_version.name}" /> + <parameter name="version" value="#{wiki_current_site_version.id}" /> </page> </pages> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-10 09:56:19
|
Revision: 4830 http://openuss.svn.sourceforge.net/openuss/?rev=4830&view=rev Author: idueppe Date: 2008-10-10 09:55:03 +0000 (Fri, 10 Oct 2008) Log Message: ----------- code polishing Modified Paths: -------------- branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/web/jsf/renderer/LabelRenderer.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/desktop/MyUniPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/documents/DocumentsMainPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionExamPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionLecturerViewPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionViewPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapServersPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapUserDnPatternsPage.java Modified: branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/web/jsf/renderer/LabelRenderer.java =================================================================== --- branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/web/jsf/renderer/LabelRenderer.java 2008-10-10 09:14:53 UTC (rev 4829) +++ branches/openuss-plexus-3.1/framework/core/src/main/java/org/openuss/framework/web/jsf/renderer/LabelRenderer.java 2008-10-10 09:55:03 UTC (rev 4830) @@ -24,7 +24,7 @@ public void encodeBegin(FacesContext context, UIComponent component) throws java.io.IOException { ResponseWriter writer = context.getResponseWriter(); - Map<String, String> attrs = component.getAttributes(); + @SuppressWarnings("unchecked") Map<String, String> attrs = component.getAttributes(); String id = attrs.get("for"); UIInput input = (UIInput) component.findComponent(id); @@ -45,6 +45,7 @@ public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException { ResponseWriter writer = context.getResponseWriter(); + @SuppressWarnings("unchecked") Map<String, String> attrs = component.getAttributes(); String id = attrs.get("for"); Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/desktop/MyUniPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/desktop/MyUniPage.java 2008-10-10 09:14:53 UTC (rev 4829) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/desktop/MyUniPage.java 2008-10-10 09:55:03 UTC (rev 4830) @@ -99,6 +99,7 @@ private static final String coursesBasePath = "/views/secured/course/main.faces"; private static final String submissionBasePath = "/views/secured/papersubmission/submissionview.faces"; + @SuppressWarnings("unchecked") @Prerender public void prerender() throws Exception { super.prerender(); @@ -312,6 +313,7 @@ } } + @SuppressWarnings("unchecked") private void loadValuesForDepartmentList(UIFlexList departmentsList) { if (departmentListDataLoaded == false && prerenderCalled == true && departmentsList != null) { logger.debug("Loading data for departments flexlist"); @@ -329,6 +331,7 @@ } } + @SuppressWarnings("unchecked") private void loadValuesForInstituteList(UIFlexList institutesList) { if (instituteListDataLoaded == false && prerenderCalled == true && institutesList != null) { logger.debug("Loading data for institutes flexlist"); @@ -347,6 +350,7 @@ } } + @SuppressWarnings("unchecked") private void loadValuesForCourseList(CourseUIFlexList coursesList) { if (courseListDataLoaded == false && prerenderCalled == true && coursesList != null) { logger.debug("Loading data for courses flexlist"); @@ -365,6 +369,7 @@ } } + @SuppressWarnings("unchecked") private void loadValuesForExamList(UIFlexList submissionsList2) { if (examListDataLoaded == false && prerenderCalled == true && examsList != null) { logger.debug("Loading data for submissions flexlist"); @@ -382,6 +387,7 @@ } } + @SuppressWarnings("unchecked") private void loadValuesForTabs(UITabs tabs) { if (tabDataLoaded == false && prerenderCalled == true && tabs != null) { logger.debug("Loading data for MyUni-Tabs"); @@ -488,6 +494,7 @@ return listItems; } + @SuppressWarnings("unchecked") private List<ListItemDAO> getVisibleExamListItems(Long universityId) { List<ListItemDAO> listItems = new ArrayList<ListItemDAO>(); final DateFormat dateFormat = new SimpleDateFormat(); @@ -689,6 +696,7 @@ return departmentsList; } + @SuppressWarnings("unchecked") public void setDepartmentsList(UIFlexList departmentsList) { logger.debug("Setting departments flexlist component"); this.departmentsList = departmentsList; @@ -705,6 +713,7 @@ return institutesList; } + @SuppressWarnings("unchecked") public void setInstitutesList(UIFlexList institutesList) { logger.debug("Setting institutes flexlist component"); this.institutesList = institutesList; @@ -721,6 +730,7 @@ return coursesList; } + @SuppressWarnings("unchecked") public void setCoursesList(CourseUIFlexList coursesList) { logger.debug("Setting courses flexlist component"); this.coursesList = coursesList; @@ -737,6 +747,7 @@ return examsList; } + @SuppressWarnings("unchecked") public void setExamsList(UIFlexList examsList) { logger.debug("Setting exams flexlist component"); this.examsList = examsList; @@ -750,6 +761,7 @@ return tabs; } + @SuppressWarnings("unchecked") public void setTabs(UITabs tabs) { logger.debug("Setting MyUni-tabs component"); this.tabs = tabs; Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/documents/DocumentsMainPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/documents/DocumentsMainPage.java 2008-10-10 09:14:53 UTC (rev 4829) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/documents/DocumentsMainPage.java 2008-10-10 09:55:03 UTC (rev 4830) @@ -145,6 +145,7 @@ return Constants.SUCCESS; } + @SuppressWarnings("unchecked") public String download() throws IOException { logger.debug("downloading documents"); List<FileInfo> files = documentService.allFileEntries(selectedEntries()); @@ -253,6 +254,7 @@ } + @SuppressWarnings("unchecked") public List<SelectItem> getFolderList() { if(folderList == null){ //Get folder list from document service @@ -263,7 +265,7 @@ if (info != null) { //check depth StringBuilder depth = new StringBuilder(); - List path = documentService.getFolderPath(info); + List<?> path = documentService.getFolderPath(info); for(int i = 0; i < path.size(); i++) { depth = depth.append("/ "); } Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionExamPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionExamPage.java 2008-10-10 09:14:53 UTC (rev 4829) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionExamPage.java 2008-10-10 09:55:03 UTC (rev 4830) @@ -324,6 +324,7 @@ private DataPage<ExamInfo> page; + @SuppressWarnings("unchecked") @Override public DataPage<ExamInfo> getDataPage(int startRow, int pageSize) { if (page == null) { Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionLecturerViewPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionLecturerViewPage.java 2008-10-10 09:14:53 UTC (rev 4829) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionLecturerViewPage.java 2008-10-10 09:55:03 UTC (rev 4830) @@ -137,6 +137,7 @@ return Constants.SUCCESS; } + @SuppressWarnings("unchecked") public String saveComment() { List<PaperSubmissionInfo> submissionList = paperSubmissionService.findPaperSubmissionsByExamAndUser(examInfo.getId(), paperSubmissionInfo.getUserId()); submissionList.get(submissionList.size()-1).setComment(paperSubmissionInfo.getComment()); Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionViewPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionViewPage.java 2008-10-10 09:14:53 UTC (rev 4829) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/papersubmission/PaperSubmissionViewPage.java 2008-10-10 09:55:03 UTC (rev 4830) @@ -64,6 +64,7 @@ /** Prepares the information needed for rendering. * @throws Exception */ + @SuppressWarnings("unchecked") @Prerender public void prerender() throws Exception { // NOPMD by Administrator on 13.03.08 12:57 super.prerender(); Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapServersPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapServersPage.java 2008-10-10 09:14:53 UTC (rev 4829) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapServersPage.java 2008-10-10 09:55:03 UTC (rev 4830) @@ -118,6 +118,7 @@ private DataPage<LdapServerInfo> dataPage; + @SuppressWarnings("unchecked") @Override public DataPage<LdapServerInfo> getDataPage(int startRow, int pageSize) { if (dataPage == null) { Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapUserDnPatternsPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapUserDnPatternsPage.java 2008-10-10 09:14:53 UTC (rev 4829) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapUserDnPatternsPage.java 2008-10-10 09:55:03 UTC (rev 4830) @@ -129,6 +129,7 @@ private DataPage<UserDnPatternInfo> dataPage; + @SuppressWarnings("unchecked") @Override public DataPage<UserDnPatternInfo> getDataPage(int startRow, int pageSize) { if (dataPage == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-10 09:17:44
|
Revision: 4829 http://openuss.svn.sourceforge.net/openuss/?rev=4829&view=rev Author: idueppe Date: 2008-10-10 09:14:53 +0000 (Fri, 10 Oct 2008) Log Message: ----------- polish error logging Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/SystemPropertiesBean.java Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/SystemPropertiesBean.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/SystemPropertiesBean.java 2008-10-08 15:23:32 UTC (rev 4828) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/SystemPropertiesBean.java 2008-10-10 09:14:53 UTC (rev 4829) @@ -1,7 +1,6 @@ package org.openuss.web.system; import org.apache.log4j.Logger; - import org.apache.shale.tiger.managed.Bean; import org.apache.shale.tiger.managed.Property; import org.apache.shale.tiger.managed.Scope; @@ -70,7 +69,7 @@ try { return systemService.getProperty(propertyKey).getValue(); } catch (Exception ex) { - logger.error(ex); + logger.error("System Property "+propertyKey+" not defined", ex); return ""; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-08 15:23:47
|
Revision: 4828 http://openuss.svn.sourceforge.net/openuss/?rev=4828&view=rev Author: idueppe Date: 2008-10-08 15:23:32 +0000 (Wed, 08 Oct 2008) Log Message: ----------- fixed newsletter subscribe unsubscribe issue Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/mail/NewsletterMainPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/sidebar/newsletteroptions.xhtml Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/mail/NewsletterMainPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/mail/NewsletterMainPage.java 2008-10-08 06:10:19 UTC (rev 4827) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/mail/NewsletterMainPage.java 2008-10-08 15:23:32 UTC (rev 4828) @@ -3,6 +3,8 @@ import java.util.Date; import java.util.List; +import javax.faces.event.ActionEvent; + import org.apache.shale.tiger.managed.Bean; import org.apache.shale.tiger.managed.Scope; import org.apache.shale.tiger.view.Prerender; @@ -72,15 +74,14 @@ return Constants.NEWSLETTER_NEWMAIL; } - public String toggleNewsletterStatus(){ + public void toggleNewsletterStatus(ActionEvent action){ if (getNewsletter().isSubscribed()){ getCourseNewsletterService().unsubscribe(courseInfo, user); addMessage(i18n("newsletter_unsubscribe_success")); - } else if (!getNewsletter().isSubscribed()){ + } else { getCourseNewsletterService().subscribe(courseInfo, user); addMessage(i18n("newsletter_subscribe_success")); } - return Constants.SUCCESS; } public String sendMail(){ Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/sidebar/newsletteroptions.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/sidebar/newsletteroptions.xhtml 2008-10-08 06:10:19 UTC (rev 4827) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/sidebar/newsletteroptions.xhtml 2008-10-08 15:23:32 UTC (rev 4828) @@ -12,6 +12,7 @@ xmlns:x="http://myfaces.apache.org/extensions"> <h:form> + <t:saveState id="newsletter_abo" value="#{newsletter_newsletter.subscribed}"/> <s:acl domainObject="#{courseInfo}" hasPermission="#{ACL.PARTICIPATE}"> <o:block label="#{msg.user_options_sidebar_header}" styleClass="option_box"> <h:outputText value="#{msg['newsletter_subscribe']}" styleClass="content_font_normal" rendered="#{not newsletter_newsletter.subscribed}" escape="false"></h:outputText> @@ -19,12 +20,12 @@ <ul class="action_list"> <c:if test="#{not newsletter_newsletter.subscribed}"> <li class="newsletter_subscribe"> - <h:commandLink value="" action="#{views$secured$newsletter$newsletter.toggleNewsletterStatus}" ><span />#{msg['newsletter_button_subscribe']}</h:commandLink> + <h:commandLink value="" actionListener="#{views$secured$newsletter$newsletter.toggleNewsletterStatus}" ><span />#{msg['newsletter_button_subscribe']}</h:commandLink> </li> </c:if> <c:if test="#{newsletter_newsletter.subscribed}"> <li class="newsletter_unsubscribe"> - <h:commandLink value="" action="#{views$secured$newsletter$newsletter.toggleNewsletterStatus}" ><span />#{msg['newsletter_button_unsubscribe']}</h:commandLink> + <h:commandLink value="" actionListener="#{views$secured$newsletter$newsletter.toggleNewsletterStatus}" ><span />#{msg['newsletter_button_unsubscribe']}</h:commandLink> </li> </c:if> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-08 06:10:29
|
Revision: 4827 http://openuss.svn.sourceforge.net/openuss/?rev=4827&view=rev Author: idueppe Date: 2008-10-08 06:10:19 +0000 (Wed, 08 Oct 2008) Log Message: ----------- bug fix - domain name should allways be lower case. Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/ldap/AuthenticationDomainImpl.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/security/RegistrationController.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/ldap/AuthenticationDomainImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/ldap/AuthenticationDomainImpl.java 2008-10-07 22:21:05 UTC (rev 4826) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/ldap/AuthenticationDomainImpl.java 2008-10-08 06:10:19 UTC (rev 4827) @@ -29,7 +29,7 @@ public void setName(String name) { // not allowed to overwrite AuthenticationDomain name if (getName() == null) { - super.setName(name); + super.setName(name.toLowerCase()); } } Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/security/RegistrationController.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/security/RegistrationController.java 2008-10-07 22:21:05 UTC (rev 4826) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/security/RegistrationController.java 2008-10-08 06:10:19 UTC (rev 4827) @@ -186,7 +186,11 @@ if (user.isCentralUser()) { AuthenticationDomainInfo domain = findDomainByName(user.getDomainName()); - changePasswordUrl = domain.getChangePasswordUrl(); + if (domain != null ) { + changePasswordUrl = domain.getChangePasswordUrl(); + } else { + changePasswordUrl = ""; + } return Constants.FAILURE; } // Handle local user @@ -196,11 +200,12 @@ return Constants.SUCCESS; } + @SuppressWarnings("unchecked") private AuthenticationDomainInfo findDomainByName(String domainName) { // FIXME Refactor into business layer List<AuthenticationDomainInfo> domains = ldapConfigurationService.getAllDomains(); for (AuthenticationDomainInfo domain : domains) { - if (StringUtils.equals(domain.getName(), domainName)) { + if (StringUtils.equalsIgnoreCase(domain.getName(), domainName)) { return domain; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 22:21:10
|
Revision: 4826 http://openuss.svn.sourceforge.net/openuss/?rev=4826&view=rev Author: idueppe Date: 2008-10-07 22:21:05 +0000 (Tue, 07 Oct 2008) Log Message: ----------- bug fix - fixed permission setting for deleting participants Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml 2008-10-07 20:43:42 UTC (rev 4825) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml 2008-10-07 22:21:05 UTC (rev 4826) @@ -3,6 +3,7 @@ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" + xmlns:s="http://www.openuss.org/jsf-security" xmlns:plexus="http://www.openuss.org/plexus/jsf" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:o="http://www.openuss.org/jsfcontrols" @@ -39,15 +40,16 @@ <plexus:column header="#{msg.commands_header}"> <plexus:linkProfileIcon user="#{member.userId}"/> - <plexus:command - bean="#{views$secured$course$participants}" - action="delete" - onclick="if (!confirm('#{msg.message_course_remove_member_confirmation} #{member.username}')) return false" - label="#{msg['course_members_delete']}" - title="#{msg['course_members_delete_hint']}" - styleClass="icon_remove" /> + <s:acl domainObject="#{courseInfo}" hasPermission="#{ACL.ASSIST}"> + <plexus:command + bean="#{views$secured$course$participants}" + action="delete" + onclick="if (!confirm('#{msg.message_course_remove_member_confirmation} #{member.username}')) return false" + label="#{msg['course_members_delete']}" + title="#{msg['course_members_delete_hint']}" + styleClass="icon_remove" /> + </s:acl> </plexus:column> - </plexus:dataTable> </ui:composition> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 20:43:47
|
Revision: 4825 http://openuss.svn.sourceforge.net/openuss/?rev=4825&view=rev Author: idueppe Date: 2008-10-07 20:43:42 +0000 (Tue, 07 Oct 2008) Log Message: ----------- started to integrate the formula editor Modified Paths: -------------- branches/openuss-plexus-3.1/openformula/formula-editor/src/test/resources/FormulaEdit.html branches/openuss-plexus-3.1/openformula/pom.xml Added Paths: ----------- branches/openuss-plexus-3.1/openformula/formula-jsf/ branches/openuss-plexus-3.1/openformula/formula-jsf/.classpath branches/openuss-plexus-3.1/openformula/formula-jsf/.project branches/openuss-plexus-3.1/openformula/formula-jsf/pom.xml branches/openuss-plexus-3.1/openformula/formula-jsf/src/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/Editor.java branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorRenderer.java branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorTag.java branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/faces-config.xml branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/openformula.tld branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/log4j.properties branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/templates/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/templates/editor.vsl branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities-tlddoc.xsl branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities.xsl branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/web-jsptaglibrary_1_2.dtd branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/openformula/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/openformula/component/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/openformula/component/formula/ branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/openformula/component/formula/EditorRendererTest.java branches/openuss-plexus-3.1/openformula/formula-jsf/velocity.log.1 branches/openuss-plexus-3.1/openformula/formula-web/ branches/openuss-plexus-3.1/openformula/formula-web/.classpath branches/openuss-plexus-3.1/openformula/formula-web/.project branches/openuss-plexus-3.1/openformula/formula-web/pom.xml branches/openuss-plexus-3.1/openformula/formula-web/src/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/java/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/java/org/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/java/org/openuss/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/java/org/openuss/openformula/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/java/org/openuss/openformula/sample/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/java/org/openuss/openformula/sample/EditorBean.java branches/openuss-plexus-3.1/openformula/formula-web/src/main/webapp/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/webapp/WEB-INF/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/webapp/WEB-INF/faces-config.xml branches/openuss-plexus-3.1/openformula/formula-web/src/main/webapp/WEB-INF/web.xml branches/openuss-plexus-3.1/openformula/formula-web/src/main/webapp/applet/ branches/openuss-plexus-3.1/openformula/formula-web/src/main/webapp/applet/formula-editor-3.1.jar branches/openuss-plexus-3.1/openformula/formula-web/src/main/webapp/editor.jsp branches/openuss-plexus-3.1/openformula/formula-web/src/main/webapp/index.html Modified: branches/openuss-plexus-3.1/openformula/formula-editor/src/test/resources/FormulaEdit.html =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-editor/src/test/resources/FormulaEdit.html 2008-10-07 19:18:08 UTC (rev 4824) +++ branches/openuss-plexus-3.1/openformula/formula-editor/src/test/resources/FormulaEdit.html 2008-10-07 20:43:42 UTC (rev 4825) @@ -7,6 +7,7 @@ <body> <script type="text/javascript"> <!-- + // Clear all. function clearAll() { document.formulaEditor.reset(); @@ -16,7 +17,6 @@ // Pass function pass() { document.formula.formula.value=document.formulaEditor.getFormula(); - alert("Hello"); } // Save the formula @@ -32,6 +32,10 @@ } document.FileUpload.Ids.value = daten; } + + function + + addEvent(window, 'load', construct_${clientId}); //--> </script> <applet name="formulaEditor" code="org/openuss/openformula/io/FormulaApplet.class" archive="../../../target/formula-editor-3.1-SNAPSHOT.jar" width="800" height="600"> Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf ___________________________________________________________________ Added: svn:ignore + .settings Added: branches/openuss-plexus-3.1/openformula/formula-jsf/.classpath =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/.classpath (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/.classpath 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,55 @@ +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/> + <classpathentry kind="src" path="src/test/java" output="target/test-classes"/> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"> + <attributes> + <attribute value="jar:file:/D:/Development/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-javadoc.jar!/" name="javadoc_location"/> + </attributes> + </classpathentry> + <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3-sources.jar"> + <attributes> + <attribute value="jar:file:/D:/Development/repository/commons-codec/commons-codec/1.3/commons-codec-1.3-javadoc.jar!/" name="javadoc_location"/> + </attributes> + </classpathentry> + <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.6/commons-digester-1.6.jar" sourcepath="M2_REPO/commons-digester/commons-digester/1.6/commons-digester-1.6-sources.jar"> + <attributes> + <attribute value="jar:file:/D:/Development/repository/commons-digester/commons-digester/1.6/commons-digester-1.6-javadoc.jar!/" name="javadoc_location"/> + </attributes> + </classpathentry> + <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar"> + <attributes> + <attribute value="jar:file:/D:/Development/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-javadoc.jar!/" name="javadoc_location"/> + </attributes> + </classpathentry> + <classpathentry kind="var" path="M2_REPO/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar" sourcepath="M2_REPO/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/easymock/easymock/2.2/easymock-2.2.jar" sourcepath="M2_REPO/org/easymock/easymock/2.2/easymock-2.2-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/easymock/easymockclassextension/2.2/easymockclassextension-2.2.jar" sourcepath="M2_REPO/org/easymock/easymockclassextension/2.2/easymockclassextension-2.2-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar" sourcepath="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar" sourcepath="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.2/junit-3.8.2.jar" sourcepath="M2_REPO/junit/junit/3.8.2/junit-3.8.2-sources.jar"> + <attributes> + <attribute value="jar:file:/D:/Development/repository/junit/junit/3.8.2/junit-3.8.2-javadoc.jar!/" name="javadoc_location"/> + </attributes> + </classpathentry> + <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/myfaces/core/myfaces-api/1.1.5/myfaces-api-1.1.5.jar" sourcepath="M2_REPO/org/apache/myfaces/core/myfaces-api/1.1.5/myfaces-api-1.1.5-sources.jar"> + <attributes> + <attribute value="jar:file:/D:/Development/repository/org/apache/myfaces/core/myfaces-api/1.1.5/myfaces-api-1.1.5-javadoc.jar!/" name="javadoc_location"/> + </attributes> + </classpathentry> + <classpathentry kind="var" path="M2_REPO/oro/oro/2.0.8/oro-2.0.8.jar" sourcepath="M2_REPO/oro/oro/2.0.8/oro-2.0.8-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/shale/shale-test/1.0.4/shale-test-1.0.4.jar" sourcepath="M2_REPO/org/apache/shale/shale-test/1.0.4/shale-test-1.0.4-sources.jar"> + <attributes> + <attribute value="jar:file:/D:/Development/repository/org/apache/shale/shale-test/1.0.4/shale-test-1.0.4-javadoc.jar!/" name="javadoc_location"/> + </attributes> + </classpathentry> + <classpathentry kind="var" path="M2_REPO/org/apache/velocity/velocity/1.5/velocity-1.5.jar"/> + <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/> +</classpath> \ No newline at end of file Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/.classpath ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/.project =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/.project (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/.project 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>formula-jsf</name> + <comment>This is the OpenFormula JSF-Component</comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.common.project.facet.core.builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> + </natures> +</projectDescription> Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/.project ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/pom.xml =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/pom.xml (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/pom.xml 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,272 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.openuss.openformula</groupId> + <artifactId>openformula</artifactId> + <version>3.1-SNAPSHOT</version> + </parent> + + <artifactId>formula-jsf</artifactId> + <packaging>jar</packaging> + <name>OpenUSS OpenFormula JSF-Component</name> + + <description> + This is the OpenFormula JSF-Component + </description> + + + <dependencies> + <dependency> + <groupId>org.apache.velocity</groupId> + <artifactId>velocity</artifactId> + </dependency> + + <!-- compile --> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>commons-validator</groupId> + <artifactId>commons-validator</artifactId> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + + <!-- provided dependencies --> + + <dependency> + <groupId>org.apache.myfaces.core</groupId> + <artifactId>myfaces-api</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>javax.servlet.jsp</groupId> + <artifactId>jsp-api</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <scope>provided</scope> + </dependency> + + <!-- test dependencies --> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.shale</groupId> + <artifactId>shale-test</artifactId> + <scope>test</scope> + </dependency> + + </dependencies> + + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>changelog-maven-plugin</artifactId> + <version>2.0-beta-1</version> + <reportSets> + <reportSet> + <id>dual-report</id> + <configuration> + <type>range</type> + <range>30</range> + </configuration> + <reports> + <report>changelog</report> + <report>file-activity</report> + <report>dev-activity</report> + </reports> + </reportSet> + </reportSets> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.0-beta-3</version> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jxr-maven-plugin</artifactId> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>taglist-maven-plugin</artifactId> + <version>2.0-beta-1</version> + <configuration> + <tags>TODO, FIXME, XXX, @deprecated</tags> + </configuration> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>surefire-report-maven-plugin</artifactId> + </plugin> + + </plugins> + </reporting> + + <profiles> + <profile> + <id>generate-site</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>xslt-maven-plugin</artifactId> + <version>1.0</version> + <executions> + <execution> + <id>generate-tld-for-tlddoc</id> + <goals> + <goal>transform</goal> + </goals> + <configuration> + <xslFile>src/main/tld/misc/resolve_entities-tlddoc.xsl</xslFile> + <srcIncludes>**/*.tld</srcIncludes> + <srcDir>src/main/tld</srcDir> + <destDir>target/tlddoc-site</destDir> + </configuration> + </execution> + <execution> + <id>generate-tld-for-jar</id> + <goals> + <goal>transform</goal> + </goals> + <configuration> + <xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile> + <srcIncludes>**/*.tld</srcIncludes> + <srcDir>src/main/tld</srcDir> + <destDir>target/classes/META-INF</destDir> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + + </build> + <reporting> + <plugins> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + <configuration> + <taglib.src.dir>/openformula/target/tlddoc-site</taglib.src.dir> + <tldDocDir>/openformula/target/site/tlddoc</tldDocDir> + </configuration> + </plugin> + </plugins> + </reporting> + </profile> + <profile> + <id>generate-assembly</id> + <activation> + <property> + <name>performRelease</name> + <value>true</value> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>xslt-maven-plugin</artifactId> + <version>1.0</version> + <executions> + <execution> + <id>generate-tld-for-tlddoc</id> + <goals> + <goal>transform</goal> + </goals> + <configuration> + <xslFile>src/main/tld/misc/resolve_entities-tlddoc.xsl</xslFile> + <srcIncludes>**/*.tld</srcIncludes> + <srcDir>src/main/tld</srcDir> + <destDir>target/tlddoc-site</destDir> + </configuration> + </execution> + <execution> + <id>generate-tld-for-jar</id> + <goals> + <goal>transform</goal> + </goals> + <configuration> + <xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile> + <srcIncludes>**/*.tld</srcIncludes> + <srcDir>src/main/tld</srcDir> + <destDir>target/classes/META-INF</destDir> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <executions> + <execution> + <id>attach-javadoc</id> + <goals><goal>jar</goal></goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + <configuration> + <taglib.src.dir>${pom.dir}/target/tlddoc-site</taglib.src.dir> + <tldDocDir>${pom.dir}/openformula/target/tlddoc</tldDocDir> + </configuration> + <executions> + <execution> + <id>attach-javadoc</id> + <goals><goal>taglibdocjar</goal></goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/pom.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/Editor.java =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/Editor.java (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/Editor.java 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,59 @@ +package org.openuss.openformula.component.formula; + +import javax.faces.component.UIInput; +import javax.faces.component.ValueHolder; +import javax.faces.context.FacesContext; + +/** + * The OpenUSS OpenFormula component + * @author Ingo D\xFCppe + */ +public class Editor extends UIInput implements ValueHolder { + + public static final String COMPONENT_TYPE = "org.openuss.openformula.component.formula.Editor"; + public static final String DEFAULT_RENDERER_TYPE = "org.openuss.openformula.component.formula.EditorRenderer"; + public static final String COMPONENT_FAMILY = "javax.faces.Input"; + + private String width; + private String height; + + public Editor() { + // do nothing + } + + public String getFamily() { + return COMPONENT_FAMILY; + } + + public void restoreState(FacesContext context, Object state) { + Object values[] = (Object[]) state; + width = (String) values[1]; + height = (String) values[2]; + super.restoreState(context, values[0]); + } + + public Object saveState(FacesContext context) { + Object values[] = new Object[3]; + values[0] = super.saveState(context); + values[1] = width; + values[2] = height; + return values; + } + + public String getWidth() { + return width; + } + + public void setWidth(String width) { + this.width = width; + } + + public String getHeight() { + return height; + } + + public void setHeight(String height) { + this.height = height; + } + +} Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/Editor.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorRenderer.java =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorRenderer.java (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorRenderer.java 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,85 @@ +package org.openuss.openformula.component.formula; + +import java.io.IOException; +import java.io.StringWriter; +import java.util.Map; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.context.ResponseWriter; +import javax.faces.render.Renderer; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.Velocity; +import org.apache.velocity.exception.ParseErrorException; +import org.apache.velocity.exception.ResourceNotFoundException; + +/** + * The renderer for my component + */ +public class EditorRenderer extends Renderer { + + private static final Logger logger = Logger.getLogger(EditorRenderer.class.getName()); + + private VelocityContext velocityContext; + + public EditorRenderer () { + super(); + Properties properties = new Properties(); + properties.put("file.resource.loader.path", "d:/development/workspaces/plexus-branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources"); +// properties.put("resource.loader", "class"); +// properties.put("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); +// properties.put("velocimarco.lirary", ""); + + try { + Velocity.init(properties); + } catch (Exception ex) { + logger.log(Level.SEVERE,ex.getMessage(),ex); + } + velocityContext = new VelocityContext(); + + } + + public void decode(FacesContext facesContext, UIComponent uiComponent) { + super.decode(facesContext, uiComponent); + Map paramMap = facesContext.getExternalContext().getRequestParameterMap(); + String clientId = uiComponent.getClientId(facesContext); + String value = (String) paramMap.get(clientId); + Editor editor = (Editor) uiComponent; + editor.setValue(value); + editor.setValid(true); + } + + public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException { + super.encodeBegin(facesContext, uiComponent); + // no need to use encodeBegin. + } + + public void encodeChildren(FacesContext facesContext, UIComponent uiComponent) throws IOException { + super.encodeChildren(facesContext, uiComponent); + // this component does not have children + } + + public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException { + try { + Template template = Velocity.getTemplate("templates/editor.vsl"); + StringWriter sw = new StringWriter(); + velocityContext.put("component", uiComponent); + velocityContext.put("clientId", uiComponent.getId()); + template.merge(velocityContext, sw); + ResponseWriter writer = facesContext.getResponseWriter(); + logger.log(Level.FINER,sw.toString()); + writer.write(sw.toString()); + } catch (ResourceNotFoundException ex) { + logger.log(Level.SEVERE,ex.getMessage(),ex); + } catch (ParseErrorException ex) { + logger.log(Level.SEVERE,ex.getMessage(),ex); + } catch (Exception ex) { + logger.log(Level.SEVERE,ex.getMessage(),ex); + } + } +} Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorRenderer.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorTag.java =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorTag.java (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorTag.java 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,89 @@ +package org.openuss.openformula.component.formula; + +import javax.faces.application.Application; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.webapp.UIComponentTag; + +/** + * The tag for my component + */ +public class EditorTag extends UIComponentTag { + + private String value; + private String width; + private String height; + + /** + * @see javax.faces.webapp.UIComponentTag#getComponentType() + */ + public String getComponentType() { + return Editor.COMPONENT_TYPE; + } + + /** + * @see javax.faces.webapp.UIComponentTag#getRendererType() + */ + public String getRendererType() { + return Editor.DEFAULT_RENDERER_TYPE; + } + + /** + * @see javax.faces.webapp.UIComponentTag#setProperties + */ + protected void setProperties(UIComponent component) { + super.setProperties(component); + + Editor editor = (Editor) component; + + FacesContext context = FacesContext.getCurrentInstance(); + Application application = context.getApplication(); + + // value + if (value != null) { + if (UIComponentTag.isValueReference(value)) { + component.setValueBinding("value", application.createValueBinding(value)); + } else { + component.getAttributes().put("value", value); + } + } + + if (width != null) { + editor.setWidth(width); + } + + if (height != null) { + editor.setHeight(height); + } + + } + + public void release() { + super.release(); + this.value = null; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getWidth() { + return width; + } + + public void setWidth(String width) { + this.width = width; + } + + public String getHeight() { + return height; + } + + public void setHeight(String height) { + this.height = height; + } +} Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/java/org/openuss/openformula/component/formula/EditorTag.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/faces-config.xml =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/faces-config.xml (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/faces-config.xml 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> + +<!DOCTYPE faces-config PUBLIC + "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" + "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> + +<faces-config xmlns="http://java.sun.com/JSF/Configuration"> + + <!-- components --> + + <component> + <component-type>org.openuss.openformula.component.formula.Editor</component-type> + <component-class>org.openuss.openformula.component.formula.Editor</component-class> + </component> + + + <!-- renderkit --> + + <render-kit> + + <renderer> + <component-family>javax.faces.Input</component-family> + <renderer-type>org.openuss.openformula.component.formula.EditorRenderer</renderer-type> + <renderer-class>org.openuss.openformula.component.formula.EditorRenderer</renderer-class> + </renderer> + + </render-kit> + +</faces-config> Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/faces-config.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/openformula.tld =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/openformula.tld (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/openformula.tld 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> + +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" + "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +<taglib> + + <tlib-version>1.2</tlib-version> + <jsp-version>1.2</jsp-version> + <short-name>formula-jsf</short-name> + <uri>http://www.openuss.org/openformula</uri> + <description> + OpenFormula JSF Components + </description> + + <tag> + <name>editor</name> + <tag-class>org.openuss.openformula.component.formula.EditorTag</tag-class> + <body-content>JSP</body-content> + <description>OpenFormula Editor</description> + + <!-- import the entities for that component here--> + <attribute> + <name>value</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>The initial value of this component</description> + </attribute> + + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + The developer-assigned ID of this component. The ID must be unique + within the scope of the tag's enclosing naming container (e.g. + h:form or f:subview). This value must be a static value. + </description> + </attribute> + + <attribute> + <name>binding</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + Identifies a backing bean property (of type UIComponent or appropriate + subclass) to bind to this component instance. This value must be an + EL expression. + </description> + </attribute> + + <attribute> + <name>rendered</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + A boolean value that indicates whether this component should be rendered. + Default value: true. + </description> + </attribute> + + <attribute> + <name>width</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + HTML Tag + </description> + </attribute> + + <attribute> + <name>height</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + HTML Tag + </description> + </attribute> + </tag> +</taglib> \ No newline at end of file Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/META-INF/openformula.tld ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/log4j.properties =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/log4j.properties (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/log4j.properties 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,34 @@ +#Created by JInto - www.guh-software.de +#Thu Mar 06 13:57:41 CET 2008 +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.MaxFileSize=10MB +log4j.appender.R.file=${catalina.base}/logs/openuss-plexus.log +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%d{ISO8601} %p %c{1}. %m%n +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %p %c{1}. %m%n +log4j.logger.com.sun.facelets=ERROR +log4j.logger.net.sf.ehcache=TRACE +log4j.logger.org.acegisecurity=ERROR +log4j.logger.org.apache.commons=ERROR +log4j.logger.org.apache.myfaces=ERROR +log4j.logger.org.apache.shale=ERROR +log4j.logger.org.hibernate=INFO +log4j.logger.org.hibernate.SQL=DEBUG +log4j.logger.org.hibernate.cache=TRACE +log4j.logger.org.hibernate.hql.ast.AST=WARN +log4j.logger.org.hibernate.jdbc=INFO +log4j.logger.org.hibernate.pretty=DEBUG +log4j.logger.org.hibernate.secure=WARN +log4j.logger.org.hibernate.tool.hbm2ddl=WARN +log4j.logger.org.hibernate.transaction=INFO +log4j.logger.org.hibernate.type=INFO +log4j.logger.org.openuss=TRACE +log4j.logger.org.openuss.commands=DEBUG +log4j.logger.org.openuss.framework=TRACE +log4j.logger.org.openuss.framework.jsfcontrols=INFO +log4j.logger.org.openuss.framework.web.facelets=INFO +log4j.logger.org.quartz=ERROR +log4j.logger.org.springframework=ERROR +log4j.rootCategory=INFO, stdout, R Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/log4j.properties ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/templates/editor.vsl =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/templates/editor.vsl (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/templates/editor.vsl 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,42 @@ +<input type="text" name="${clientId}" > + <script type="text/javascript"> + <!-- + function clearAll() { + document.formulaEditor.reset(); + } + function pass() { + document.formula.${clientId}.value=document.formulaEditor_${clientId}.getFormula(); + } + function sendData() { + alert("sendData") + var daten = ""; + for (var i = 0; i < document.applets.length; i++) { + var get = document.applets[i].submit(); + if (get != "") { + if (daten != "") + daten = daten + ","; + daten = daten + get; + } + } + document.FileUpload.Ids.value = daten; + } + + function construct_${clientId}(event) { + alert("construct"); + addEvent(document.formula,'submit', sendData); + } + + alert("load"); + addEventListener("load",construct_${clientId}); + --> +</script> +</input> +<red><h1>${clientId}</h1></red> +<applet name="formulaEditor_${clientId}" code="org/openuss/openformula/io/FormulaApplet.class" archive="./applet/formula-editor-3.1.jar" width="${component.width}" height="${component.height}"> +#if ($component.value) + <param name="formula" value="${component.value}"/> +#else + <param name="formula" value=""/> +#end +</applet> + Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources/templates/editor.vsl ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities-tlddoc.xsl =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities-tlddoc.xsl (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities-tlddoc.xsl 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - Stylesheet to expand xml entity references inline. + - + - This is a temporary workaround for a bug in the tlddoc application which means that + - a (valid) xmlns attribute is rejected; tlddoc v1.3 only accepts input that (incorrectly) + - puts the tld elements in no namespace. This stylesheet therefore generates a special + - version of the tld for feeding to the tlddoc app, until such time as tlddoc is fixed. + --> +<xsl:stylesheet version="1.1" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + + <xsl:output method="xml" + encoding="ISO-8859-1" + doctype-public="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" + doctype-system="http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd" + indent="yes"/> + + <xsl:template match="*" priority="2"> + <!-- avoiding copy to get get rid of namespace attribute --> + <xsl:element name="{name(.)}"> + <xsl:apply-templates select="@*|node()"/> + </xsl:element> + </xsl:template> + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities-tlddoc.xsl ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities.xsl =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities.xsl (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities.xsl 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - Stylesheet to pretty-print an xml document. In addition, if the input + - document contains any xml entity references, then those are expanded + - inline. + - + - Based on a stylesheet by John Mongan. + --> +<xsl:stylesheet version="1.1" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + + <xsl:output method="xml" + encoding="ISO-8859-1" + doctype-public="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" + doctype-system="http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"/> + + <xsl:param name="indent-increment" select="' '" /> + + <xsl:template match="*"> + <xsl:param name="indent" select="'
'"/> + + <xsl:value-of select="$indent"/> + <xsl:copy> + <xsl:copy-of select="@*" /> + <xsl:apply-templates> + <xsl:with-param name="indent" + select="concat($indent, $indent-increment)"/> + </xsl:apply-templates> + <xsl:if test="*"> + <xsl:value-of select="$indent"/> + </xsl:if> + </xsl:copy> + </xsl:template> + + <xsl:template match="comment()|processing-instruction()"> + <xsl:param name="indent" select="'
'"/> + <xsl:value-of select="$indent"/> + <xsl:copy /> + </xsl:template> + + <!-- + - Discard the text content of a node where the text content + - is nothing but whitespace. When this rule isn't matched + - the default xml processing applies, which is to copy the + - text directly to the output. + - + - WARNING: this is dangerous. Handle with care + --> + <xsl:template match="text()[normalize-space(.)='']"/> + +</xsl:stylesheet> Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/resolve_entities.xsl ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/web-jsptaglibrary_1_2.dtd =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/web-jsptaglibrary_1_2.dtd (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/web-jsptaglibrary_1_2.dtd 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,108 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> + +<!-- + + This is the DTD defining the JavaServer Pages 1.2 Tag Library + descriptor (.tld) (XML) file format/syntax. + + A Tag Library is a JAR file containing a valid instance of a Tag Library + Descriptor (taglib.tld) file in the META-INF subdirectory, along with the + appropriate implementing classes, and other resources required to + implement the tags defined therein. + + --> + +<!NOTATION WEB-JSPTAGLIB.1_2 PUBLIC + "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"> + +<!-- +This is the XML DTD for the JSP 1.2 Tag Library Descriptor. +All JSP 1.2 tag library descriptors must include a DOCTYPE +of the following form: + + <!DOCTYPE taglib + PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" + "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> + +--> + +<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?, + display-name?, small-icon?, large-icon?, description?, + validator?, listener*, tag+) > + +<!ATTLIST taglib id ID #IMPLIED + xmlns CDATA #FIXED + "http://java.sun.com/JSP/TagLibraryDescriptor"> + +<!ELEMENT tlib-version (#PCDATA) > +<!ELEMENT jsp-version (#PCDATA) > +<!ELEMENT short-name (#PCDATA) > +<!ELEMENT uri (#PCDATA) > +<!ELEMENT description (#PCDATA) > +<!ELEMENT validator (validator-class, init-param*, description?) > +<!ELEMENT validator-class (#PCDATA) > +<!ELEMENT init-param (param-name, param-value, description?)> +<!ELEMENT param-name (#PCDATA)> +<!ELEMENT param-value (#PCDATA)> +<!ELEMENT listener (listener-class) > +<!ELEMENT listener-class (#PCDATA) > +<!ELEMENT tag (name, tag-class, tei-class?, body-content?, display-name?, + small-icon?, large-icon?, description?, variable*, attribute*, + example?) > +<!ELEMENT tag-class (#PCDATA) > +<!ELEMENT tei-class (#PCDATA) > +<!ELEMENT body-content (#PCDATA) > +<!ELEMENT display-name (#PCDATA) > +<!ELEMENT large-icon (#PCDATA) > +<!ELEMENT small-icon (#PCDATA) > +<!ELEMENT example (#PCDATA) > +<!ELEMENT variable ( (name-given | name-from-attribute), variable-class?, + declare?, scope?, description?) > +<!ELEMENT name-given (#PCDATA) > +<!ELEMENT name-from-attribute (#PCDATA) > +<!ELEMENT variable-class (#PCDATA) > +<!ELEMENT declare (#PCDATA) > +<!ELEMENT scope (#PCDATA) > +<!ELEMENT attribute (name, required? , rtexprvalue?, type?, description?) > +<!ELEMENT name (#PCDATA) > +<!ELEMENT required (#PCDATA) > +<!ELEMENT rtexprvalue (#PCDATA) > +<!ELEMENT type (#PCDATA) > + +<!-- ID attributes --> + +<!ATTLIST tlib-version id ID #IMPLIED> +<!ATTLIST jsp-version id ID #IMPLIED> +<!ATTLIST short-name id ID #IMPLIED> +<!ATTLIST uri id ID #IMPLIED> +<!ATTLIST description id ID #IMPLIED> +<!ATTLIST example id ID #IMPLIED> +<!ATTLIST tag id ID #IMPLIED> +<!ATTLIST tag-class id ID #IMPLIED> +<!ATTLIST tei-class id ID #IMPLIED> +<!ATTLIST body-content id ID #IMPLIED> +<!ATTLIST attribute id ID #IMPLIED> +<!ATTLIST name id ID #IMPLIED> +<!ATTLIST required id ID #IMPLIED> +<!ATTLIST rtexprvalue id ID #IMPLIED> +<!ATTLIST param-name id ID #IMPLIED> +<!ATTLIST param-value id ID #IMPLIED> +<!ATTLIST listener id ID #IMPLIED> +<!ATTLIST listener-class id ID #IMPLIED> Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/tld/misc/web-jsptaglibrary_1_2.dtd ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/openformula/component/formula/EditorRendererTest.java =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/openformula/component/formula/EditorRendererTest.java (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/openformula/component/formula/EditorRendererTest.java 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,53 @@ +package org.openuss.openformula.component.formula; + +import java.io.IOException; +import java.io.StringWriter; + +import org.apache.shale.test.base.AbstractJsfTestCase; +import org.apache.shale.test.mock.MockRenderKitFactory; +import org.apache.shale.test.mock.MockResponseWriter; + +/** + * Class to test the behaviour of the SayHello renderer + */ +public class EditorRendererTest extends AbstractJsfTestCase { + + private MockResponseWriter writer; + private Editor editor; + + public EditorRendererTest(String name) { + super(name); + } + + public void setUp() throws Exception { + super.setUp(); + + editor = new Editor(); + editor.setValue("<xmath></xmath>"); + editor.setId("editorId"); + editor.setWidth("200"); + editor.setHeight("200"); + + writer = new MockResponseWriter(new StringWriter(), null, null); + facesContext.setResponseWriter(writer); + facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT); + facesContext.getRenderKit().addRenderer(editor.getFamily(), editor.getRendererType(), new EditorRenderer()); + } + + public void tearDown() throws Exception { + super.tearDown(); + editor = null; + writer = null; + } + + public void testEncodeEnd() throws IOException { + editor.encodeEnd(facesContext); + facesContext.renderResponse(); + + String output = writer.getWriter().toString(); + assertTrue(output.contains("editorId")); + + assertFalse(output.contains("${clientId}")); + } + +} Property changes on: branches/openuss-plexus-3.1/openformula/formula-jsf/src/test/java/org/openuss/openformula/component/formula/EditorRendererTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: branches/openuss-plexus-3.1/openformula/formula-jsf/velocity.log.1 =================================================================== --- branches/openuss-plexus-3.1/openformula/formula-jsf/velocity.log.1 (rev 0) +++ branches/openuss-plexus-3.1/openformula/formula-jsf/velocity.log.1 2008-10-07 20:43:42 UTC (rev 4825) @@ -0,0 +1,1222 @@ +2008-08-14 19:45:29,202 - Log4JLogChute initialized using file 'velocity.log' +2008-08-14 19:45:29,202 - Starting Apache Velocity v1.5 (compiled: 2007-02-22 08:52:29) +2008-08-14 19:45:29,202 - Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties +2008-08-14 19:45:29,202 - Trying to use logger class org.apache.velocity.runtime.log.AvalonLogChute +2008-08-14 19:45:29,204 - Couldn't find class org.apache.velocity.runtime.log.AvalonLogChute or necessary supporting classes in classpath. +java.lang.NoClassDefFoundError: org/apache/log/format/Formatter + at java.lang.Class.forName0(Native Method) + at java.lang.Class.forName(Class.java:247) + at org.apache.velocity.util.ClassUtils.getClass(ClassUtils.java:63) + at org.apache.velocity.util.ClassUtils.getNewInstance(ClassUtils.java:95) + at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:147) + at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:208) + at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:728) + at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:240) + at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:534) + at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:227) + at org.apache.velocity.app.Velocity.init(Velocity.java:111) + at org.openuss.openformula.component.formula.EditorRenderer.<init>(EditorRenderer.java:39) + at org.openuss.openformula.component.formula.EditorRendererTest.setUp(EditorRendererTest.java:34) + at junit.framework.TestCase.runBare(TestCase.java:128) + at junit.framework.TestResult$1.protect(TestResult.java:106) + at junit.framework.TestResult.runProtected(TestResult.java:124) + at junit.framework.TestResult.run(TestResult.java:109) + at junit.framework.TestCase.run(TestCase.java:120) + at junit.framework.TestSuite.runTest(TestSuite.java:230) + at junit.framework.TestSuite.run(TestSuite.java:225) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) + at java.lang.reflect.Method.invoke(Method.java:597) + at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) + at org.apache.maven.surefire.Surefire.run(Surefire.java:177) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) + at java.lang.reflect.Method.invoke(Method.java:597) + at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) + at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) +Caused by: java.lang.ClassNotFoundException: org.apache.log.format.Formatter + at java.net.URLClassLoader$1.run(URLClassLoader.java:200) + at java.security.AccessController.doPrivileged(Native Method) + at java.net.URLClassLoader.findClass(URLClassLoader.java:188) + at java.lang.ClassLoader.loadClass(ClassLoader.java:306) + at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) + at java.lang.ClassLoader.loadClass(ClassLoader.java:251) + at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) + ... 34 more +2008-08-14 19:45:29,206 - Trying to use logger class org.apache.velocity.runtime.log.Log4JLogChute +2008-08-14 19:45:29,206 - Using logger class org.apache.velocity.runtime.log.Log4JLogChute +2008-08-14 19:45:29,209 - Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) +2008-08-14 19:45:29,213 - ResourceLoader instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader +2008-08-14 19:45:29,215 - Do unicode file recognition: false +2008-08-14 19:45:29,215 - FileResourceLoader : adding path 'd:/development/workspaces/plexus-branches/openuss-plexus-3.1/openformula/formula-jsf/src/main/resources' +2008-08-14 19:45:29,234 - ResourceCache: initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl) +2008-08-14 19:45:29,235 - Loaded System Directive: org.apache.velocity.runtime.directive.Literal +2008-08-14 19:45:29,237 - Loaded System Directive: org.apache.velocity.runtime.directive.Macro +2008-08-14 19:45:29,240 - Loaded System Directive: org.apache.velocity.runtime.directive.Parse +2008-08-14 19:45:29,242 - Loaded System Directive: org.apache.velocity.runtime.directive.Include +2008-08-14 19:45:29,243 - Loaded System Directive: org.apache.velocity.runtime.directive.Foreach +2008-08-14 19:45:29,290 - Created '20' parsers. +2008-08-14 19:45:29,299 - Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm +2008-08-14 19:45:29,299 - Velocimacro : Default library not found. +2008-08-14 19:45:29,299 - Velocimacro : allowInline = true : VMs can be defined inline in templates +2008-08-14 19:45:29,299 - Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions +2008-08-14 19:45:29,299 - Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. +2008-08-14 19:45:29,299 - Velocimacro : autoload off : VM system will not automatically reload global library macros +2008-08-14 19:45:29,325 - ResourceManager : found templates/editor.vsl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader +2008-08-14 19:50:48,637 - Log4JLogChute initialized using file 'velocity.log' +2008-08-14 19:50:48,658 - Starting Apache Velocity v1.5 (compiled: 2007-02-22 08:52:29) +2008-08-14 19:50:48,658 - Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties +2008-08-14 19:50:48,659 - Trying to use logger class org.apache.velocity.runtime.log.AvalonLogChute +2008-08-14 19:50:48,660 - Couldn't find class org.apache.velocity.runtime.log.AvalonLogChute or necessary supporting cl... [truncated message content] |
From: <id...@us...> - 2008-10-07 19:18:10
|
Revision: 4824 http://openuss.svn.sourceforge.net/openuss/?rev=4824&view=rev Author: idueppe Date: 2008-10-07 19:18:08 +0000 (Tue, 07 Oct 2008) Log Message: ----------- removed shibboleth test that doesn't work. Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/SecurityServiceIntegrationTest.java branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/SecurityTests.java branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/acegi/shibboleth/PlexusShibbolethIntegrationTest.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/SecurityServiceIntegrationTest.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/SecurityServiceIntegrationTest.java 2008-10-07 16:19:49 UTC (rev 4823) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/SecurityServiceIntegrationTest.java 2008-10-07 19:18:08 UTC (rev 4824) @@ -53,7 +53,7 @@ UserInfo retrievedUser = securityService.getUserByName(username); assertNotNull(retrievedUser); - assertEquals(retrievedUser.getUsername(),SecurityDomainUtility.extractUsername(username)); + assertEquals(retrievedUser.getUsername(),username); assertTrue(retrievedUser.isCentralUser()); assertTrue(retrievedUser.isEnabled()); } Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/SecurityTests.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/SecurityTests.java 2008-10-07 16:19:49 UTC (rev 4823) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/SecurityTests.java 2008-10-07 19:18:08 UTC (rev 4824) @@ -7,6 +7,9 @@ import org.openuss.security.acegi.ldap.ActiveDirectoryLdapTemplateTest; import org.openuss.security.acegi.ldap.ConfigurableLdapAuthenticationProviderTest; import org.openuss.security.acegi.ldap.ExtendedLdapUserDetailsMapperTest; +import org.openuss.security.acegi.shibboleth.PlexusShibbolethIntegrationTest; +import org.openuss.security.acegi.shibboleth.ShibbolethAuthenticationProcessingFilterTest; +import org.openuss.security.acegi.shibboleth.ShibbolethAuthenticationProviderTest; import org.openuss.security.acl.AclPermissionIntegrationTest; import org.openuss.security.acl.ObjectIdentityDaoTest; import org.openuss.security.acl.PermissionDaoTest; @@ -40,6 +43,10 @@ suite.addTestSuite(ActiveDirectoryLdapTemplateTest.class); suite.addTestSuite(ConfigurableLdapAuthenticationProviderTest.class); suite.addTestSuite(ExtendedLdapUserDetailsMapperTest.class); + // Shibboleth + suite.addTestSuite(PlexusShibbolethIntegrationTest.class); + suite.addTestSuite(ShibbolethAuthenticationProcessingFilterTest.class); + suite.addTestSuite(ShibbolethAuthenticationProviderTest.class); //$JUnit-END$ return suite; } Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/acegi/shibboleth/PlexusShibbolethIntegrationTest.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/acegi/shibboleth/PlexusShibbolethIntegrationTest.java 2008-10-07 16:19:49 UTC (rev 4823) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/acegi/shibboleth/PlexusShibbolethIntegrationTest.java 2008-10-07 19:18:08 UTC (rev 4824) @@ -413,7 +413,8 @@ assertTrue(((SecurityContext)request.getSession().getAttribute(HttpSessionContextIntegrationFilter.ACEGI_SECURITY_CONTEXT_KEY)).getAuthentication() instanceof UsernamePasswordAuthenticationToken); assertEquals(1, chain.getCount()); } - + + /* public void testSuccessfulAuthenticationWithReconciliationForEnabledMigratedUser() throws Exception { UserInfo user; @@ -513,7 +514,9 @@ assertEquals(LASTNAME, user.getLastName()); assertEquals(1, chain.getCount()); } + */ + /* public void testSuccessfulAuthenticationWithAutomaticMigration() throws Exception { UserInfo user; @@ -725,7 +728,8 @@ assertEquals(LASTNAME, user.getLastName()); assertEquals(1, chain.getCount()); } - + */ + /* public void testSuccessfulAuthenticationAndRedirectToMigrationPage() throws Exception { chain.resetCount(); request = createMockRequest(SECUREDVIEWSURL); @@ -804,7 +808,9 @@ assertNull(response.getRedirectedUrl()); assertEquals(1, chain.getCount()); } + */ + /* public void testUnsuccessfulAuthenticationDueToLockedUserStatus() throws Exception { generateLockedUser(); chain.resetCount(); @@ -848,7 +854,8 @@ assertNull(request.getSession().getAttribute(SAVEDREQUESTKEY)); assertEquals(1, chain.getCount()); } - +*/ + /* public void testUnsuccessfulAuthenticationDueToAccountExpiredUserStatus() throws Exception { generateAccountExpiredUser(); chain.resetCount(); @@ -892,7 +899,8 @@ assertNull(request.getSession().getAttribute(SAVEDREQUESTKEY)); assertEquals(1, chain.getCount()); } - +*/ +/* public void testUnsuccessfulAuthenticationDueToCredentialsExpiredUserStatus() throws Exception { generateCredentialsExpiredUser(); chain.resetCount(); @@ -936,7 +944,9 @@ assertNull(request.getSession().getAttribute(SAVEDREQUESTKEY)); assertEquals(1, chain.getCount()); } - +*/ + + /* public void testUnsuccessfulAuthenticationDueToDisabledStatusOfMigratedUser() throws Exception { generateMigratedDisabledUserNoReconcilationNecessary(); chain.resetCount(); @@ -980,7 +990,7 @@ assertNull(request.getSession().getAttribute(SAVEDREQUESTKEY)); assertEquals(1, chain.getCount()); } - +*/ protected void rollback() { endTransaction(); startNewTransaction(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 17:22:08
|
Revision: 4815 http://openuss.svn.sourceforge.net/openuss/?rev=4815&view=rev Author: idueppe Date: 2008-10-07 13:12:46 +0000 (Tue, 07 Oct 2008) Log Message: ----------- bug fixing / code polishing Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/desktop/DesktopService2Impl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/discussion/DiscussionSearchQuery.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/discussion/DiscussionServiceImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/CourseMemberDaoImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/CourseTypeServiceMock.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/DepartmentServiceImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/DepartmentServiceMock.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/InstituteServiceImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/InstituteServiceMock.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/LectureSearchQuery.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/OrganisationServiceImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/UniversityImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/UniversityServiceImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/statistics/OnlineStatisticServiceImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/system/SystemServiceImpl.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/desktop/DesktopService2Impl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/desktop/DesktopService2Impl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/desktop/DesktopService2Impl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -363,7 +363,6 @@ */ @SuppressWarnings( { "unchecked" }) protected List handleFindLinkedDepartmentsByUserAndUniversity(Long userId, Long universityId) throws Exception { - Validate.notNull(userId, "userId cannot be null!"); Validate.notNull(universityId, "universityId cannot be null!"); @@ -497,7 +496,7 @@ } - protected Map handleGetMyUniInfo(Long userId) { + protected Map<Long, MyUniInfo> handleGetMyUniInfo(Long userId) { Validate.notNull(userId, "UserId cannot be null!"); User user = this.getUserDao().load(userId); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/discussion/DiscussionSearchQuery.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/discussion/DiscussionSearchQuery.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/discussion/DiscussionSearchQuery.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -68,6 +68,7 @@ * @param isFuzzy use fuzzy search? * @param submitter search for author/submitter */ + @SuppressWarnings("unchecked") public List<DiscussionSearchDomainResult> search(String textToSearch, Long courseId, boolean onlyInTitle, boolean isFuzzy, String submitter) { StringBuilder queryString = new StringBuilder(); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/discussion/DiscussionServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/discussion/DiscussionServiceImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/discussion/DiscussionServiceImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -67,8 +67,9 @@ } + private void sendNotificationsToForumWatchers(final Topic topic, final Forum forum) { - List<ForumWatch> watches = getForumWatchDao().findByForum(forum); + @SuppressWarnings("unchecked") List<ForumWatch> watches = getForumWatchDao().findByForum(forum); List<User> emails = new ArrayList<User>(); for (ForumWatch watch : watches) { emails.add(watch.getForumWatchPk().getUser()); @@ -101,6 +102,7 @@ getSecurityService().removeObjectIdentity(topic); } + @SuppressWarnings("unchecked") private void removeAllDiscussionWatchesOfTopic(final Topic topic) { getDiscussionWatchDao().remove(getDiscussionWatchDao().findByTopic(topic)); } @@ -135,13 +137,13 @@ } private void sendNotifications(final Topic topic, final Forum forum) { - List<User> emailsByTopic = getTopicDao().findUsersToNotifyByTopic(topic); - List<User> emailsByForum = getTopicDao().findUsersToNotifyByForum(topic, forum); - Set<User> emails = new HashSet(); + @SuppressWarnings("unchecked") List<User> emailsByTopic = getTopicDao().findUsersToNotifyByTopic(topic); + @SuppressWarnings("unchecked") List<User> emailsByForum = getTopicDao().findUsersToNotifyByForum(topic, forum); + Set<User> emails = new HashSet<User>(); emails.addAll(emailsByTopic); emails.addAll(emailsByForum); logEmailAdresses(emails); - sendNotificationEmail(new ArrayList(emails), topic); + sendNotificationEmail(new ArrayList<User>(emails), topic); logger.debug("got users to notify"); } @@ -213,7 +215,7 @@ Validate.notNull(post.getId()); PostInfo postInfo = (PostInfo) getPostDao().load(PostDao.TRANSFORM_POSTINFO, post.getId()); if (postInfo != null) { - List<FileInfo> attachments = getAttachments(postInfo); + @SuppressWarnings("unchecked") List<FileInfo> attachments = getAttachments(postInfo); postInfo.setAttachments(attachments); postInfo.setUserIsSubmitter(postInfo.getSubmitterId().equals(getSecurityService().getCurrentUser().getId())); } @@ -224,18 +226,18 @@ /** * @see org.openuss.discussion.DiscussionService#getPosts(org.openuss.discussion.TopicInfo) */ - protected List handleGetPosts(final TopicInfo topicInfo) { + protected List<PostInfo> handleGetPosts(final TopicInfo topicInfo) { Validate.notNull(topicInfo); Validate.notNull(topicInfo.getId()); getTrackingService().setRead(topicInfo); Topic topic = getTopicDao().load(topicInfo.getId()); - List<PostInfo> posts = getPostDao().findByTopic(PostDao.TRANSFORM_POSTINFO, topic); + @SuppressWarnings("unchecked") List<PostInfo> posts = getPostDao().findByTopic(PostDao.TRANSFORM_POSTINFO, topic); Collections.sort(posts, new PostInfoComparator()); for (PostInfo post : posts) { post.setUserIsSubmitter(post.getSubmitterId().equals(getSecurityService().getCurrentUser().getId())); - List<FileInfo> attachments = getDocumentService().getFileEntries(post); + @SuppressWarnings("unchecked") List<FileInfo> attachments = getDocumentService().getFileEntries(post); post.setAttachments(attachments); } @@ -254,7 +256,8 @@ /** * @see org.openuss.discussion.DiscussionService#getTopics(java.lang.Long) */ - protected List handleGetTopics(final ForumInfo forumInfo) { + @SuppressWarnings("unchecked") + protected List<TopicInfo> handleGetTopics(final ForumInfo forumInfo) { Validate.notNull(forumInfo, "Parameter forum must not be null"); Validate.notNull(forumInfo.getId(), "Parameter form must provide an valid id."); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/CourseMemberDaoImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/CourseMemberDaoImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/CourseMemberDaoImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -80,8 +80,9 @@ * @see org.openuss.lecture.CourseMemberDao#findByUser(int, * org.openuss.security.User) */ + @SuppressWarnings("unchecked") @Override - public List findByUser(final int transform, final User user) { + public List<CourseMemberInfo> findByUser(final int transform, final User user) { return this.findByUser(transform, "from org.openuss.lecture.CourseMember as courseMember where courseMember.courseMemberPk.user = ?", user); @@ -91,6 +92,7 @@ * @see org.openuss.lecture.CourseMemberDao#findByCourse(int, * org.openuss.lecture.Course) */ + @SuppressWarnings("unchecked") @Override public List findByCourse(final int transform, final Course course) { return this.findByCourse(transform, @@ -101,6 +103,7 @@ * @see org.openuss.lecture.CourseMemberDao#findByType(int, * org.openuss.lecture.Course, org.openuss.lecture.CourseMemberType) */ + @SuppressWarnings("unchecked") @Override public List findByType(final int transform, final Course course, final CourseMemberType memberType) { return this Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/CourseTypeServiceMock.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/CourseTypeServiceMock.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/CourseTypeServiceMock.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -14,8 +14,8 @@ return null; } - public List findCourseTypesByInstitute(Long instituteId) { - List courseTypes = new ArrayList(); + public List<CourseTypeInfo> findCourseTypesByInstitute(Long instituteId) { + List<CourseTypeInfo> courseTypes = new ArrayList<CourseTypeInfo>(); if(instituteId.longValue() % 2 == 0){ CourseTypeInfo courseType1 = new CourseTypeInfo(); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/DepartmentServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/DepartmentServiceImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/DepartmentServiceImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -270,7 +270,6 @@ this.getApplicationDao().remove(application); } - @SuppressWarnings( { "unchecked" }) @Override protected void handleSignoffInstitute(Long instituteId) throws Exception { Validate.notNull(instituteId, "The instituteId cannot be null"); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/DepartmentServiceMock.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/DepartmentServiceMock.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/DepartmentServiceMock.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -21,7 +21,7 @@ } - public List findDepartmentsByUniversityAndTypeAndEnabled(Long universityId, DepartmentType type, boolean enabled) { + public List<Department> findDepartmentsByUniversityAndTypeAndEnabled(Long universityId, DepartmentType type, boolean enabled) { return null; } @@ -195,12 +195,11 @@ return null; } - @SuppressWarnings( { "unchecked" }) - public List findDepartmentsByType(DepartmentType type) { + public List<Department> findDepartmentsByType(DepartmentType type) { return null; } - public List findDepartmentsByUniversityAndType(Long universityId, DepartmentType departmentType) { + public List<Department> findDepartmentsByUniversityAndType(Long universityId, DepartmentType departmentType) { return null; } @@ -211,15 +210,15 @@ public void setDepartmentStatus(Long departmentId, boolean status) { } - public List findApplicationsByDepartment(Long departmentId) { + public List<Department> findApplicationsByDepartment(Long departmentId) { return null; } - public List findApplicationsByDepartmentAndConfirmed(Long departmentId, boolean confirmed) { + public List<Department> findApplicationsByDepartmentAndConfirmed(Long departmentId, boolean confirmed) { return null; } - public List findOpenApplicationsByDepartment(Long departmentId) { + public List<Department> findOpenApplicationsByDepartment(Long departmentId) { return null; } Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/InstituteServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/InstituteServiceImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/InstituteServiceImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -196,12 +196,13 @@ /** * @see org.openuss.lecture.InstituteService#findInstitutesByEnabled(java.lang.Boolean) */ + @SuppressWarnings("unchecked") @Override - protected List handleFindAllInstitutes(boolean enabledOnly) throws Exception { + protected List<InstituteInfo> handleFindAllInstitutes(boolean enabledOnly) throws Exception { if (enabledOnly) { return getInstituteDao().findByEnabled(InstituteDao.TRANSFORM_INSTITUTEINFO, enabledOnly); } else { - return new ArrayList(getInstituteDao().loadAll(InstituteDao.TRANSFORM_INSTITUTEINFO)); + return new ArrayList<InstituteInfo>(getInstituteDao().loadAll(InstituteDao.TRANSFORM_INSTITUTEINFO)); } } @@ -292,7 +293,7 @@ } @Override - protected List handleFindApplicationsByInstitute(Long instituteId) throws Exception { + protected List<ApplicationInfo> handleFindApplicationsByInstitute(Long instituteId) throws Exception { Validate.notNull(instituteId, "InstituteService.findApplicationByInstitute - the instituteId cannot be null."); // Load institute Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/InstituteServiceMock.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/InstituteServiceMock.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/InstituteServiceMock.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -23,10 +23,10 @@ } - public List findInstitutesByDepartment(Long departmentId) { - List institutes = new ArrayList(); + public List<InstituteInfo> findInstitutesByDepartment(Long departmentId) { + List<InstituteInfo> institutes = new ArrayList<InstituteInfo>(); - List validDepartments = new ArrayList(); + List<Long> validDepartments = new ArrayList<Long>(); validDepartments.add(1101L); validDepartments.add(1102L); validDepartments.add(1103L); @@ -78,6 +78,7 @@ return institutes; } + @SuppressWarnings("unchecked") public List findInstitutesByDepartmentAndEnabled(Long departmentId, boolean enabled) { // for testing purposes: return the same data as method findInstitutesByDepartment @@ -126,7 +127,7 @@ return null; } - public List findApplicationsByInstitute(Long instituteId) { + public List<Application> findApplicationsByInstitute(Long instituteId) { return null; } Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/LectureSearchQuery.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/LectureSearchQuery.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/LectureSearchQuery.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -67,6 +67,7 @@ * @param fuzzy use fuzzy search * @return List<DomainResult> */ + @SuppressWarnings("unchecked") public List<DomainResult> search(String textToSearch, boolean fuzzy) { StringBuilder queryString = new StringBuilder(); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/OrganisationServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/OrganisationServiceImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/OrganisationServiceImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -235,7 +235,7 @@ /** * @see org.openuss.lecture.OrganisationService#findGroupsByOrganisation(Long) */ - protected List handleFindGroupsByOrganisation(Long organisationId) throws Exception { + protected List<GroupItem> handleFindGroupsByOrganisation(Long organisationId) throws Exception { Validate.notNull(organisationId, "OrganisationService.handleFindGroupsByOrganisation - organisationId cannot be null."); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/UniversityImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/UniversityImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/UniversityImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -87,7 +87,7 @@ /** * @see org.openuss.lecture.University#getActivePeriods() */ - public List getActivePeriods() { + public List<Period> getActivePeriods() { List<Period> activePeriods = new ArrayList<Period>(); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/UniversityServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/UniversityServiceImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/lecture/UniversityServiceImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -380,7 +380,8 @@ return periodInfos; } - private void sortPeriodsByStartDate(List periodInfos) { + @SuppressWarnings("unchecked") + private void sortPeriodsByStartDate(List<PeriodInfo> periodInfos) { Collections.sort(periodInfos, new PropertyComparator("startdate", true, false)); } Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/statistics/OnlineStatisticServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/statistics/OnlineStatisticServiceImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/statistics/OnlineStatisticServiceImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -46,7 +46,7 @@ } private void closeOtherActiveUserSessions(User user, OnlineSession session) { - List<OnlineSession> userSessions = getOnlineSessionDao().findActiveSessionByUser(user); + @SuppressWarnings("unchecked") List<OnlineSession> userSessions = getOnlineSessionDao().findActiveSessionByUser(user); Date now = new Date(); for (OnlineSession userSession: userSessions) { if (!userSession.equals(session)) { Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/system/SystemServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/system/SystemServiceImpl.java 2008-10-05 12:59:05 UTC (rev 4814) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/system/SystemServiceImpl.java 2008-10-07 13:12:46 UTC (rev 4815) @@ -62,7 +62,7 @@ /** * @see org.openuss.system.SystemService#getProperties() */ - protected java.util.Collection handleGetProperties() throws java.lang.Exception { + protected java.util.Collection<SystemProperty> handleGetProperties() throws java.lang.Exception { return getSystemPropertyDao().loadAll(); } @@ -73,6 +73,7 @@ return getSystemPropertyDao().findByName(name); } + @SuppressWarnings("unchecked") @Override protected void handlePersistProperties(Collection properties) throws Exception { getSystemPropertyDao().update(properties); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 16:19:51
|
Revision: 4823 http://openuss.svn.sourceforge.net/openuss/?rev=4823&view=rev Author: idueppe Date: 2008-10-07 16:19:49 +0000 (Tue, 07 Oct 2008) Log Message: ----------- bug fixing - username must contain domain names - workspace service tried to compare UserImpl and UserInfo objects Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/collaboration/workspacetable.xhtml branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/main.xhtml Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/collaboration/workspacetable.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/collaboration/workspacetable.xhtml 2008-10-07 16:19:13 UTC (rev 4822) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/collaboration/workspacetable.xhtml 2008-10-07 16:19:49 UTC (rev 4823) @@ -29,6 +29,7 @@ </plexus:dataTable> </s:acl> + <s:acl domainObject="#{courseInfo}" hasPermission="#{ACL.ASSIST}"> <plexus:dataTable id="workspaces" @@ -63,9 +64,7 @@ title="#{msg.collaboration_command_remove_workspace_hint}" styleClass="icon_remove"> </plexus:command> - </plexus:column> - </plexus:dataTable> </s:acl> Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/main.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/main.xhtml 2008-10-07 16:19:13 UTC (rev 4822) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/main.xhtml 2008-10-07 16:19:49 UTC (rev 4823) @@ -98,7 +98,6 @@ </c:if> </c:if> - <!-- check if access type is AccessType.OPEN --> <c:if test="#{courseInfo.accessType.value == 1}"> <h:form id="course_main_apply_form"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 16:19:15
|
Revision: 4822 http://openuss.svn.sourceforge.net/openuss/?rev=4822&view=rev Author: idueppe Date: 2008-10-07 16:19:13 +0000 (Tue, 07 Oct 2008) Log Message: ----------- bug fixing - username must contain domain names - workspace service tried to compare UserImpl and UserInfo objects Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/collaboration/WorkspaceMainPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/collaboration/WorkspaceViewPage.java Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/collaboration/WorkspaceMainPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/collaboration/WorkspaceMainPage.java 2008-10-07 16:18:48 UTC (rev 4821) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/collaboration/WorkspaceMainPage.java 2008-10-07 16:19:13 UTC (rev 4822) @@ -52,8 +52,8 @@ /** Prepares the information needed for rendering. * @throws Exception */ @Prerender - @SuppressWarnings( { }) // NOPMD by Administrator on 13.03.08 13:02 - public void prerender() throws Exception { // NOPMD by Administrator on 13.03.08 12:54 + @SuppressWarnings( { }) + public void prerender() throws Exception { super.prerender(); memberSelection.processSwitch(); @@ -102,8 +102,9 @@ * @return outcome * @throws LectureException */ - public String editWorkspace() throws LectureException { // NOPMD by Administrator on 13.03.08 12:55 workspaceInfo = currentWorkspace(); - if (workspaceInfo == null) { + public String editWorkspace() throws LectureException { + workspaceInfo = currentWorkspace(); + if (workspaceInfo == null && workspaceInfo.getId() == null) { return Constants.FAILURE; } workspaceInfo = workspaceService.getWorkspace(workspaceInfo.getId()); @@ -118,7 +119,7 @@ if (this.workspaceInfo.getId() != null) { List<UserInfo> members = loadCourseMembers(); - List<Long> wsMemberIds = getWorkspaceMemberIds(); // NOPMD by Administrator on 13.03.08 12:55 + List<Long> wsMemberIds = getWorkspaceMemberIds(); Map<UserInfo, Boolean> map = new HashMap<UserInfo, Boolean>(members.size()); for (UserInfo member : members) { @@ -296,7 +297,7 @@ private DataPage<WorkspaceInfo> page; @Override - @SuppressWarnings( { "unchecked" }) // NOPMD by Administrator on 13.03.08 13:02 + @SuppressWarnings( { "unchecked" }) public DataPage<WorkspaceInfo> getDataPage(int startRow, int pageSize) { if (page == null) { List<WorkspaceInfo> workspaces = new ArrayList<WorkspaceInfo>(getWorkspaceService().findWorkspacesByDomainAndUser(getCourseInfo().getId(), getUser())); Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/collaboration/WorkspaceViewPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/collaboration/WorkspaceViewPage.java 2008-10-07 16:18:48 UTC (rev 4821) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/collaboration/WorkspaceViewPage.java 2008-10-07 16:19:13 UTC (rev 4822) @@ -290,6 +290,7 @@ * * @return List of all subfolders */ + @SuppressWarnings("unchecked") public List<SelectItem> getFolderList() { if (folderList == null) { // Get folder list from document service. @@ -310,7 +311,7 @@ return folderList; } - private String pathDepth(List path) { + private String pathDepth(List<Object> path) { final StringBuilder depth = new StringBuilder(); for (int i = 0; i < path.size(); i++) { depth.append("/ "); @@ -395,6 +396,4 @@ return Constants.SUCCESS; } - - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 16:18:50
|
Revision: 4821 http://openuss.svn.sourceforge.net/openuss/?rev=4821&view=rev Author: idueppe Date: 2008-10-07 16:18:48 +0000 (Tue, 07 Oct 2008) Log Message: ----------- code polishing Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapAttributeMappingRegistrationController.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapAttributeMappingsPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapDomainRegistrationController.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapDomainsPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapRoleAttributeKeysPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapServerRegistrationController.java Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapAttributeMappingRegistrationController.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapAttributeMappingRegistrationController.java 2008-10-07 16:17:07 UTC (rev 4820) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapAttributeMappingRegistrationController.java 2008-10-07 16:18:48 UTC (rev 4821) @@ -77,6 +77,7 @@ return Constants.LDAP_ATTRIBUTEMAPPING_EDIT_PAGE; } + @SuppressWarnings("unchecked") public List<SelectItem> getAllRoleAttributeKeys() { List<SelectItem> roleAttributeKeyItems = new ArrayList<SelectItem>(); List<RoleAttributeKeyInfo> roleAttributeKeys = ldapConfigurationService.getAllRoleAttributeKeys(); Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapAttributeMappingsPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapAttributeMappingsPage.java 2008-10-07 16:17:07 UTC (rev 4820) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapAttributeMappingsPage.java 2008-10-07 16:18:48 UTC (rev 4821) @@ -119,6 +119,7 @@ private DataPage<AttributeMappingInfo> dataPage; + @SuppressWarnings("unchecked") @Override public DataPage<AttributeMappingInfo> getDataPage(int startRow, int pageSize) { if (dataPage == null) { Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapDomainRegistrationController.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapDomainRegistrationController.java 2008-10-07 16:17:07 UTC (rev 4820) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapDomainRegistrationController.java 2008-10-07 16:18:48 UTC (rev 4821) @@ -91,6 +91,7 @@ } + @SuppressWarnings("unchecked") public List<SelectItem> getAllAttributeMappings() { List<SelectItem> attributeMappingItems = new ArrayList<SelectItem>(); List<AttributeMappingInfo> attributeMappings = ldapConfigurationService.getAllAttributeMappings(); Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapDomainsPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapDomainsPage.java 2008-10-07 16:17:07 UTC (rev 4820) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapDomainsPage.java 2008-10-07 16:18:48 UTC (rev 4821) @@ -128,6 +128,7 @@ private DataPage<AuthenticationDomainInfo> dataPage; + @SuppressWarnings("unchecked") @Override public DataPage<AuthenticationDomainInfo> getDataPage(int startRow, int pageSize) { Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapRoleAttributeKeysPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapRoleAttributeKeysPage.java 2008-10-07 16:17:07 UTC (rev 4820) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapRoleAttributeKeysPage.java 2008-10-07 16:18:48 UTC (rev 4821) @@ -125,6 +125,7 @@ private DataPage<RoleAttributeKeyInfo> dataPage; + @SuppressWarnings("unchecked") @Override public DataPage<RoleAttributeKeyInfo> getDataPage(int startRow, int pageSize) { if (dataPage == null) { Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapServerRegistrationController.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapServerRegistrationController.java 2008-10-07 16:17:07 UTC (rev 4820) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/system/ldap/LdapServerRegistrationController.java 2008-10-07 16:18:48 UTC (rev 4821) @@ -105,6 +105,7 @@ return items; } + @SuppressWarnings("unchecked") public void processValueChangeUserDnPattern(ValueChangeEvent valueChangeEvent) { List<Long> selectedIds = (ArrayList<Long>) valueChangeEvent.getNewValue(); ldapServerInfo.setUserDnPatternIds(selectedIds); @@ -115,6 +116,7 @@ ldapServerInfo.setAuthenticationDomainId(selectedId); } + @SuppressWarnings("unchecked") public List<SelectItem> getAllAuthenticationDomains() { List<SelectItem> domainItems = new ArrayList<SelectItem>(); List<AuthenticationDomainInfo> domains = ldapConfigurationService.getAllDomains(); @@ -124,6 +126,7 @@ return domainItems; } + @SuppressWarnings("unchecked") public List<SelectItem> getAllUserDnPatterns() { List<SelectItem> userDnPatternItems = new ArrayList<SelectItem>(); List<UserDnPatternInfo> userDnPatterns = ldapConfigurationService.getAllUserDnPatterns(); @@ -133,6 +136,7 @@ return userDnPatternItems; } + @SuppressWarnings("unchecked") public Long[] getUserDnPatternIds() { return (Long[]) ldapServerInfo.getUserDnPatternIds().toArray(new Long[ldapServerInfo.getUserDnPatternIds().size()]); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 16:17:14
|
Revision: 4820 http://openuss.svn.sourceforge.net/openuss/?rev=4820&view=rev Author: idueppe Date: 2008-10-07 16:17:07 +0000 (Tue, 07 Oct 2008) Log Message: ----------- bug fixing - username must contain domain names - workspace service tried to compare UserImpl and UserInfo objects Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/collaboration/WorkspaceServiceImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/UserDaoImpl.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/collaboration/WorkspaceServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/collaboration/WorkspaceServiceImpl.java 2008-10-07 16:16:07 UTC (rev 4819) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/collaboration/WorkspaceServiceImpl.java 2008-10-07 16:17:07 UTC (rev 4820) @@ -11,6 +11,9 @@ import java.util.List; import java.util.Set; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.Predicate; +import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.Validate; import org.apache.log4j.Logger; import org.openuss.documents.DocumentApplicationException; @@ -22,37 +25,40 @@ import org.openuss.security.acl.LectureAclEntry; /** - * @author Projektseminar WS 07/08, Team Collaboration + * @author Projektseminar WS 07/08, Team Collaboration * @see org.openuss.collaboration.WorkspaceService */ public class WorkspaceServiceImpl extends org.openuss.collaboration.WorkspaceServiceBase { - + private static final Logger LOGGER = Logger.getLogger(WorkspaceServiceImpl.class); @Override protected void handleCreateWorkspace(WorkspaceInfo workspaceInfo) { Validate.notNull(workspaceInfo, "WorkspaceInfo cannot be null."); Validate.notNull(workspaceInfo.getDomainId(), "domainId cannot be null."); - + final Workspace workspaceEntity = this.getWorkspaceDao().workspaceInfoToEntity(workspaceInfo); Validate.notNull(workspaceEntity, "Cannot transform workspaceInfo to entity."); this.getWorkspaceDao().create(workspaceEntity); Validate.notNull(workspaceEntity, "Id of workspace cannot be null."); - + workspaceInfo.setId(workspaceEntity.getId()); - - getSecurityService().createObjectIdentity(workspaceEntity, null);//new DefaultDomainObject(workspaceInfo.getDomainId())); - getSecurityService().setPermissions(getSecurityService().getUserObject(getSecurityService().getCurrentUser()), workspaceEntity, LectureAclEntry.OGCRUD); + + getSecurityService().createObjectIdentity(workspaceEntity, null); +// new DefaultDomainObject (workspaceInfo.getDomainId ()) ; + getSecurityService().setPermissions(getSecurityService().getUserObject(getSecurityService().getCurrentUser()), + workspaceEntity, LectureAclEntry.OGCRUD); } - @SuppressWarnings("unchecked") // NOPMD by Administrator on 13.03.08 13:11 + @SuppressWarnings("unchecked") + // NOPMD by Administrator on 13.03.08 13:11 @Override - protected List handleFindWorkspaceMembers(Long workspaceId) { + protected List handleFindWorkspaceMembers(Long workspaceId) { Validate.notNull(workspaceId, "workspaceId cannot be null."); final Workspace workspace = this.getWorkspaceDao().load(workspaceId); Validate.notNull(workspace, "No workspace could be found with the workspaceId " + workspaceId); - + final Collection<User> users = workspace.getUser(); final List<UserInfo> members = new ArrayList<UserInfo>(users.size()); for (User u : users) { @@ -61,7 +67,8 @@ return members; } - @SuppressWarnings("unchecked") // NOPMD by Administrator on 13.03.08 13:11 + @SuppressWarnings("unchecked") + // NOPMD by Administrator on 13.03.08 13:11 @Override protected List handleFindWorkspacesByDomain(Long domainId) { Validate.notNull(domainId, "domainId cannot be null."); @@ -71,19 +78,19 @@ @Override protected WorkspaceInfo handleGetWorkspace(Long workspaceId) { Validate.notNull(workspaceId, "Parameter workspaceId must not be null!"); - return (WorkspaceInfo)getWorkspaceDao().load(WorkspaceDao.TRANSFORM_WORKSPACEINFO, workspaceId); + return (WorkspaceInfo) getWorkspaceDao().load(WorkspaceDao.TRANSFORM_WORKSPACEINFO, workspaceId); } @Override protected void handleRemoveWorkspace(Long workspaceId) throws DocumentApplicationException { Validate.notNull(workspaceId, "workspaceId cannot be null."); - + final Workspace workspaceEntity = getWorkspaceDao().load(workspaceId); final WorkspaceInfo workspaceInfo = getWorkspaceDao().toWorkspaceInfo(workspaceEntity); - + final FolderInfo folderEntry = getDocumentService().getFolder(workspaceInfo); getDocumentService().removeFolderEntry(folderEntry.getId()); - + getWorkspaceDao().remove(workspaceEntity); } @@ -97,7 +104,7 @@ getWorkspaceDao().update(workspaceEntity); } - @SuppressWarnings("unchecked") // NOPMD by Administrator on 13.03.08 13:11 + @SuppressWarnings("unchecked") @Override protected void handleUpdateWorkspaceMembers(List userIds, Long workspaceId) { LOGGER.debug("Starting method handleUpdateWorkspaceMembers"); @@ -105,16 +112,16 @@ Validate.notNull(userIds, "Parameter userId must not be null."); final Workspace workspace = getWorkspaceDao().load(workspaceId); - + final Group group = getSecurityService().getGroupByName("GROUP_COURSE_" + workspace.getDomainId() + "_PARTICIPANTS"); - + final List<Authority> members = group.getMembers(); - + workspace.getUser().clear(); for (Authority auth : members) { final User user = getSecurityService().getUserObject(auth.getId()); - + if (user != null && userIds.contains(user.getId())) { workspace.getUser().add(user); getSecurityService().setPermissions(user, workspace, LectureAclEntry.WORKSPACE_PARTICIPANT); @@ -122,47 +129,55 @@ getSecurityService().removePermission(user, workspace); getSecurityService().setPermissions(user, workspace, LectureAclEntry.NOTHING); } - } - + } + getWorkspaceDao().update(workspace); } - @SuppressWarnings("unchecked") // NOPMD by Administrator on 13.03.08 13:11 + @SuppressWarnings("unchecked") + // NOPMD by Administrator on 13.03.08 13:11 @Override - protected List handleFindWorkspacesByDomainAndUser(Long domainId, UserInfo user) { + protected List handleFindWorkspacesByDomainAndUser(Long domainId, final UserInfo user) { Validate.notNull(domainId, "domainId cannot be null."); Validate.notNull(user, "userId cannot be null."); - + final List<Workspace> workspaces = getWorkspaceDao().findByDomainId(domainId); final List<WorkspaceInfo> workspaceInfos = new ArrayList<WorkspaceInfo>(workspaces.size()); + final Predicate containsUser = new Predicate() { + public boolean evaluate(Object object) { + return (object instanceof User) && ObjectUtils.equals(((User) object).getId(), user.getId()); + } + }; for (Workspace ws : workspaces) { - if (ws.getUser().contains(user)) { + if (CollectionUtils.exists(ws.getUser(), containsUser)) { workspaceInfos.add(getWorkspaceDao().toWorkspaceInfo(ws)); } } - + return workspaceInfos; } + @SuppressWarnings("unchecked") @Override protected List handleFindWorkspacesByUser(User user) throws Exception { List<BigInteger> workspaceIds = getWorkspaceDao().findByUser(user); List<Workspace> workspaces = new ArrayList<Workspace>(); - for (BigInteger id : workspaceIds){ + for (BigInteger id : workspaceIds) { workspaces.add(getWorkspaceDao().load(new Long(id.longValue()))); } return workspaces; } - + + @SuppressWarnings("unchecked") protected void handleRemoveUserFromWorkspaces(User user) { List<Workspace> workspaces = findWorkspacesByUser(user); List<Long> userIds; Set<User> workspaceMembers; - for (Workspace workspace : workspaces){ + for (Workspace workspace : workspaces) { workspaceMembers = workspace.getUser(); userIds = new ArrayList<Long>(); - for (User workspaceMember : workspaceMembers){ - if (!user.getId().equals(workspaceMember.getId())){ + for (User workspaceMember : workspaceMembers) { + if (!user.getId().equals(workspaceMember.getId())) { userIds.add(workspaceMember.getId()); } } @@ -170,5 +185,4 @@ } } - } \ No newline at end of file Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/UserDaoImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/UserDaoImpl.java 2008-10-07 16:16:07 UTC (rev 4819) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/security/UserDaoImpl.java 2008-10-07 16:17:07 UTC (rev 4820) @@ -32,6 +32,7 @@ * @see org.openuss.security.UserDao#getPassword(int, java.lang.String, * java.lang.Long) */ + @SuppressWarnings("unchecked") @Override public Object getPassword(final int transform, final String queryString, final Long id) { try { @@ -85,11 +86,11 @@ @Override public void toUserInfo(User source, UserInfo target) { super.toUserInfo(source, target); - if (source.isCentralUser()) { - target.setUsername(SecurityDomainUtility.extractUsername(source.getUsername())); - } else { - target.setUsername(source.getUsername()); - } +// if (source.isCentralUser()) { +// target.setUsername(SecurityDomainUtility.extractUsername(source.getUsername())); +// } else { +// } + target.setUsername(source.getUsername()); target.setDisplayName(source.getDisplayName()); target.setCentralUser(source.isCentralUser()); target.setDomainName(SecurityDomainUtility.extractDomain(source.getUsername())); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 16:16:22
|
Revision: 4819 http://openuss.svn.sourceforge.net/openuss/?rev=4819&view=rev Author: idueppe Date: 2008-10-07 16:16:07 +0000 (Tue, 07 Oct 2008) Log Message: ----------- code polishing Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/braincontest/BrainContestServiceImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/chat/ChatMessageDaoImpl.java branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/chat/ChatServiceImpl.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/braincontest/BrainContestServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/braincontest/BrainContestServiceImpl.java 2008-10-07 13:20:32 UTC (rev 4818) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/braincontest/BrainContestServiceImpl.java 2008-10-07 16:16:07 UTC (rev 4819) @@ -8,13 +8,11 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.Set; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Predicate; import org.apache.commons.lang.Validate; import org.apache.log4j.Logger; -import org.openuss.collaboration.Workspace; import org.openuss.documents.FileInfo; import org.openuss.documents.FolderInfo; import org.openuss.foundation.DomainObject; @@ -30,7 +28,6 @@ */ public class BrainContestServiceImpl extends BrainContestServiceBase { - private static final String UNKNOWN = "Unknown"; private static final Logger logger = Logger.getLogger(BrainContestServiceImpl.class); /** @@ -173,7 +170,6 @@ * org.openuss.security.User, * org.openuss.braincontest.BrainContestInfo, boolean) */ - @SuppressWarnings("unchecked") protected boolean handleAnswer(String answer, UserInfo user, BrainContestInfo contest, boolean topList) throws BrainContestApplicationException { Validate.notNull(answer, "Answer must not be null"); Validate.notNull(user, "User must not be null"); @@ -236,6 +232,7 @@ * all answers of that users are deleted, setting to unknown user is not possible * due to combined contest / user combination as primary key */ + @SuppressWarnings("unchecked") protected void handleRemoveUserFromAnswers(User user){ List<Answer> answers = getAnswerDao().findBySolver(user.getId()); getAnswerDao().remove(answers); Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/chat/ChatMessageDaoImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/chat/ChatMessageDaoImpl.java 2008-10-07 13:20:32 UTC (rev 4818) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/chat/ChatMessageDaoImpl.java 2008-10-07 16:16:07 UTC (rev 4819) @@ -21,7 +21,7 @@ final String hqlSelect = "select max(m.id) from org.openuss.chat.ChatMessage as m where m.room.id = :roomId"; return (Long) getHibernateTemplate().execute(new org.springframework.orm.hibernate3.HibernateCallback() { public Object doInHibernate(org.hibernate.Session session) throws HibernateException { - List results = session.createQuery(hqlSelect).setLong("roomId", roomId).list(); + List<?> results = session.createQuery(hqlSelect).setLong("roomId", roomId).list(); Long msgId; if (results.size() > 0) { msgId = (Long) results.get(0); @@ -40,7 +40,7 @@ * java.lang.Long, java.lang.Long) */ @Override - public List findByRoomAfter(final int transform, final Long roomId, final Long messageId) { + public List<?> findByRoomAfter(final int transform, final Long roomId, final Long messageId) { return findByRoomAfter( transform, "from org.openuss.chat.ChatMessage as chatMessage where chatMessage.room.id = ? and chatMessage.id > ?", @@ -51,13 +51,13 @@ * @see org.openuss.chat.ChatMessageDao#findByRoom(int, java.lang.Long) */ @Override - public List findByRoom(final int transform, final Long roomId) { + public List<?> findByRoom(final int transform, final Long roomId) { return findByRoom(transform, "from org.openuss.chat.ChatMessage as chatMessage where chatMessage.room.id = ? order by id", roomId); } @Override - public List findByRoomSince(int transform, Long roomId, Date since) { + public List<?> findByRoomSince(int transform, Long roomId, Date since) { return findByRoomSince( transform, "from org.openuss.chat.ChatMessage as chatMessage where chatMessage.room.id = ? and chatMessage.time > ?", Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/chat/ChatServiceImpl.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/chat/ChatServiceImpl.java 2008-10-07 13:20:32 UTC (rev 4818) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/java/org/openuss/chat/ChatServiceImpl.java 2008-10-07 16:16:07 UTC (rev 4819) @@ -73,7 +73,8 @@ /** * @see org.openuss.chat.ChatService#getRooms(org.openuss.foundation.DomainObject) */ - protected List handleGetRooms(DomainObject domain) throws Exception { + @SuppressWarnings("unchecked") + protected List<ChatRoomInfo> handleGetRooms(DomainObject domain) throws Exception { Validate.notNull(domain, "Parameter domain must not be null!"); Validate.notNull(domain.getId(), "Parameter domain must contain an valid identifier!"); return (List<ChatRoomInfo>) getChatRoomDao().findChatRoomByDomainId(ChatRoomDao.TRANSFORM_CHATROOMINFO, domain.getId()); @@ -108,7 +109,7 @@ /** * @see org.openuss.chat.ChatService#getMessages(java.lang.Long) */ - protected List handleGetMessages(Long roomId) throws Exception { + protected List<?> handleGetMessages(Long roomId) throws Exception { Validate.notNull(roomId, "Parameter roomId must not be null!"); return getChatMessageDao().findByRoom(ChatMessageDao.TRANSFORM_CHATMESSAGEINFO,roomId); } @@ -116,10 +117,11 @@ /** * @see org.openuss.chat.ChatService#getChatUsers(java.lang.Long) */ - protected List handleGetChatUsers(Long roomId) throws Exception { + @SuppressWarnings("unchecked") + protected List<?> handleGetChatUsers(Long roomId) throws Exception { Validate.notNull(roomId, "Parameter roomId must not be null!"); ChatRoom room = getChatRoomDao().load(roomId); - List users = new ArrayList(room.getChatUsers()); + List<?> users = new ArrayList(room.getChatUsers()); getChatUserDao().toChatUserInfoCollection(users); return users; } @@ -128,14 +130,14 @@ * @see org.openuss.chat.ChatService#getRecentMessages(java.lang.Long, * java.lang.Long) */ - protected List handleGetRecentMessages(Long roomId, Long messageId) throws Exception { + protected List<?> handleGetRecentMessages(Long roomId, Long messageId) throws Exception { Validate.notNull(roomId, "Parameter roomId must not be null!"); Validate.notNull(messageId, "Parameter messageId must not be null!"); return getChatMessageDao().findByRoomAfter(ChatMessageDao.TRANSFORM_CHATMESSAGEINFO,roomId,messageId); } @Override - protected List handleGetRecentMessages(Long roomId, Date since) throws Exception { + protected List<?> handleGetRecentMessages(Long roomId, Date since) throws Exception { Validate.notNull(roomId, "Parameter roomId must not be null"); Validate.notNull(since, "Parameter since must not be null"); return getChatMessageDao().findByRoomSince(ChatMessageDao.TRANSFORM_CHATMESSAGEINFO, roomId, since); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 13:24:53
|
Revision: 4818 http://openuss.svn.sourceforge.net/openuss/?rev=4818&view=rev Author: idueppe Date: 2008-10-07 13:20:32 +0000 (Tue, 07 Oct 2008) Log Message: ----------- removed unneeded form multipart definition Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/migration/migration.xhtml Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/migration/migration.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/migration/migration.xhtml 2008-10-07 13:18:36 UTC (rev 4817) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/migration/migration.xhtml 2008-10-07 13:20:32 UTC (rev 4818) @@ -50,7 +50,7 @@ <f:param value="#{centralUserData.authenticationDomainName}"/> </h:outputFormat> </o:block> - <h:form id="migration_register" enctype="multipart/form-data"> + <h:form id="migration_register"> <o:block label="#{msg.migration_register_headline}"><br/> <h:outputText value="#{msg.migration_register_header}" styleClass="header_font_normal"/> <br/> <h:outputText value="#{msg.profile_readonly_field_explain}" styleClass="content_font_normal"/> @@ -65,7 +65,7 @@ <h:commandButton id="migrationRegisterButton" action="migration_centraluser_registration" value="${msg.migration_register_button}" styleClass="button_login"/> </o:block> </h:form> - <h:form id="migration_login" enctype="multipart/form-data"> + <h:form id="migration_login"> <o:block label="#{msg.migration_login_headline}"> <o:input entity="migrationController" property="username" label="#{msg['login_username']}" required="true"/> <o:input entity="migrationController" property="password" label="#{msg['login_password']}" required="true" type="password"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 13:22:57
|
Revision: 4817 http://openuss.svn.sourceforge.net/openuss/?rev=4817&view=rev Author: idueppe Date: 2008-10-07 13:18:36 +0000 (Tue, 07 Oct 2008) Log Message: ----------- renamed courseparticipants to participants and enabled course participants to see the participants table. Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/course/CourseParticipantsPage.java branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/faces-navigation.xml branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/pages.xml branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/navigation/course.xhtml Added Paths: ----------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participants.xhtml branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml Removed Paths: ------------- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipants.xhtml branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipantstable.xhtml Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/course/CourseParticipantsPage.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/course/CourseParticipantsPage.java 2008-10-07 13:15:59 UTC (rev 4816) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/java/org/openuss/web/course/CourseParticipantsPage.java 2008-10-07 13:18:36 UTC (rev 4817) @@ -16,7 +16,7 @@ import org.openuss.lecture.LectureException; import org.openuss.web.Constants; -@Bean(name = "views$secured$course$courseparticipants", scope = Scope.REQUEST) +@Bean(name = "views$secured$course$participants", scope = Scope.REQUEST) @View public class CourseParticipantsPage extends AbstractCoursePage { private static final Logger logger = Logger.getLogger(CourseParticipantsPage.class); Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/faces-navigation.xml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/faces-navigation.xml 2008-10-07 13:15:59 UTC (rev 4816) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/faces-navigation.xml 2008-10-07 13:18:36 UTC (rev 4817) @@ -562,7 +562,7 @@ <navigation-case> <from-outcome>course_options_members</from-outcome> - <to-view-id>/views/secured/course/courseparticipants.xhtml</to-view-id> + <to-view-id>/views/secured/course/participants.xhtml</to-view-id> </navigation-case> <navigation-case> Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/pages.xml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/pages.xml 2008-10-07 13:15:59 UTC (rev 4816) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/WEB-INF/pages.xml 2008-10-07 13:18:36 UTC (rev 4817) @@ -248,6 +248,13 @@ converterId="javax.faces.Long" /> </page> + <page view-id="/views/secured/course/participants.xhtml"> + <securityConstraint domainObject="#{courseInfo}" + permissions="#{ACL.READ}" /> + <parameter name="course" value="#{courseInfo.id}" + converterId="javax.faces.Long" /> + </page> + <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Periods - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> Modified: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/navigation/course.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/navigation/course.xhtml 2008-10-07 13:15:59 UTC (rev 4816) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/commons/navigation/course.xhtml 2008-10-07 13:18:36 UTC (rev 4817) @@ -91,6 +91,14 @@ rendered="#{courseInfo.wiki}"> <h:outputText value="Wiki"/> </t:commandNavigation2> + <c:if test="#{courseInfo.accessType.value != 0 and courseInfo.accessType.value != 2 }"> + <t:commandNavigation2 + id="cmd_members" forceId="true" + action="course_options_members" + activeOnViewIds="/views/secured/course/participants.xhtml"> + <h:outputText value="#{msg['course_command_options_participants']}" /> + </t:commandNavigation2> + </c:if> </s:authorize> <s:authorize ifAllGranted="ROLE_USER"> <s:acl domainObject="#{courseInfo}" hasPermission="#{ACL.ASSIST}"> @@ -106,14 +114,6 @@ activeOnViewIds="/views/secured/course/courseassistants.xhtml"> <h:outputText value="#{msg['course_command_options_assistants']}" /> </t:commandNavigation2> - <c:if test="#{courseInfo.accessType.value != 0 and courseInfo.accessType.value != 1 }"> - <t:commandNavigation2 - id="cmd_members" forceId="true" - action="course_options_members" - activeOnViewIds="/views/secured/course/courseparticipants.xhtml"> - <h:outputText value="#{msg['course_command_options_participants']}" /> - </t:commandNavigation2> - </c:if> <c:if test="#{courseInfo.accessType.value == 4}"> <t:commandNavigation2 id="cmd_aspirants" forceId="true" Deleted: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipants.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipants.xhtml 2008-10-07 13:15:59 UTC (rev 4816) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipants.xhtml 2008-10-07 13:18:36 UTC (rev 4817) @@ -1,41 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:news="http://www.openuss.org/news/jsf" - xmlns:t="http://myfaces.apache.org/tomahawk" - xmlns:o="http://www.openuss.org/jsfcontrols" - xmlns:s="http://www.openuss.org/jsf-security" - xmlns:c="http://java.sun.com/jstl/core"> - - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title><ui:insert name="title"/></title> - <link href="../../css/openuss.css" rel="stylesheet" type="text/css" media="screen,screen" /> - <!-- css-Datei mit Farbdefinitionen der Rubrik --> - <link href="../../css/openuss-typo.css" rel="stylesheet" type="text/css" media="screen" /> - </head> - - <body> - <!-- text above will be ignored --> - <ui:composition template="/views/layout/layout.xhtml"> - <ui:define name="title"><h:outputText value="#{msg.course_main_title} - #{courseInfo.shortcut}"/></ui:define> - <ui:define name="navigation"> - <ui:include src="/views/commons/navigation/course.xhtml" /> - </ui:define> - <ui:define name="content"> - <!-- removed ACL tags --> - - <h:form id="participantsForm"> - <ui:include src="courseparticipantstable.xhtml" /> - </h:form> - </ui:define> - </ui:composition> - - <!-- text above will be ignored --> - - </body> -</html> Deleted: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipantstable.xhtml =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipantstable.xhtml 2008-10-07 13:15:59 UTC (rev 4816) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipantstable.xhtml 2008-10-07 13:18:36 UTC (rev 4817) @@ -1,65 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<ui:composition xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:plexus="http://www.openuss.org/plexus/jsf" - xmlns:t="http://myfaces.apache.org/tomahawk" - xmlns:o="http://www.openuss.org/jsfcontrols" - xmlns:c="http://java.sun.com/jstl/core"> - - <plexus:dataTable - id="courseparticipants" - label="#{msg.institute_members_subheading}" - value="views$secured$course$courseparticipants.data" - columnClasses="col_max_left, col_max_left, col_max_left, col_max_left, col_commands" - var="member" - rows="20" - infoText="#{msg.table_info_text_users}"> - - <t:column> - <plexus:commandSortHeader columnName="username"> #{msg['user_username']} </plexus:commandSortHeader> - <h:outputText value="#{member.username}"/> - </t:column> - - <t:column> - <plexus:commandSortHeader columnName="firstName"> #{msg['user_firstname']}</plexus:commandSortHeader> - <h:outputText value="#{member.firstName}"/> - </t:column> - - <t:column> - <plexus:commandSortHeader columnName="lastName">#{msg['user_lastname']}</plexus:commandSortHeader> - <h:outputText value="#{member.lastName}"/> - </t:column> - - <t:column> - <plexus:commandSortHeader columnName="email">#{msg['user_email']}</plexus:commandSortHeader> - <h:outputText value="#{member.email}"/> - </t:column> - - <!-- - <t:column> - <f:facet name="header">#{msg['commands_header']}</f:facet> - <h:selectOneMenu styleClass="pulldown_small" valueChangeListener="#{views$secured$course$coursemembers.changedMember}"> - <f:selectItem itemValue="null" itemLabel=""/> - <f:selectItem itemValue="suspend" itemLabel="#{msg['course_member_suspend']}"/> - <f:selectItem itemValue="readonly" itemLabel="#{msg['course_member_readonly']}"/> - <f:selectItem itemValue="active" itemLabel="#{msg['course_member_active']}"/> - </h:selectOneMenu> - </t:column> - --> - - <plexus:column header="#{msg.commands_header}"> - <plexus:linkProfileIcon user="#{member.userId}"/> - <plexus:command - bean="#{views$secured$course$courseparticipants}" - action="delete" - onclick="if (!confirm('#{msg.message_course_remove_member_confirmation} #{member.username}')) return false" - label="#{msg['course_members_delete']}" - title="#{msg['course_members_delete_hint']}" - styleClass="icon_remove" /> - </plexus:column> - - </plexus:dataTable> - -</ui:composition> Copied: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participants.xhtml (from rev 4779, branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipants.xhtml) =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participants.xhtml (rev 0) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participants.xhtml 2008-10-07 13:18:36 UTC (rev 4817) @@ -0,0 +1,41 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:news="http://www.openuss.org/news/jsf" + xmlns:t="http://myfaces.apache.org/tomahawk" + xmlns:o="http://www.openuss.org/jsfcontrols" + xmlns:s="http://www.openuss.org/jsf-security" + xmlns:c="http://java.sun.com/jstl/core"> + + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title><ui:insert name="title"/></title> + <link href="../../css/openuss.css" rel="stylesheet" type="text/css" media="screen,screen" /> + <!-- css-Datei mit Farbdefinitionen der Rubrik --> + <link href="../../css/openuss-typo.css" rel="stylesheet" type="text/css" media="screen" /> + </head> + + <body> + <!-- text above will be ignored --> + <ui:composition template="/views/layout/layout.xhtml"> + <ui:define name="title"><h:outputText value="#{msg.course_main_title} - #{courseInfo.shortcut}"/></ui:define> + <ui:define name="navigation"> + <ui:include src="/views/commons/navigation/course.xhtml" /> + </ui:define> + <ui:define name="content"> + <!-- removed ACL tags --> + + <h:form id="participantsForm"> + <ui:include src="participantstable.xhtml" /> + </h:form> + </ui:define> + </ui:composition> + + <!-- text above will be ignored --> + + </body> +</html> Property changes on: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participants.xhtml ___________________________________________________________________ Added: svn:mergeinfo + Copied: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml (from rev 4779, branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/courseparticipantstable.xhtml) =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml (rev 0) +++ branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml 2008-10-07 13:18:36 UTC (rev 4817) @@ -0,0 +1,53 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:plexus="http://www.openuss.org/plexus/jsf" + xmlns:t="http://myfaces.apache.org/tomahawk" + xmlns:o="http://www.openuss.org/jsfcontrols" + xmlns:c="http://java.sun.com/jstl/core"> + + <plexus:dataTable + id="courseparticipants" + label="#{msg.institute_members_subheading}" + value="views$secured$course$participants.data" + columnClasses="col_max_left, col_max_left, col_max_left, col_max_left, col_commands" + var="member" + rows="20" + infoText="#{msg.table_info_text_users}"> + + <t:column> + <plexus:commandSortHeader columnName="username"> #{msg['user_username']} </plexus:commandSortHeader> + <h:outputText value="#{member.username}"/> + </t:column> + + <t:column> + <plexus:commandSortHeader columnName="firstName"> #{msg['user_firstname']}</plexus:commandSortHeader> + <h:outputText value="#{member.firstName}"/> + </t:column> + + <t:column> + <plexus:commandSortHeader columnName="lastName">#{msg['user_lastname']}</plexus:commandSortHeader> + <h:outputText value="#{member.lastName}"/> + </t:column> + + <t:column> + <plexus:commandSortHeader columnName="email">#{msg['user_email']}</plexus:commandSortHeader> + <h:outputText value="#{member.email}"/> + </t:column> + + <plexus:column header="#{msg.commands_header}"> + <plexus:linkProfileIcon user="#{member.userId}"/> + <plexus:command + bean="#{views$secured$course$participants}" + action="delete" + onclick="if (!confirm('#{msg.message_course_remove_member_confirmation} #{member.username}')) return false" + label="#{msg['course_members_delete']}" + title="#{msg['course_members_delete_hint']}" + styleClass="icon_remove" /> + </plexus:column> + + </plexus:dataTable> + +</ui:composition> Property changes on: branches/openuss-plexus-3.1/plexus/plexus-web/src/main/webapp/views/secured/course/participantstable.xhtml ___________________________________________________________________ Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-07 13:16:59
|
Revision: 4816 http://openuss.svn.sourceforge.net/openuss/?rev=4816&view=rev Author: idueppe Date: 2008-10-07 13:15:59 +0000 (Tue, 07 Oct 2008) Log Message: ----------- Add checks that all courses, coursetypes, and institutes are registered in security_objectidentifities Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/data/migration_30RC1_to_31.sql Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/main/data/migration_30RC1_to_31.sql =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/main/data/migration_30RC1_to_31.sql 2008-10-07 13:12:46 UTC (rev 4815) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/main/data/migration_30RC1_to_31.sql 2008-10-07 13:15:59 UTC (rev 4816) @@ -188,6 +188,8 @@ ALTER TABLE COURSES2GROUPS ADD CONSTRAINT LECTURE_COURSE_GROUPS_FKC FOREIGN KEY (GROUPS_FK) REFERENCES SECURITY_GROUP; ALTER TABLE COURSES2GROUPS ADD CONSTRAINT SECURITY_GROUP_COURSES_FKC FOREIGN KEY (COURSES_FK) REFERENCES LECTURE_COURSE; + + -- adding groups for all courses -- create procedure create_groups @@ -228,6 +230,38 @@ delete from security_permission where security_permission.mask = 1040 and security_permission.acl_object_identity_fk in (select id from lecture_course); + +-- Check that all courses has an object id that represens course -> course_type permission hierarchy +INSERT INTO security_object_identity (ID, PARENT_FK) +SELECT + i.id, null +FROM + lecture_institute i +WHERE + not exists + (SELECT o.id FROM security_object_identity o WHERE o.id = i.id); + +-- Check that all course_type has an object id that represens course_type -> institute permission hierarchy +INSERT INTO security_object_identity (ID, PARENT_FK) +SELECT + ct.id, ct.institute_fk +FROM + lecture_course_type ct +WHERE + not exists + (SELECT o.id FROM security_object_identity o WHERE o.id = ct.id); + +-- check that all courses has an object id that represens course -> course_type permission hierarchy +insert into security_object_identity (id, parent_fk) +select + c.id, c.course_type_fk +from + lecture_course c +where + not exists + (select o.id from security_object_identity o where o.id = c.id); + + -- add read permission to course to group -- create procedure add_coursegroup_permissions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-05 13:00:06
|
Revision: 4814 http://openuss.svn.sourceforge.net/openuss/?rev=4814&view=rev Author: idueppe Date: 2008-10-05 12:59:05 +0000 (Sun, 05 Oct 2008) Log Message: ----------- bug fixing - period test date was static and outdated Modified Paths: -------------- branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/TestUtility.java branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/lecture/UniversityServiceIntegrationTest.java branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/acegi/ldap/ConfigurableLdapAuthenticationProviderTest.java Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/TestUtility.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/TestUtility.java 2008-10-05 08:42:59 UTC (rev 4813) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/TestUtility.java 2008-10-05 12:59:05 UTC (rev 4814) @@ -81,27 +81,6 @@ private Institute defaultInstitute; - // /** - // * @deprecated As of OpenUSS 3.0 RC1, replaced by - // <code>TestUtility.createUniqueUserInDB()</code>. - // */ - // public User createDefaultUserInDB() { - // defaultUser.setUsername(unique(USERNAME)); - // defaultUser.setGroups(new ArrayList<Group>()); - // userDao.create(defaultUser); - // return defaultUser; - // } - - // /** - // * @deprecated As of OpenUSS 3.0 RC1, replaced by - // <code>TestUtility.createUniqueUserInDB()</code>. - // */ - // public User createUserInDB() { - // User user = createDefaultUser(); - // userDao.create(user); - // return user; - // } - public void removeDefaultUser() { removeUser(defaultUser); } @@ -115,29 +94,6 @@ userDao.remove(user); } - // /** - // * @deprecated As of OpenUSS 3.0 RC1, replaced by - // <code>TestUtility.createUniqueInstituteInDB()</code>. - // */ - // public Institute createPersistInstituteWithDefaultUser() { - // defaultUser.setUsername(unique(USERNAME)); - // defaultUser.setFirstName("firstName"); - // defaultUser.setLastName("lastName"); - // defaultUser.setTitle("title"); - // defaultUser.setEmail(unique("email")); - // defaultUser.setLocale("de_DE"); - // - // userDao.create(defaultUser); - // defaultInstitute.setName(unique("name")); - // defaultInstitute.setShortcut(unique("shortcut")); - // defaultInstitute.setEmail(unique("email")); - // defaultInstitute.setLocale("de_DE"); - // defaultInstitute.setOwnerName("owner name"); - // defaultInstitute.setMembership(Membership.Factory.newInstance()); - // instituteDao.create(defaultInstitute); - // return defaultInstitute; - // } - public User createUniqueUserInDB() { User user = createUniqueUser(); userDao.create(user); @@ -491,7 +447,7 @@ // Create a unique CourseType and Period CourseType courseType = this.createUniqueCourseTypeInDB(); - Period period = this.createUniquePeriodInDB(courseType.getInstitute().getDepartment().getUniversity()); + Period period = this.createUniqueActivePeriodInDB(courseType.getInstitute().getDepartment().getUniversity()); // Create a unique CourseType Course course = Course.Factory.newInstance(); @@ -522,48 +478,18 @@ return course; } - public Period createUniquePeriodInDB(University university) { - + public Period createUniqueActivePeriodInDB(University university) { // Create Startdate - Calendar cal = new GregorianCalendar(); - cal.set(2007, 3, 1); - Date startdate = new Date(cal.getTimeInMillis()); - + Date startdate = new Date(System.currentTimeMillis() - 1000*60*60*24*60); // Create Enddate - cal = new GregorianCalendar(); - cal.set(2008, 8, 31); - Date enddate = new Date(cal.getTimeInMillis()); + Date enddate = new Date(System.currentTimeMillis() + 1000*60*60*24*60); - // Create a unique Period - Period period = Period.Factory.newInstance(); - period.setName(unique("Period")); - period.setDescription("A unique Period"); - period.setCourses(new ArrayList<Course>()); - period.setStartdate(startdate); - period.setEnddate(enddate); - period.setDefaultPeriod(false); - university.add(period); + Period period = associatePeriodToUniversity(university, startdate, enddate); - periodDao.create(period); - this.getSecurityService().createObjectIdentity(period, university); - return period; } - public Period createUniquePeriodInDB() { - // Create University - University university = this.createUniqueUniversityInDB(); - - // Create Startdate - Calendar cal = new GregorianCalendar(); - cal.set(2007, 3, 1); - Date startdate = new Date(cal.getTimeInMillis()); - - // Create Enddate - cal = new GregorianCalendar(); - cal.set(2008, 8, 31); - Date enddate = new Date(cal.getTimeInMillis()); - + private Period associatePeriodToUniversity(University university, Date startdate, Date enddate) { // Create a unique Period Period period = Period.Factory.newInstance(); period.setName(unique("Period")); @@ -580,32 +506,20 @@ return period; } + public Period createUniquePeriodInDB() { + return createUniqueActivePeriodInDB(this.createUniqueUniversityInDB()); + } + public Period createUniqueInactivePeriodInDB() { // Create a unique University University university = this.createUniqueUniversityInDB(); - // Create Startdate - Calendar cal = new GregorianCalendar(); - cal.set(2005, 3, 1); - Date startdate = new Date(cal.getTimeInMillis()); - + Date startdate = new Date(System.currentTimeMillis() - 1000*60*60*24*120); // Create Enddate - cal = new GregorianCalendar(); - cal.set(2006, 8, 31); - Date enddate = new Date(cal.getTimeInMillis()); + Date enddate = new Date(System.currentTimeMillis() - 1000*60*60*24*2); - // Create a unique Period - Period period = Period.Factory.newInstance(); - period.setName(unique("Period")); - period.setDescription("A unique Period"); - period.setCourses(new ArrayList<Course>()); - period.setStartdate(startdate); - period.setEnddate(enddate); - period.setDefaultPeriod(false); - university.add(period); + Period period = associatePeriodToUniversity(university, startdate, enddate); - periodDao.create(period); - return period; } @@ -633,19 +547,6 @@ // userDao.remove(defaultInstitute.getOwner()); } - // /** - // * @deprecated As of OpenUSS 3.0 RC1, replaced by - // <code>TestUtility.createUniqueInstituteInDB()</code>. - // */ - // public Institute createdDefaultInstituteWithStoredUser() { - // defaultUser.setUsername(unique(USERNAME)); - // userDao.create(defaultUser); - // defaultInstitute.setName(unique("name")); - // defaultInstitute.setShortcut(unique("shortcut")); - // instituteDao.create(defaultInstitute); - // return defaultInstitute; - // } - public User createAnonymousSecureContext() { return createSecureContext(Roles.ANONYMOUS_ID); } @@ -689,24 +590,6 @@ return user; } - // /** - // * @deprecated As of OpenUSS 3.0 RC1, replaced by - // <code>TestUtility.createUniqueUser()</code>. - // */ - // public User createDefaultUser() { - // User user = User.Factory.newInstance(); - // user.setUsername(unique(USERNAME)); - // user.setFirstName("firstName"); - // user.setLastName("lastName"); - // user.setPassword("password"); - // user.setEmail(unique("email")); - // user.setEnabled(true); - // user.setAccountExpired(true); - // user.setCredentialsExpired(true); - // user.setAccountLocked(true); - // return user; - // } - private static volatile long uniqueId = System.currentTimeMillis(); public static synchronized long unique() { Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/lecture/UniversityServiceIntegrationTest.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/lecture/UniversityServiceIntegrationTest.java 2008-10-05 08:42:59 UTC (rev 4813) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/lecture/UniversityServiceIntegrationTest.java 2008-10-05 12:59:05 UTC (rev 4814) @@ -240,7 +240,7 @@ // Create a Period University universityTest = testUtility.createUniqueUniversityInDB(); - Period period = testUtility.createUniquePeriodInDB(universityTest); + Period period = testUtility.createUniqueActivePeriodInDB(universityTest); assertNotNull(period.getId()); // Get University @@ -286,7 +286,7 @@ // Create a Period University universityTest = testUtility.createUniqueUniversityInDB(); - Period period = testUtility.createUniquePeriodInDB(universityTest); + Period period = testUtility.createUniqueActivePeriodInDB(universityTest); assertNotNull(period.getId()); // Save UniversityID @@ -332,7 +332,7 @@ // Create a Period University universityTest = testUtility.createUniqueUniversityInDB(); - Period period = testUtility.createUniquePeriodInDB(universityTest); + Period period = testUtility.createUniqueActivePeriodInDB(universityTest); assertNotNull(period.getId()); // Synchronize with Database @@ -346,7 +346,6 @@ logger.info("----> END access to findPeriod test"); } - @SuppressWarnings( { "unchecked" }) public void testFindAllUniversities() { logger.info("----> BEGIN access to findAllUniversities test"); @@ -388,7 +387,6 @@ logger.info("----> END access to findAllUniversities test"); } - @SuppressWarnings( { "unchecked" }) public void testFindPeriodsByUniversity() { logger.info("----> BEGIN access to findPeriodsByUniversity test"); @@ -399,9 +397,9 @@ int sizeBefore = university.getPeriods().size(); // Create Periods with university - Period period1 = testUtility.createUniquePeriodInDB(university); + Period period1 = testUtility.createUniqueActivePeriodInDB(university); - Period period2 = testUtility.createUniquePeriodInDB(university); + Period period2 = testUtility.createUniqueActivePeriodInDB(university); Period period3 = testUtility.createUniqueInactivePeriodInDB(); period3.setUniversity(university); @@ -420,7 +418,6 @@ logger.info("----> END access to findPeriodsByUniversity test"); } - @SuppressWarnings( { "unchecked" }) public void testFindPeriodsByUniversityAndActivation() { logger.info("----> BEGIN access to findActivePeriodByUniversity test"); @@ -439,9 +436,9 @@ int passiveSizeBefore = passivePeriods.size(); // Create Periods with university - Period period1 = testUtility.createUniquePeriodInDB(university); + Period period1 = testUtility.createUniqueActivePeriodInDB(university); - Period period2 = testUtility.createUniquePeriodInDB(university); + Period period2 = testUtility.createUniqueActivePeriodInDB(university); Period period3 = testUtility.createUniqueInactivePeriodInDB(); period3.setUniversity(university); @@ -453,20 +450,17 @@ periodDao.update(period3); // Test - List<PeriodInfo> periodInfos = this.getUniversityService(). - findPeriodsByUniversityAndActivation(university.getId(), true); + List<PeriodInfo> periodInfos = this.getUniversityService().findPeriodsByUniversityAndActivation(university.getId(), true); assertNotNull(periodInfos); assertEquals(sizeBefore+2, periodInfos.size()); - periodInfos = this.getUniversityService(). - findPeriodsByUniversityAndActivation(university.getId(), false); + periodInfos = this.getUniversityService().findPeriodsByUniversityAndActivation(university.getId(), false); assertNotNull(periodInfos); assertEquals(passiveSizeBefore+1, periodInfos.size()); logger.info("----> END access to findActivePeriodByUniversity test"); } - @SuppressWarnings( { "unchecked" }) public void testFindUniversitiesByUserAndEnabled() { logger.info("----> BEGIN access to findUniversitiesByUser test"); @@ -496,7 +490,6 @@ logger.info("----> END access to findUniversitiesByUser test"); } - @SuppressWarnings( { "unchecked" }) public void testFindUniversitiesByTypeAndEnabled() { logger.info("----> BEGIN access to findUniversitiesByType test"); @@ -723,10 +716,10 @@ University university2 = testUtility.createUniqueUniversityInDB(); // Create Periods - testUtility.createUniquePeriodInDB(university1); + testUtility.createUniqueActivePeriodInDB(university1); assertEquals(2, university1.getPeriods().size()); - testUtility.createUniquePeriodInDB(university2); + testUtility.createUniqueActivePeriodInDB(university2); assertEquals(2, university2.getPeriods().size()); // Create Departments @@ -781,14 +774,14 @@ testUtility.createUniqueUniversityInDB(); // Create Periods - testUtility.createUniquePeriodInDB(university1); + testUtility.createUniqueActivePeriodInDB(university1); assertEquals(2, university1.getPeriods().size()); Period period2 = testUtility.createUniqueInactivePeriodInDB(); university1.add(period2); assertEquals(3, university1.getPeriods().size()); - testUtility.createUniquePeriodInDB(university1); + testUtility.createUniqueActivePeriodInDB(university1); assertEquals(4, university1.getPeriods().size()); // Create Departments Modified: branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/acegi/ldap/ConfigurableLdapAuthenticationProviderTest.java =================================================================== --- branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/acegi/ldap/ConfigurableLdapAuthenticationProviderTest.java 2008-10-05 08:42:59 UTC (rev 4813) +++ branches/openuss-plexus-3.1/plexus/plexus-core/src/test/java/org/openuss/security/acegi/ldap/ConfigurableLdapAuthenticationProviderTest.java 2008-10-05 12:59:05 UTC (rev 4814) @@ -8,11 +8,13 @@ import java.util.List; import java.util.Vector; +import javax.naming.CommunicationException; import javax.naming.NamingException; import junit.framework.TestCase; import org.acegisecurity.Authentication; +import org.acegisecurity.AuthenticationServiceException; import org.acegisecurity.BadCredentialsException; import org.acegisecurity.GrantedAuthority; import org.acegisecurity.providers.ProviderNotFoundException; @@ -27,6 +29,7 @@ import org.openuss.security.ldap.LdapServerType; import org.springframework.context.MessageSource; import org.springframework.context.support.StaticMessageSource; +import org.springframework.dao.DataAccessException; /** * Tests <code>ConfigurableLdapAuthenticationProvider</code> class. @@ -345,6 +348,7 @@ ldapAuthenticationProvider.setUserCache(userCache); try { ldapAuthenticationProvider.init(); + } catch (Exception e) { fail(); } @@ -506,6 +510,9 @@ ldapAuthenticationProvider.setUserCache(userCache); try { ldapAuthenticationProvider.init(); + } catch (javax.naming.CommunicationException e) { + // no ldap server available + return; } catch (Exception e) { fail(); } @@ -516,6 +523,12 @@ try { ldapAuthenticationProvider.authenticate(authRequest); fail(); + } catch (AuthenticationServiceException e) { + if (!(e.getCause().getCause() instanceof CommunicationException)) { + fail(e.getCause().getCause().getMessage()); + } else { + return; // Ldap not available! + } } catch (BadCredentialsException be) { // Success } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <id...@us...> - 2008-10-05 08:46:34
|
Revision: 4812 http://openuss.svn.sourceforge.net/openuss/?rev=4812&view=rev Author: idueppe Date: 2008-10-05 08:42:14 +0000 (Sun, 05 Oct 2008) Log Message: ----------- code polishing Modified Paths: -------------- branches/openuss-plexus-3.1/framework/jsfcontrols/src/main/java/org/openuss/framework/jsfcontrols/components/flexlist/CourseUIFlexList.java branches/openuss-plexus-3.1/framework/jsfcontrols/src/main/java/org/openuss/framework/jsfcontrols/components/flexlist/UIFlexList.java Modified: branches/openuss-plexus-3.1/framework/jsfcontrols/src/main/java/org/openuss/framework/jsfcontrols/components/flexlist/CourseUIFlexList.java =================================================================== --- branches/openuss-plexus-3.1/framework/jsfcontrols/src/main/java/org/openuss/framework/jsfcontrols/components/flexlist/CourseUIFlexList.java 2008-10-05 08:25:10 UTC (rev 4811) +++ branches/openuss-plexus-3.1/framework/jsfcontrols/src/main/java/org/openuss/framework/jsfcontrols/components/flexlist/CourseUIFlexList.java 2008-10-05 08:42:14 UTC (rev 4812) @@ -3,6 +3,7 @@ import java.io.IOException; public class CourseUIFlexList extends UIFlexList { + protected void writeFlexListItemRight(ListItemDAO listItem) throws IOException { writer.startElement("div", this); writer.writeAttribute("class", "flexListItemRight", null); @@ -22,15 +23,13 @@ String cssClass; if (subscribed == null) { cssClass = "newsletter_none"; - } - else { + } else { cssClass = (subscribed) ? "newsletter_subscribed" : "newsletter_notSubscribed"; } String title; if (subscribed == null) { title = bundle.getString("flexlist_title_newsletter_none"); - } - else { + } else { title = (subscribed) ? bundle.getString("flexlist_title_newsletter_unsubscribe") : bundle.getString("flexlist_title_newsletter_subscribe"); } if (subscribed == null) { @@ -41,8 +40,7 @@ writer.writeAttribute("title", title, null); writer.endElement("span"); writer.endElement("span"); - } - else { + } else { writer.startElement("a", this); writer.writeAttribute("href", url, null); @@ -59,14 +57,12 @@ url = listItem.getForumActionUrl(); if (subscribed == null) { cssClass = "forum_none"; - } - else { + } else { cssClass = (subscribed) ? "forum_subscribed" : "forum_notSubscribed"; } if (subscribed == null) { title = bundle.getString("flexlist_title_forum_none"); - } - else { + } else { title = (subscribed) ? bundle.getString("flexlist_title_forum_unsubscribe") : bundle.getString("flexlist_title_forum_subscribe"); } if (subscribed == null) { @@ -77,8 +73,7 @@ writer.writeAttribute("title", title, null); writer.endElement("span"); writer.endElement("span"); - } - else { + } else { writer.startElement("a", this); writer.writeAttribute("href", url, null); writer.writeAttribute("class", cssClass, null); @@ -92,8 +87,8 @@ // Show the "remove bookmark link" if the url is set String removeBookmarkUrl = listItem.getRemoveBookmarkUrl(); title = bundle.getString("flexlist_title_removeBookmarkUrl"); - if(removeBookmarkUrl != null && removeBookmarkUrl != "") - { + + if(removeBookmarkUrl != null && removeBookmarkUrl != "") { writer.startElement("a", this); writer.writeAttribute("href", removeBookmarkUrl, null); Modified: branches/openuss-plexus-3.1/framework/jsfcontrols/src/main/java/org/openuss/framework/jsfcontrols/components/flexlist/UIFlexList.java =================================================================== --- branches/openuss-plexus-3.1/framework/jsfcontrols/src/main/java/org/openuss/framework/jsfcontrols/components/flexlist/UIFlexList.java 2008-10-05 08:25:10 UTC (rev 4811) +++ branches/openuss-plexus-3.1/framework/jsfcontrols/src/main/java/org/openuss/framework/jsfcontrols/components/flexlist/UIFlexList.java 2008-10-05 08:42:14 UTC (rev 4812) @@ -15,7 +15,7 @@ protected ResponseWriter writer; protected ResourceBundle bundle; - protected boolean expanded; //if expanded="false" dont expand the list + protected boolean expanded; //if expanded="false" don't expand the list protected String styleClass; public void encodeBegin(FacesContext context) throws IOException { @@ -25,14 +25,18 @@ bundle = ResourceBundle.getBundle("resources", new Locale(locale)); String expandedAttribute = (String)getAttributes().get("expanded"); - if (expandedAttribute == "true" || expandedAttribute == null) this.expanded = true; - else this.expanded = false; + if (expandedAttribute == "true" || expandedAttribute == null) { + this.expanded = true; + } else { + this.expanded = false; + } String styleClass = (String)getAttributes().get("styleClass"); - if(styleClass!="") + if(styleClass!="") { styleClass = " " + styleClass; - else + } else { styleClass = ""; + } writer.startElement("div", this); writer.writeAttribute("class", "flexList" + styleClass, null); @@ -60,7 +64,7 @@ writer.endElement("div"); writer.startElement("a", this); - writer.writeAttribute("href", "javascript:void(0)", null); + writer.writeAttribute("href", "javascript:void(0);", null); String javascript = "" + "Element.toggle('flexlist_arrow_expanded" + this.getId() + "'); " + "Element.toggle('flexlist_arrow_collapsed" + this.getId() + "'); " + @@ -101,12 +105,9 @@ writer.writeAttribute("class", "flexListItems", null); ArrayList<ListItemDAO> visibleItems = (ArrayList<ListItemDAO>)(getAttributes().get("visibleItems")); - if(visibleItems == null || visibleItems.isEmpty()) - { + if(visibleItems == null || visibleItems.isEmpty()) { writeEmptyItems(); - } - else - { + } else { writeListItems(visibleItems); } writer.endElement("ul"); @@ -114,8 +115,7 @@ // Render list of hidden items ArrayList<ListItemDAO> hiddenItems = (ArrayList<ListItemDAO>)getAttributes().get("hiddenItems"); - if(hiddenItems != null && !hiddenItems.isEmpty()) - { + if(hiddenItems != null && !hiddenItems.isEmpty()) { writer.startElement("ul", this); writer.writeAttribute("class", "flexListItems", null); writer.writeAttribute("id", "hidden_items" + this.getId(), null); @@ -127,7 +127,6 @@ // Render the list footer containing the buttons for showing and hiding the hidden items writeFooter(); } - writer.endElement("div"); } @@ -151,7 +150,6 @@ writer.startElement("li", this); // Render the "meta info" on the right side of the list writeFlexListItemRight(listItem); - // Render the left side of the item writeFlexListItemLeft(listItem); writer.endElement("li"); @@ -163,18 +161,14 @@ writer.startElement("div", this); writer.writeAttribute("class", "flexListItemLeft", null); - if(title != null) - { + if(title != null) { // If the url is set, render an a tag, otherwise just plain text - if(url != null) - { + if(url != null) { writer.startElement("a", this); writer.writeAttribute("href", url, null); writer.write(title); writer.endElement("a"); - } - else - { + } else { writer.write(title); } } @@ -193,8 +187,7 @@ String removeBookmarkUrl = listItem.getRemoveBookmarkUrl(); String title; title = bundle.getString("flexlist_title_removeBookmarkUrl"); - if(removeBookmarkUrl != null && removeBookmarkUrl != "") - { + if(removeBookmarkUrl != null && removeBookmarkUrl != "") { writer.startElement("a", this); writer.writeAttribute("href", removeBookmarkUrl, null); @@ -208,6 +201,7 @@ writer.endElement("div"); } + private void writeFooter() throws IOException { writer.startElement("ul", this); writer.writeAttribute("class", "flexListBottom", null); @@ -232,10 +226,11 @@ writer.writeAttribute("id", "show_hidden_items" + this.getId(), null); String showButtonTitle = (String)getAttributes().get("showButtonTitle"); - if(showButtonTitle != null) + if(showButtonTitle != null) { writer.write( showButtonTitle ); - else + } else { writer.write(bundle.getString("flexlist_more_items")); + } writer.endElement("span"); writer.startElement("span", this); @@ -243,10 +238,11 @@ writer.writeAttribute("style", "display:none;", null); String hideButtonTitle = (String)getAttributes().get("hideButtonTitle"); - if(hideButtonTitle != null) + if(hideButtonTitle != null) { writer.write( hideButtonTitle ); - else + } else { writer.write(bundle.getString("flexlist_less_items")); + } writer.endElement("span"); writer.endElement("a"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |