You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(233) |
Sep
(199) |
Oct
(206) |
Nov
(185) |
Dec
(270) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(232) |
Feb
(426) |
Mar
(623) |
Apr
(592) |
May
(506) |
Jun
(389) |
Jul
(160) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
2007 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(9) |
Nov
(6) |
Dec
(6) |
2008 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(2) |
Sep
(12) |
Oct
(10) |
Nov
(54) |
Dec
(49) |
2009 |
Jan
(19) |
Feb
(13) |
Mar
(20) |
Apr
(24) |
May
(44) |
Jun
(29) |
Jul
(32) |
Aug
(10) |
Sep
(7) |
Oct
(10) |
Nov
(4) |
Dec
(17) |
2010 |
Jan
(14) |
Feb
(5) |
Mar
(23) |
Apr
(50) |
May
(31) |
Jun
(9) |
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(12) |
Feb
(5) |
Mar
(5) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Author: szimano Date: 2006-05-16 15:39:21 -0400 (Tue, 16 May 2006) New Revision: 4253 Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java Log: JBWIKI-87 removed some rubbish from log Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java 2006-05-16 19:32:03 UTC (rev 4252) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java 2006-05-16 19:39:21 UTC (rev 4253) @@ -70,7 +70,7 @@ && wikiSession.getAttribute("var2").equals("toggle")) { // toggle page watch/unwatch - log.info("Adding user: " + cred.getName() + log.debug("Adding user: " + cred.getName() + " to watchlist for page: " + wikiPage.getName()); notifications = toggleWatch(users, cred.getName(), cred @@ -85,7 +85,7 @@ && wikiSession.getAttribute("var2").equals("toggle")) { // toggle global page watch/unwatch - log.info("Adding user: " + cred.getName() + log.debug("Adding user: " + cred.getName() + " to watchlist for page: " + wikiPage.getName()); notificationsGlobal = toggleWatch(usersGlobal, cred.getName(), Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java 2006-05-16 19:32:03 UTC (rev 4252) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java 2006-05-16 19:39:21 UTC (rev 4253) @@ -48,7 +48,7 @@ public void onMessage(Message msg) { - log.info("Mail"); + log.debug("Mail"); try { @@ -64,10 +64,10 @@ NotificationMsg notifications = (NotificationMsg) omsg .getObject(); - log.info("Got email notification msg"); + log.debug("Got email notification msg"); for (String email : notifications.getEmails()) { - log.info("MDB for: " + email); + log.debug("MDB for: " + email); StringBuffer buffer = null; Address[] to = null; |
From: <jbo...@li...> - 2006-05-16 19:32:06
|
Author: szimano Date: 2006-05-16 15:32:03 -0400 (Tue, 16 May 2006) New Revision: 4252 Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java Log: unique name for mdb JBWIKI-87 Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java 2006-05-16 19:31:20 UTC (rev 4251) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java 2006-05-16 19:32:03 UTC (rev 4252) @@ -41,7 +41,7 @@ public @MessageDriven(activateConfig = { @javax.ejb.ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), - @javax.ejb.ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/mdb") }) + @javax.ejb.ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/wikiNotifications") }) class MailNotificationBean implements MessageListener { private Logger log = Logger.getLogger(this.getClass()); |
From: <jbo...@li...> - 2006-05-16 19:31:36
|
Author: soh...@jb... Date: 2006-05-16 15:31:20 -0400 (Tue, 16 May 2006) New Revision: 4251 Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/index.xhtml Log: http://jira.jboss.com/jira/browse/JBFORUMS-56 - Create a Forum Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java 2006-05-16 19:17:15 UTC (rev 4250) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java 2006-05-16 19:31:20 UTC (rev 4251) @@ -23,6 +23,8 @@ import org.jboss.portlet.forums.ui.*; +import org.jboss.portlet.forums.model.Category; +import org.jboss.portlet.forums.model.Forum; import org.jboss.portlet.forums.model.Topic; import org.jboss.portlet.forums.model.Poll; import org.jboss.portlet.forums.model.PollOption; @@ -37,26 +39,61 @@ public class AdminController extends ActionController { /** - * + * ui data associated with "Category" information * */ - private String newCategory = null; //this is populated when a new category is to be created + private String categoryName = null; + /** + * ui data associated with "Forum" information + * + */ + private String forumName = null; + private String forumDescription = null; + //-----ui data------------------------------------------------------------------------------------------------------------------------- /** - * @return Returns the newCategory. + * @return Returns the categoryName. */ - public String getNewCategory() + public String getCategoryName() { - return newCategory; + return categoryName; } /** - * @param newCategory The newCategory to set. + * @param categoryName The categoryName to set. */ - public void setNewCategory(String newCategory) + public void setCategoryName(String categoryName) { - this.newCategory = newCategory; + this.categoryName = categoryName; } + /** + * @return Returns the forumDescription. + */ + public String getForumDescription() + { + return forumDescription; + } + /** + * @param forumDescription The forumDescription to set. + */ + public void setForumDescription(String forumDescription) + { + this.forumDescription = forumDescription; + } + /** + * @return Returns the forumName. + */ + public String getForumName() + { + return forumName; + } + /** + * @param forumName The forumName to set. + */ + public void setForumName(String forumName) + { + this.forumName = forumName; + } //------------------------------------------------------------------------------------------------------------------------------------- /** * @@ -77,8 +114,8 @@ boolean success = false; try { - BaseController.getForumsModule().createCategory(this.newCategory); - JSFUtil.setMessage(Constants.FEEDBACK,"The Category \""+this.newCategory+"\" was successfully created."); + BaseController.getForumsModule().createCategory(this.categoryName); + JSFUtil.setMessage(Constants.FEEDBACK,"The Category \""+this.categoryName+"\" was successfully created."); success = true; } catch(Exception e) @@ -90,9 +127,50 @@ if(success) { //cleanup the state - this.newCategory = null; + this.categoryName = null; } } return navState; - } + } + + /** + * adds a new forum + * + */ + public String addForum() + { + String navState = null; + boolean success = false; + try + { + //get the categoryId where this forum should be added + int categoryId = -1; + String cour = ForumUtil.getParameter(Constants.p_categoryId); + if(cour!=null && cour.trim().length()>0) + { + categoryId = Integer.parseInt(cour); + } + + //add this new forum to the category + Category category = BaseController.getForumsModule().findCategoryById(new Integer(categoryId)); + BaseController.getForumsModule().createForum(category,this.forumName,this.forumDescription); + + JSFUtil.setMessage(Constants.FEEDBACK,"The Forum \""+this.forumName+"\" was successfully created."); + success = true; + } + catch(Exception e) + { + JSFUtil.handleException(e); + } + finally + { + if(success) + { + //cleanup the state + this.forumName = null; + this.forumDescription = null; + } + } + return navState; + } } Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/index.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/index.xhtml 2006-05-16 19:17:15 UTC (rev 4250) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/index.xhtml 2006-05-16 19:31:20 UTC (rev 4251) @@ -41,7 +41,6 @@ <p>${resource.Forum_admin_explain}</p> <!-- Forum admin widget with the list of category and forums in each category --> - <h:form> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th class="thHead" colspan="7">${resource.Forum_admin}</th> @@ -114,13 +113,16 @@ </td> </tr> </c:forEach> - <!-- create new forum widget for each category --> + <!-- create new forum widget for each category --> + <h:form> <tr> <td colspan="7" class="row2"> - <input class="post" type="text" name="forumname_1"/> - <input type="submit" class="liteoption" name="addforum_1" value="${resource.Create_forum}"/> + <input type="hidden" name="c" value="#{category.id}"/> + <h:inputText styleClass="post" value="#{adminController.forumName}" required="true"/> + <h:commandButton styleClass="liteoption" value="${resource.Create_forum}" action="#{adminController.addForum}"/> </td> </tr> + </h:form> <tr> <td colspan="7" height="1" class="spaceRow"> <img src="/subSilver/images/spacer.gif" alt="" width="1" height="1"/> @@ -129,15 +131,16 @@ </c:forEach> <!-- Add new category widget --> + <h:form> <tr> <td colspan="7" class="catBottom"> - <h:inputText id="Category" styleClass="post" value="#{adminController.newCategory}" required="true"/> + <h:inputText id="Category" styleClass="post" value="#{adminController.categoryName}" required="true"/> <h:commandButton styleClass="liteoption" value="${resource.Create_category}" action="#{adminController.addCategory}"/> &nbsp;<h:message for="Category" style="color:red" styleClass="liteoption"/>&nbsp; </td> - </tr> - </table> - </h:form> + </tr> + </h:form> + </table> <!-- integrate the jump box --> <table cellspacing="0" cellpadding="0" border="0" align="right"> |
From: <jbo...@li...> - 2006-05-16 19:17:28
|
Author: szimano Date: 2006-05-16 15:17:15 -0400 (Tue, 16 May 2006) New Revision: 4250 Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/org/jboss/wiki/wikiPlugins.properties labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/FileMediaDataSource.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/MediaDataSource.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuMediaDataSource.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiCommon.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiEngine.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/management/NotificationMsg.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/SendNotificationPlugin.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java Log: JBWIKI-87 global watching and finishing Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/org/jboss/wiki/wikiPlugins.properties =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/org/jboss/wiki/wikiPlugins.properties 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/org/jboss/wiki/wikiPlugins.properties 2006-05-16 19:17:15 UTC (rev 4250) @@ -8,3 +8,4 @@ wikiHome = /portal/index.html?ctrl:cmd=action&ctrl:window=default.wiki.WikiPortletWindow #number of days that should be included in recent changes plugin recentDays = 30 +notification.fromEmail = do-...@la... Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/FileMediaDataSource.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/FileMediaDataSource.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/FileMediaDataSource.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -58,6 +58,8 @@ private final static String OTHER_LANG_DIR = "LANG/"; + private String GLOBAL_PROPS = "global.properties"; + private final static String LANG_FILE = "languages.properties"; public static final String propFileName = "filedatasource.properties"; @@ -77,6 +79,8 @@ private Logger log; private String langCode = null; + + private Properties globalProps; public void setWikiEngine(WikiEngine wikiEngine) { this.wikiEngine = wikiEngine; @@ -955,4 +959,60 @@ return langCode; } + private void refreshGlobalProps() throws IOException { + if (globalProps == null) { + globalProps = new Properties(); + } + File f = new File(pathToMedia + "/" + GLOBAL_PROPS); + + if (!f.exists()) { + f.createNewFile(); + } + + FileInputStream fis = new FileInputStream(f); + + globalProps.load(fis); + + fis.close(); + } + + public synchronized void setGlobalProperty(String key, String value) throws DataSourceException { + try { + refreshGlobalProps(); + + globalProps.setProperty(key, value); + + saveGlobalProps(); + } catch (IOException e) { + throw new DataSourceException(e); + } + } + + private void saveGlobalProps() throws IOException { + if (globalProps == null) { + globalProps = new Properties(); + } + File f = new File(pathToMedia + "/" + GLOBAL_PROPS); + + if (!f.exists()) { + f.createNewFile(); + } + + FileOutputStream fos = new FileOutputStream(f); + + globalProps.store(fos, SAVE_COMMENT); + + fos.close(); + } + + public synchronized String getGlobalProperty(String key) throws DataSourceException{ + try { + refreshGlobalProps(); + + return globalProps.getProperty(key); + } catch (IOException e) { + throw new DataSourceException(e); + } + } + } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/MediaDataSource.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/MediaDataSource.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/MediaDataSource.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -37,7 +37,7 @@ public final static int EDITABLE = 100; public final static int VIEWABLE = 1; - + public static String mediaTrashName = "trash/pages"; /** @@ -56,7 +56,8 @@ * * @param page * Page to save (with changed version number, author and content) - * @param uid Page's uid + * @param uid + * Page's uid * @return true if page was succesfully saved */ public void savePage(String uid, WikiPage page) throws WikiSaveException; @@ -106,8 +107,8 @@ * @return Desired wiki page or null if it doesn't exists. Page will be * loaded with content or not due to loadContent. */ - public WikiPage getPageAtVersion(WikiPage originPage, String uid, boolean loadContent, - int version); + public WikiPage getPageAtVersion(WikiPage originPage, String uid, + boolean loadContent, int version); /** * Checks if given page exists. @@ -128,8 +129,8 @@ * @param version * Version of the page to load. */ - public void getContentAtVersion(WikiPage page, String uid, boolean loadContent, - int version); + public void getContentAtVersion(WikiPage page, String uid, + boolean loadContent, int version); /** * Gets all page names. @@ -157,62 +158,111 @@ */ public int getPageMod(String pageName); - /**Set right for a page. + /** + * Set right for a page. * - * @param pageName Name of the page to set right for. - * @param mods Sum of apropriate static variables EDITABLE and VIEWABLE + * @param pageName + * Name of the page to set right for. + * @param mods + * Sum of apropriate static variables EDITABLE and VIEWABLE */ public void setPageMod(String pageName, int mods); - - - - /**Deletes (or moves to trash) given page + + /** + * Deletes (or moves to trash) given page * - * @param pageName Name of the page to delete. + * @param pageName + * Name of the page to delete. */ public boolean deletePage(String pageName); - - /**Sets wikiEngine reference + + /** + * Sets wikiEngine reference + * * @param wikiEngine */ public void setWikiEngine(WikiEngine wikiEngine); - - /**Saves roles for given page. - * @param uid Page uid to save roles to - * @param roles Roles to save - * @param action can be MediaDataSource.EDITABLE or MediaDataSource.VIEWABLE + + /** + * Saves roles for given page. + * + * @param uid + * Page uid to save roles to + * @param roles + * Roles to save + * @param action + * can be MediaDataSource.EDITABLE or MediaDataSource.VIEWABLE */ - public void saveRolesSet(String uid, Set<String> roles, int action) throws DataSourceException; - - /**Save metadata properties for given page. - * @param uid Page uid to save properties to. + public void saveRolesSet(String uid, Set<String> roles, int action) + throws DataSourceException; + + /** + * Save metadata properties for given page. + * + * @param uid + * Page uid to save properties to. */ public void saveMetadataProps(String uid, Properties props); - - /**Gets metadata properties for given page. - * @param uid Page uid to get properties for. - * @return + + /** + * Gets metadata properties for given page. + * + * @param uid + * Page uid to get properties for. + * @return */ public Properties getMetadataProps(String uid); - - /**Set language code for current dataSource. - * @param langCode code of the language + + /** + * Set language code for current dataSource. + * + * @param langCode + * code of the language */ public void setLanguageCode(String langCode); - - /**Gets all available languages in this wiki. This should be only called to default DataSource + + /** + * Gets all available languages in this wiki. This should be only called to + * default DataSource + * * @return Map of sorted language two-letter codes and their descriptions */ public Map<String, String> getAvailableLanguages(); - - /**Adds langCode (to descriptor). This should be only called to default DataSource - * @param langCode Two-letter language code - * @param langDesc Language description + + /** + * Adds langCode (to descriptor). This should be only called to default + * DataSource + * + * @param langCode + * Two-letter language code + * @param langDesc + * Language description */ public void addLangCode(String langCode, String langDesc); - - /**Get's language code from this datasource + + /** + * Get's language code from this datasource + * * @return two-letter language code */ public String getLangCode(); + + /** + * Sets global property + * + * @param key + * Key + * @param value + * Value + */ + public void setGlobalProperty(String key, String value) throws DataSourceException; + + /** + * Gets global property + * + * @param key + * Key + * @return Value + */ + public String getGlobalProperty(String key) throws DataSourceException; } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuMediaDataSource.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuMediaDataSource.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/ShotokuMediaDataSource.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -671,4 +671,14 @@ } } + + public void setGlobalProperty(String key, String value) throws DataSourceException { + // TODO Auto-generated method stub + + } + + public String getGlobalProperty(String key) throws DataSourceException { + // TODO Auto-generated method stub + return null; + } } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiCommon.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiCommon.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiCommon.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -42,6 +42,12 @@ import org.jboss.wiki.plugins.DifferenceEngine; import org.jboss.wiki.plugins.WatchListPlugin; +/** + * Commons class + * + * @author <a href="mailto:tom...@jb...">Tomasz Szymanski</a> + * + */ public class WikiCommon { public static final String wikiButtons = "!WikiButtons"; @@ -67,7 +73,7 @@ } public static void sendNotificationMail(WikiPage page, - WikiSession wikiSession, WikiEngine engine) { + WikiSession wikiSession, WikiEngine engine, String fromEmail) { try { InitialContext context = new InitialContext(); @@ -85,36 +91,65 @@ String notifs = page .getMetaDataProperty(WatchListPlugin.WATCH_PROPERTY); - if (notifs != null && notifs.length() > 0) { + String notifsGlobal = engine.getGlobalProperty( + WatchListPlugin.WATCH_PROPERTY, page.getLangCode()); + + if ((notifs != null && notifs.length() > 0) + || (notifsGlobal != null && notifsGlobal.length() > 0)) { Set<String> users = new TreeSet<String>(); - String[] splitedUsers = notifs.split(";"); - String userStr = ""; - for (int i = 0; i < splitedUsers.length; i++) { - userStr += " [" + i + "] " + splitedUsers[i]; + if (notifs != null) { + String[] splitedUsers = notifs.split(";"); + + for (int i = 1; i < splitedUsers.length; i += 2) { + users.add(splitedUsers[i]); + } } - log.info(userStr); + if (notifsGlobal != null) { + String[] splitedUsers = notifsGlobal.split(";"); - for (int i = 1; i < splitedUsers.length; i += 2) { - users.add(splitedUsers[i]); + for (int i = 1; i < splitedUsers.length; i += 2) { + users.add(splitedUsers[i]); + } } page = (WikiPage) page.clone(); + engine.refreshPage(page.getName(), page.getLangCode()); + + WikiPage orgPage = engine.getByName(page.getName(), + null, page.getLastVersion() - 1, page + .getLangCode()); + WikiPage pageHtml = engine.getWikiType("htmlClear") .process(page, wikiSession); + + WikiPage link = (WikiPage)page.clone(); + link.setContent("["+page.getName()+"]"); + + String pageLink = engine.getWikiType("htmlClear") + .process(link, wikiSession).getContent(); DifferenceEngine differenceEngine = new DifferenceEngine( "UTF-8"); - String diffs = differenceEngine.makeDiff(page - .getContent(), page.getPageAtVersion(true, - page.getLastVersion() - 1).getContent()); + String diffs = "<br />\n<br /><h2>Diff</h2>\n<hr />\n"; + try { + diffs += differenceEngine + .colorizeDiff(differenceEngine.makeDiff( + orgPage.getContent(), page + .getContent())); + } catch (IOException e) { + log.error( + "Eroror generating diffs for email notifs", + e); + } NotificationMsg notifMsg = new NotificationMsg(users, - diffs + "<br />\n" + pageHtml.getContent(), - page.getName()); + diffs + "<br /><hr />\n<br/>\nThis is notification of page: " + pageLink + "<br/>\n" + + pageHtml.getContent(), + page.getName(), fromEmail, pageLink); ObjectMessage msg = sess.createObjectMessage(notifMsg); sess.createSender(queue).send(msg); } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiEngine.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiEngine.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiEngine.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -86,7 +86,7 @@ private Set<Integer> editedPages; - //private Semaphore s = new Semaphore(1); + // private Semaphore s = new Semaphore(1); private Class credentialsClass; @@ -128,11 +128,10 @@ public synchronized WikiPage getByName(String pageName, WikiContext wikiContext, LanguageDataSource dataSource) { - /*try { - s.acquire(); - } catch (InterruptedException e) { - e.printStackTrace(); - }*/ + /* + * try { s.acquire(); } catch (InterruptedException e) { + * e.printStackTrace(); } + */ String realPageName = getUid(pageName, dataSource.getLanguageCode()); @@ -140,7 +139,7 @@ if (!dataSource.getMediaDataSource().preGet()) { log.error("Couldn't get page"); - //s.release(); + // s.release(); return null; } @@ -161,7 +160,7 @@ if (((wikiContext != null) && (ret != null) && (!ret.isViewable(wikiContext.getUser())) && (!wikiContext .getUser().isAdmin()))) { - //s.release(); + // s.release(); ret = new WikiPage(realPageName, null, "I am sorry, but you are not allowed to see this page", 0, 0, new Date(), this, false, false, null, null, 0, @@ -178,10 +177,10 @@ if (ret != null) { if (wikiContext != null) { - //s.release(); + // s.release(); return wikiContext.process(ret); } else { - //s.release(); + // s.release(); return ret; } } else { @@ -194,10 +193,10 @@ } if (wikiContext != null) { - //s.release(); + // s.release(); return wikiContext.process(ret); } else { - //s.release(); + // s.release(); return ret; } } @@ -211,11 +210,10 @@ public synchronized WikiPage getByName(String pageName, WikiContext wikiContext, int version, LanguageDataSource dataSource) { - /*try { - s.acquire(); - } catch (InterruptedException e) { - e.printStackTrace(); - }*/ + /* + * try { s.acquire(); } catch (InterruptedException e) { + * e.printStackTrace(); } + */ String realPageName = getUid(pageName, dataSource.getLanguageCode()); @@ -237,10 +235,10 @@ if (ret != null) { if (wikiContext != null) { - //s.release(); + // s.release(); return wikiContext.process(ret); } else { - //s.release(); + // s.release(); return ret; } } else { @@ -251,7 +249,7 @@ * (wikiContext != null) { return wikiContext.process(ret); } else { * return ret; } */ - //s.release(); + // s.release(); return null; } } @@ -766,16 +764,15 @@ // renaming subpage - create aprop. newName newName = uid.substring(0, uid.lastIndexOf("/") + 1) + newName; } - if (!arePagesEdited()) { languageDataSources.get(langCode).getWikiPageDictionary().rename( uid, newName); - + // add opposite translation languageDataSources.get(langCode).getWikiPageDictionary().rename( newName, uid); - + } else { // some pages are edited now - execute watcher languageDataSources.get(langCode).getRenamePageWatcher().rename( @@ -784,7 +781,7 @@ // add opposite translation languageDataSources.get(langCode).getRenamePageWatcher().rename( newName, uid); - + if (!languageDataSources.get(langCode).getRenamePageWatcher() .isRuning()) { languageDataSources.get(langCode).getRenamePageWatcher() @@ -860,8 +857,9 @@ languageDataSources.get(langCode).getMediaDataSource().preSave(); } - public void savePage(Credentials credentials, WikiPage page, String langCode, WikiSession wikiSession) - throws WikiSaveException, EditingNotAllowedException { + public void savePage(Credentials credentials, WikiPage page, + String langCode, WikiSession wikiSession) throws WikiSaveException, + EditingNotAllowedException { if (!page.isEditable(credentials)) { throw new EditingNotAllowedException( @@ -894,7 +892,7 @@ } postSave(langCode); - + } public void postSave(String langCode) throws WikiSaveException { @@ -982,9 +980,9 @@ editedPages.add(editSessionId); } - /*public Semaphore getS() { - return s; - }*/ + /* + * public Semaphore getS() { return s; } + */ public HashMap<String, String> getPagesWaiting(String langCode) { return languageDataSources.get(langCode).getRenamePageWatcher() @@ -1174,18 +1172,18 @@ if (!arePagesEdited()) { languageDataSources.get(langCode).getWikiPageDictionary() .removeDictForPage(getUid(pageName, langCode)); - - //remove opposite translation + + // remove opposite translation languageDataSources.get(langCode).getWikiPageDictionary() - .removeDictForPage(pageName); + .removeDictForPage(pageName); } else { // there are some pages edited - execute watcher languageDataSources.get(langCode).getRenamePageWatcher() .removeDictForPage(getUid(pageName, langCode)); - + // remove opposite translation languageDataSources.get(langCode).getRenamePageWatcher() - .removeDictForPage(pageName); + .removeDictForPage(pageName); if (!languageDataSources.get(langCode).getRenamePageWatcher() .isRuning()) { @@ -1201,6 +1199,45 @@ } public Map<String, String> getRenameMapings(String langCode) { - return languageDataSources.get(langCode).getWikiPageDictionary().getRenameMapings(); + return languageDataSources.get(langCode).getWikiPageDictionary() + .getRenameMapings(); } + + /** + * Sets global property + * + * @param key + * Key + * @param value + * Value + * @param langCode + * Language code + */ + public void setGlobalProperty(String key, String value, String langCode) { + try { + languageDataSources.get(langCode).getMediaDataSource() + .setGlobalProperty(key, value); + } catch (DataSourceException e) { + log.error(e); + } + } + + /** + * Gets global property + * + * @param key + * Key + * @param langCode + * Language code + * @return Value + */ + public String getGlobalProperty(String key, String langCode) { + try { + return languageDataSources.get(langCode).getMediaDataSource() + .getGlobalProperty(key); + } catch (DataSourceException e) { + log.error(e); + return null; + } + } } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/management/NotificationMsg.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/management/NotificationMsg.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/management/NotificationMsg.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -37,10 +37,16 @@ private String pageName; - public NotificationMsg(Set<String> emails, String pageContent, String pageName) { + private String fromEmail; + + private String pageLink; + + public NotificationMsg(Set<String> emails, String pageContent, String pageName, String fromEmail, String pageLink) { this.emails = emails; this.pageContent = pageContent; this.pageName = pageName; + this.fromEmail = fromEmail; + this.pageLink = pageLink; } public Set<String> getEmails() { @@ -67,4 +73,12 @@ this.pageName = pageName; } + public String getFromEmail() { + return fromEmail; + } + + public String getPageLink() { + return pageLink; + } + } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/SendNotificationPlugin.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/SendNotificationPlugin.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/SendNotificationPlugin.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -21,8 +21,6 @@ */ package org.jboss.wiki.plugins; -import java.io.IOException; - import org.jboss.wiki.WikiCommon; import org.jboss.wiki.WikiPage; import org.jboss.wiki.WikiPlugin; @@ -30,6 +28,8 @@ public class SendNotificationPlugin extends WikiPlugin { + private String fromEmail = "ad...@la..."; + @Override public WikiPage process(WikiPage wikiPage, WikiSession wikiSession) { // just send notifications @@ -40,7 +40,7 @@ log.debug("sending notif"); WikiCommon - .sendNotificationMail(clonedPage, wikiSession, wikiEngine); + .sendNotificationMail(clonedPage, wikiSession, wikiEngine, fromEmail); } catch (CloneNotSupportedException e) { log.error(e); } @@ -50,7 +50,7 @@ @Override public void init() { - + fromEmail = getProperty("notification.fromEmail"); } } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -47,13 +47,23 @@ if (notifications == null) { notifications = ""; - } - else if (notifications.startsWith(";")) { + } else if (notifications.startsWith(";")) { notifications = notifications.substring(1); } String[] users = notifications.split(";"); + String notificationsGlobal = wikiEngine.getGlobalProperty( + WATCH_PROPERTY, wikiPage.getLangCode()); + + if (notificationsGlobal == null) { + notificationsGlobal = ""; + } else if (notificationsGlobal.startsWith(";")) { + notificationsGlobal = notificationsGlobal.substring(1); + } + + String[] usersGlobal = notificationsGlobal.split(";"); + if (wikiSession.getAttribute("var1") != null && wikiSession.getAttribute("var1").equals("watch") && wikiSession.getAttribute("var2") != null @@ -63,11 +73,28 @@ log.info("Adding user: " + cred.getName() + " to watchlist for page: " + wikiPage.getName()); - notifications = toggleWatch(users, cred.getName(), cred.getEmail()); + notifications = toggleWatch(users, cred.getName(), cred + .getEmail()); users = notifications.split(";"); wikiPage.setMetaDataProperty(WATCH_PROPERTY, notifications); + } else if (wikiSession.getAttribute("var1") != null + && wikiSession.getAttribute("var1").equals("watchGlobal") + && wikiSession.getAttribute("var2") != null + && wikiSession.getAttribute("var2").equals("toggle")) { + // toggle global page watch/unwatch + + log.info("Adding user: " + cred.getName() + + " to watchlist for page: " + wikiPage.getName()); + + notificationsGlobal = toggleWatch(usersGlobal, cred.getName(), + cred.getEmail()); + usersGlobal = notificationsGlobal.split(";"); + + wikiEngine.setGlobalProperty(WATCH_PROPERTY, + notificationsGlobal, wikiPage.getLangCode()); + } StringBuffer buffer = new StringBuffer(wikiPage.getContent()); @@ -80,10 +107,23 @@ : "You are not watching this page. ").append( "<a href=\"").append( wikiSession.getAttribute(WikiSession.ACTION_URL)).append( + "&page=").append(wikiPage.getName()).append( "&var1=watch&var2=toggle\" >[").append( (watcher) ? "Stop watching this page" : "Watch this page") - .append("]</a>"); + .append("]</a><br />"); + watcher = userInWatchList(usersGlobal, cred.getName()); + + buffer.append( + (watcher) ? "Your global watch is switched ON. " + : "Your global watch is switched OFF. ").append( + "<a href=\"").append( + wikiSession.getAttribute(WikiSession.ACTION_URL)).append( + "&page=").append(wikiPage.getName()).append( + "&var1=watchGlobal&var2=toggle\" >[").append( + (watcher) ? "Switch it off" : "Switch it on").append( + "]</a>"); + wikiPage.setContent(buffer.toString()); } @@ -100,7 +140,8 @@ } } else { for (int i = 0; i < users.length; i++) { - if (notifs.length() != 0 || (users[i].length() != 0 && notifs.length() == 0)) { + if (notifs.length() != 0 + || (users[i].length() != 0 && notifs.length() == 0)) { notifs += users[i] + ";"; } } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java 2006-05-16 18:27:02 UTC (rev 4249) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-management/src/java/org/jboss/wiki/MailNotificationBean.java 2006-05-16 19:17:15 UTC (rev 4250) @@ -44,8 +44,6 @@ @javax.ejb.ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/mdb") }) class MailNotificationBean implements MessageListener { - private final static String EMAIL_ADDRESS = "sz...@o2..."; - private Logger log = Logger.getLogger(this.getClass()); public void onMessage(Message msg) { @@ -76,7 +74,7 @@ MimeMessage m = new MimeMessage(session); if (email != null) { - m.setFrom(new InternetAddress(EMAIL_ADDRESS)); + m.setFrom(new InternetAddress(notifications.getFromEmail())); to = new InternetAddress[] { new InternetAddress( email) }; m.setRecipients(RecipientType.TO, to); @@ -85,7 +83,7 @@ m.setSentDate(new Date()); buffer = new StringBuffer(); - buffer.append("This message is generated automaticcaly. Please do not reply. To remove yourself from the watch list please go to www.\n\n"); + buffer.append("This message is generated automaticcaly. Please do not reply. To remove yourself from the watch list please go to ").append(notifications.getPageLink()).append("<br />\n"); buffer.append(notifications.getPageContent()); m.setContent(buffer.toString(), "text/html; charset=\"UTF-8\""); |
From: <jbo...@li...> - 2006-05-16 18:27:08
|
Author: soh...@jb... Date: 2006-05-16 14:27:02 -0400 (Tue, 16 May 2006) New Revision: 4249 Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewAdminPanel.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/index.xhtml Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums.taglib.xml Log: http://jira.jboss.com/jira/browse/JBFORUMS-55 - Create New Category Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java 2006-05-16 15:45:55 UTC (rev 4248) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java 2006-05-16 18:27:02 UTC (rev 4249) @@ -36,6 +36,7 @@ public static final String START_NEW_TOPIC = "startNewTopic"; public static final String START_EDIT_POST = "startEditPost"; public static final String TOPIC_DELETED = "topicDeleted"; + public static final String FEEDBACK = "feedback"; //---------parameter constants-------------------------------------------------------------------------------------------------- public static final String p_categoryId = "c"; public static final String p_forumId = "f"; Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java 2006-05-16 15:45:55 UTC (rev 4248) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java 2006-05-16 18:27:02 UTC (rev 4249) @@ -174,5 +174,40 @@ } return errorMsg; - } + } + + /** + * + * + */ + public static void setMessage(String id,String msg) + { + FacesMessage message = new FacesMessage( + FacesMessage.SEVERITY_INFO,//severity + msg,//summary + msg//detail + ); + FacesContext.getCurrentInstance().addMessage(id,message); + } + + /** + * + * + */ + public static String getMessage(String id) + { + String msg = null; + + Iterator msgs = FacesContext.getCurrentInstance().getMessages(id); + if(msgs!=null) + { + if(msgs.hasNext()) + { + FacesMessage message = (FacesMessage)msgs.next(); + msg = message.getDetail(); + } + } + + return msg; + } } Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java 2006-05-16 15:45:55 UTC (rev 4248) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/AdminController.java 2006-05-16 18:27:02 UTC (rev 4249) @@ -0,0 +1,98 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ +package org.jboss.portlet.forums.ui.action; + +import org.jboss.portlet.forums.ui.*; + +import org.jboss.portlet.forums.model.Topic; +import org.jboss.portlet.forums.model.Poll; +import org.jboss.portlet.forums.model.PollOption; +import org.jboss.portlet.forums.model.Poster; + +/** + * + * Created on May 16, 2006 + * + * @author <a href="mailto:soh...@jb...">Sohil Shah</a> + */ +public class AdminController extends ActionController +{ + /** + * + * + */ + private String newCategory = null; //this is populated when a new category is to be created + + //-----ui data------------------------------------------------------------------------------------------------------------------------- + /** + * @return Returns the newCategory. + */ + public String getNewCategory() + { + return newCategory; + } + /** + * @param newCategory The newCategory to set. + */ + public void setNewCategory(String newCategory) + { + this.newCategory = newCategory; + } + //------------------------------------------------------------------------------------------------------------------------------------- + /** + * + * + */ + public AdminController() + { + } + + //----actions--------------------------------------------------------------------------------------------------------------------------- + /** + * adds a category + * + */ + public String addCategory() + { + String navState = null; + boolean success = false; + try + { + BaseController.getForumsModule().createCategory(this.newCategory); + JSFUtil.setMessage(Constants.FEEDBACK,"The Category \""+this.newCategory+"\" was successfully created."); + success = true; + } + catch(Exception e) + { + JSFUtil.handleException(e); + } + finally + { + if(success) + { + //cleanup the state + this.newCategory = null; + } + } + return navState; + } +} Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewAdminPanel.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewAdminPanel.java 2006-05-16 15:45:55 UTC (rev 4248) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewAdminPanel.java 2006-05-16 18:27:02 UTC (rev 4249) @@ -0,0 +1,62 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.portlet.forums.ui.view; + +import java.util.List; + +import org.jboss.portlet.forums.ui.BaseController; +import org.jboss.portlet.forums.ui.Constants; +import org.jboss.portlet.forums.ui.ForumUtil; +import org.jboss.portlet.forums.ui.JSFUtil; + +/** + * @author <a href="mailto:soh...@jb...">Sohil Shah</a> + */ +public class ViewAdminPanel extends BaseController +{ + + /** + * + */ + public ViewAdminPanel() + { + super(); + } + + /** + * + * + */ + public List getCategories() + { + try + { + return getForumsModule().findCategories(); + } + catch(Exception e) + { + JSFUtil.handleException(e); + } + return null ; + } +} Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-05-16 15:45:55 UTC (rev 4248) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-05-16 18:27:02 UTC (rev 4249) @@ -335,4 +335,20 @@ <managed-bean-class>org.jboss.portlet.forums.ui.action.PollController</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> + + <!-- managedBean for the adminPanel usecase --> + <managed-bean> + <managed-bean-name>adminPanel</managed-bean-name> + <managed-bean-class>org.jboss.portlet.forums.ui.view.ViewAdminPanel</managed-bean-class> + <managed-bean-scope>request</managed-bean-scope> + </managed-bean> + <!-- managedBean for the adminController usecase --> + <managed-bean> + <managed-bean-name>adminController</managed-bean-name> + <managed-bean-class>org.jboss.portlet.forums.ui.action.AdminController</managed-bean-class> + <managed-bean-scope>request</managed-bean-scope> + </managed-bean> + <navigation-rule> + <from-view-id>/views/admin/index.xhtml</from-view-id> + </navigation-rule> </faces-config> \ No newline at end of file Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums.taglib.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums.taglib.xml 2006-05-16 15:45:55 UTC (rev 4248) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums.taglib.xml 2006-05-16 18:27:02 UTC (rev 4249) @@ -44,7 +44,15 @@ <function-class>org.jboss.portlet.forums.ui.JSFUtil</function-class> <function-signature>java.lang.String getErrorMsg()</function-signature> </function> - + <!-- + function retrieves a message if one is found + return null if nothing is found + --> + <function> + <function-name>message</function-name> + <function-class>org.jboss.portlet.forums.ui.JSFUtil</function-class> + <function-signature>java.lang.String getMessage(java.lang.String)</function-signature> + </function> <!-- --> <function> Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/index.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/index.xhtml 2006-05-16 15:45:55 UTC (rev 4248) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/admin/index.xhtml 2006-05-16 18:27:02 UTC (rev 4249) @@ -0,0 +1,153 @@ +<!-- +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ +--> + +<div xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:c="http://java.sun.com/jstl/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:forums="http://www.jboss.com/products/jbossportal/forums" class="bb"> + + <ui:composition template="/views/common/common.xhtml"> + <ui:define name="mainContent"> + + <!-- Forum admin tool title/messages --> + <h1>${resource.Forum_admin}</h1> + + <!-- display any feedback messages here --> + <span style="color:green"><b>#{forums:message('feedback')}</b></span><br/> + + <p>${resource.Forum_admin_explain}</p> + + <!-- Forum admin widget with the list of category and forums in each category --> + <h:form> + <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> + <tr> + <th class="thHead" colspan="7">${resource.Forum_admin}</th> + </tr> + + <!-- display a list of categories --> + <c:forEach items="#{adminPanel.categories}" var="category"> + <tr> + <td class="catLeft" colspan="3"> + <span class="cattitle"> + <b> + <a href="">${category.title}</a> + </b> + </span> + </td> + <td class="cat" align="center" valign="middle"> + <span class="gen"> + <a href="">${resource.Edit}</a> + </span> + </td> + <td class="cat" align="center" valign="middle"> + <span class="gen"> + <a href="">${resource.Delete}</a> + </span> + </td> + <td class="cat" align="center" valign="middle" nowrap="nowrap"> + <span class="gen"> + <a href="">${resource.Move_up}</a> + <a href="">${resource.Move_down}</a> + </span> + </td> + <td class="catRight" align="center" valign="middle"> + <span class="gen">&nbsp</span> + </td> + </tr> + <!-- display the forums in this category --> + <c:forEach items="#{category.forums}" var="forum"> + <tr> + <td class="row2"> + <span class="gen"> + <a href="" target="_new">${forum.name}</a> + </span> + <br/><span class="gensmall"></span> + </td> + <td class="row1" align="center" valign="middle"> + <span class="gen">${forum.topicCount}</span> + </td> + <td class="row2" align="center" valign="middle"> + <span class="gen">${forum.postCount}</span> + </td> + <td class="row1" align="center" valign="middle"> + <span class="gen"> + <a href="">${resource.Edit}</a> + </span> + </td> + <td class="row2" align="center" valign="middle"> + <span class="gen"> + <a href="">${resource.Delete}</a> + </span> + </td> + <td class="row1" align="center" valign="middle"> + <span class="gen"> + <a href="">${resource.Move_up}</a> + <br/> + <a href="">${resource.Move_down}</a> + </span> + </td> + <td class="row2" align="center" valign="middle"> + <!--span class="gen"><a href="">Resync</a></span--> + </td> + </tr> + </c:forEach> + <!-- create new forum widget for each category --> + <tr> + <td colspan="7" class="row2"> + <input class="post" type="text" name="forumname_1"/> + <input type="submit" class="liteoption" name="addforum_1" value="${resource.Create_forum}"/> + </td> + </tr> + <tr> + <td colspan="7" height="1" class="spaceRow"> + <img src="/subSilver/images/spacer.gif" alt="" width="1" height="1"/> + </td> + </tr> + </c:forEach> + + <!-- Add new category widget --> + <tr> + <td colspan="7" class="catBottom"> + <h:inputText id="Category" styleClass="post" value="#{adminController.newCategory}" required="true"/> + <h:commandButton styleClass="liteoption" value="${resource.Create_category}" action="#{adminController.addCategory}"/> + &nbsp;<h:message for="Category" style="color:red" styleClass="liteoption"/>&nbsp; + </td> + </tr> + </table> + </h:form> + + <!-- integrate the jump box --> + <table cellspacing="0" cellpadding="0" border="0" align="right"> + <tr> + <td align="right" valign="top" nowrap="nowrap"> + <ui:include src="/views/jumpbox.xhtml"/> + </td> + </tr> + </table> + + </ui:define> + </ui:composition> +</div> \ No newline at end of file |
From: <jbo...@li...> - 2006-05-16 15:46:03
|
Author: mar...@jb... Date: 2006-05-16 11:45:55 -0400 (Tue, 16 May 2006) New Revision: 4248 Added: labs/jbossrules/trunk/drools-core/src/main/resources/ Log: -added empty resources directory, just so modular ant build works |
From: <jbo...@li...> - 2006-05-16 13:49:37
|
Author: mla...@jb... Date: 2006-05-16 09:49:28 -0400 (Tue, 16 May 2006) New Revision: 4247 Modified: labs/jbossweb/trunk/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java Log: Use APR_UNSPEC for IPv6 and address=null. Modified: labs/jbossweb/trunk/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java =================================================================== --- labs/jbossweb/trunk/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java 2006-05-16 13:45:56 UTC (rev 4246) +++ labs/jbossweb/trunk/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java 2006-05-16 13:49:28 UTC (rev 4247) @@ -553,9 +553,11 @@ addressStr = address.getHostAddress(); } int family = Socket.APR_INET; - if (Library.APR_HAVE_IPV6 && addressStr != null) { - if (addressStr.indexOf(':') >= 0) - family= Socket.APR_UNSPEC; + if (Library.APR_HAVE_IPV6) { + if (addressStr == null) + family = Socket.APR_UNSPEC; + else if (addressStr.indexOf(':') >= 0) + family = Socket.APR_UNSPEC; } long inetAddress = Address.info(addressStr, family, port, 0, rootPool); |
From: <jbo...@li...> - 2006-05-16 13:46:06
|
Author: jfr...@jb... Date: 2006-05-16 09:45:56 -0400 (Tue, 16 May 2006) New Revision: 4246 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: Integrate the building of libxml2 and postgresql. For examplle they are/were missing on our dev12 (Solaris SPARC). Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-16 13:30:50 UTC (rev 4245) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-16 13:45:56 UTC (rev 4246) @@ -10,16 +10,84 @@ # PHPVER=5.1.4 -URL=http://de.php.net/distributions/php-${PHPVER}.tar.gz +PHPURL=http://de.php.net/distributions/php-${PHPVER}.tar.gz +XML2VER=2.6.24 +XML2URL=ftp://xmlsoft.org/libxml2/libxml2-${XML2VER}.tar.gz +PSQLVER=8.1.3 +PSQLURL=http://wwwmaster.postgresql.org/redir?ftp%3A%2F%2Fftp2.ch.postgresql.org%2Fpub%2Fpostgresql%2Fsource%2Fv${PSQLVER}%2Fpostgresql-${PSQLVER}.tar.gz + # Platfrom directory and cache TOOLS=$HOME/`uname -s`_`uname -p`_tools CACHE=`uname -s`_`uname -p`_cache +BUILDXML2=false +BUILDPSQL=false # +# Fonctions +# Extract +# $1 : directory base name +# $2 : URL +# $3 : version (add to the basename to the directory name). +Extract() +{ +BASE=$1 +URL=$2 +VER=$3 +if [ ! -f ${BASE}-${VER}.tar.gz ] +then + wget ${URL} +fi +if [ ! -d ${BASE}-${VER} ] +then + gzip -dc ${BASE}-${VER}.tar.gz | tar xvf - +fi +} + +# +# configure and install +# $1 : Source base directory +# $2 : Install directory +# $2 : Additional parameters for that machines/product. +Build() +{ +SRCDIR=$1 +INSDIR=$2 +ADDCON=$3 +(cd ${SRCDIR} + ./configure --prefix=${INSDIR} ${ADDCON} + if [ $? -ne 0 ] + then + echo "configure in ${SRCDIR} failed" + exit 1 + fi + make clean + if [ $? -ne 0 ] + then + echo "Make clean in ${SRCDIR} failed" + exit 1 + fi + make + if [ $? -ne 0 ] + then + echo "Make in ${SRCDIR} failed" + exit 1 + fi + make install + if [ $? -ne 0 ] + then + echo "Make install in ${SRCDIR} failed" + exit 1 + fi +) +} + +# # depending on machine remove or add php extensions. case `uname -n` in dev12) + BUILDXML2=true + BUILDPSQL=true # -with-libxml-dir=/usr/local but 2.6.11 needed. # Solaris dynamic ld exports the symbols so build shared extensions. EXTTYPE=shared @@ -47,6 +115,7 @@ # the make install of php (PEAR) uses php and need libxml2. LD_LIBRARY_PATH=$TOOLS/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH + ADDFLAGS="-I $JAVA_HOME/include/solaris" ;; dev17*) EXTTYPE=static @@ -118,11 +187,28 @@ " ;; esac + # +# build libxml2 if required +if ${BUILDXML2} +then + Extract libxml2 ${XML2URL} ${XML2VER} + Build libxml2-${XML2VER} $TOOLS/LIBXML2 "" +fi + +# +# build postgres if required +if ${BUILDPSQL} +then + Extract postgresql ${PSQLURL} ${PSQLVER} + Build postgresql-${PSQLVER} $TOOLS/POSTGRESQL --without-readline +fi + +# # get and extract php if [ ! -f php-${PHPVER}.tar.gz ] then - wget $URL + wget $PHPURL fi if [ ! -d php-${PHPVER} ] then @@ -130,6 +216,10 @@ fi echo "Adding to default configuration:: ${ADDCONF}" +# remove the cache that save problems but use more time when building. +rm -f php-${PHPVER}/$CACHE + +# configure php (cd php-${PHPVER} ./configure --prefix=$TOOLS/PHP \ --cache-file=$CACHE \ |
From: <jbo...@li...> - 2006-05-16 13:30:55
|
Author: jfr...@jb... Date: 2006-05-16 09:30:50 -0400 (Tue, 16 May 2006) New Revision: 4245 Added: labs/jbossweb/trunk/src/share/native/build/patch/ labs/jbossweb/trunk/src/share/native/build/patch/libxml2-2.6.24.patch Log: Allow to compile with SUNWspro on Solaris. Added: labs/jbossweb/trunk/src/share/native/build/patch/libxml2-2.6.24.patch =================================================================== --- labs/jbossweb/trunk/src/share/native/build/patch/libxml2-2.6.24.patch 2006-05-16 07:03:47 UTC (rev 4244) +++ labs/jbossweb/trunk/src/share/native/build/patch/libxml2-2.6.24.patch 2006-05-16 13:30:50 UTC (rev 4245) @@ -0,0 +1,11 @@ +--- libxml2-2.6.24/relaxng.c Fri Apr 28 11:34:13 2006 ++++ libxml2-2.6.24/relaxng.c Tue May 16 08:39:31 2006 +@@ -7394,7 +7394,7 @@ + if (root == NULL) { + xmlRngPErr(ctxt, (xmlNodePtr) doc, + XML_RNGP_EMPTY, "xmlRelaxNGParse: %s is empty\n", +- (ctxt->URL ? ctxt->URL : "schemas"), NULL); ++ (ctxt->URL ? ctxt->URL : (unsigned char *) "schemas"), NULL); + + xmlFreeDoc(ctxt->document); + ctxt->document = NULL; |
From: <do...@ee...> - 2006-05-16 08:52:51
|
jboss-svn-commits您好! 『课 程 一:打造高效外销团队 赢取超值海外订单』 『课 程 二:提高通关效率与降低海关成本高级研讨班』 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 课 程 一:打造高效外销团队 赢取超值海外订单 上 海、广 州 两 地 举 办 ------------------------------- 【时-间】2OO6年5月27-28日(周六、日) 上 海 兆 安 酒 店 【时-间】2OO6年6月3-4日(周六、日) 广 州 侨 鑫 教 育 基 地 ------------------------------- 【单━━位】才 经 管 理 学 院 【费━━用】RMB2OOO元/人(不 包 晚 餐 及 住 宿) 【报名咨询】O 7 5 5-8 2 8 5 0 1 7 6 8 2 8 5 0 1 7 7 林 先 生 ------------------------------- ■■■■■■【课━━程━━收━━益】 企业在进行国际市场拓展的过程中,最大的难点就在于如何使用目前有限的企 业资源进行国际市场开发和拓展。显然,国内传统的营销手段大多不太适合于 中小企业的国际市场营销。如何打开国际市场营销的大门,尤其是对于那些刚 刚进入国际市场领域进行运营的中小企业而言,找到一些切实可行的、卓有成 效的、投入相对较低的、风险相对较小的国际市场营销策略就成为企业不得不 考虑的问题。国际市场环境的复杂程度远远超出了国内市场。中小企业面对的 潜在国际客户群体千差万别,个性不一,如何应对和进行国际商务谈判也成为 国际市场开发的重要制约因素。特别是如何通过广交会开发更多的新客户,以 获得更多的国际订单?在获取订单后,如何规避各种的风险?。。。。。。。 ------------------------------- ■■■■■■【课━━程━━内━━容】 ★第一讲 赢取超值海外订单,必先了解你的客户特征 1、为什么中国出口商在海外贸易中总是处于被动?解决之道是什么 2、美、欧商人在国际采购中有和特点?如何应对? 3、美、欧商人在国际采购中通常使用何种渠道?如何应对? 4、日韩商人在国际采购中有和特点?通常使用何种渠道?如何应对? 5、中东、南美、印巴商人在国际采购中有和特点?通常使用何种渠道?如何应对? 6、澳新、东南亚商人在国际采购中有和特点?通常使用何种渠道?如何应对? 7、各国华裔贸易代表在进行国际采购活动中的特征差异?如何应对? 8、一揽子沟通与分段式沟通策略 ★第二讲 了解你的潜在客户层级,是获取超值海外订单的必由之路 1、谁是优秀的潜在客户?他们到底在哪里? 2、国际零售集团是如何进行国际采购的?他们关心什么?应该如何与他们沟通? 3、国际品牌采购商的采购模式?应该如何应对品牌采购订单? 4、网络采购巨头,你怎能把他们忽略? 5、当中粮集团去海外建立终端的时候,你就应该挖掘行业经销商!! 6、永远不要忽略地区经销商,他是你未来超值订单的源泉!! 7、行业进口商,让你在悲与喜中挣扎! 8、肆意横行的专业进口商,你应该如何应对? 9、广交会和阿里巴巴上肆意求购的进口商究竟是些什么人?谈谈如何应对游击进口商 10、进口陈列商,让你欢喜让你忧!! ★第三讲 高效而超值的手段,是赢取超值海外订单的法宝 1、如何理解海外客户开发中的营销AIDA模式? 2、应如何参加、参加何种交易会,才能真正获取超值海外订单? 3、不同种类的交易会所出现的客户肯定有所不同,你如何识别?如何应对? 4、茫茫网络似大海,如何大海捞针? 5、电子商务种类繁多,哪种才适合你? 6、怎样操作才能通过行会找到中意的客户,赢取中意的订单? 7、国际信息名录与海外黄页的查询方法(为什么在名录与黄页上你总找不到客户?) 8、国际商城是怎样为你赢得订单的? 9、面对茫茫搜索引擎,哪里才有我真正的客户? 10、商务考察是这样把客户炼出来的!! 11、客户那里有客户吗?(小订单是怎样变成超级订单的?) ★第四讲 竞争对手的客户,永远是你海外订单的潜力所在 1、如何挖掘竞争对手的客户?(方法众多,总有一种适合你) 2、针对竞争对手的不同客户,如何与其沟通? 3、如何将意向变成现实的订单? 4、试订单是这样炼出来的? 5、从与竞争对手共舞,到独享竞争对手的客户资源 6、你分析过叛变的竞争对手客户吗?(如何防止客户的再度叛变?) 7、观展,高手的参展观 ★第五讲 客户的叛变,是海外订单流失的主要根源 1、客户是如何在交易会上流失的? 2、你的客户有通过电子商务发布求购信息吗? 3、客户因什么而叛变? 4、客户叛变前的征兆分析? 5、如何发现和应对正在发生的客户叛变? 6、客户叛变后的沟通策略和叛变客户的跟进策略 7、如何防止对手对客户的诱导策略? 8、除了强调品质和价格外,你还能做什么? 9、鸡蛋同蓝和鸡蛋分蓝 ★第六讲 关注客户之关注,永葆海外订单源源不断 1、不同层级的客户有着不同的关注点 2、周转速度、物流能力、配额许可、税费规避、价格条件、支付方式等等,哪个对客户最重要? 3、面对伊莱克斯,你应关注什么? 4、面对大荣商社,你应关注什么? 5、面对迪拜五金商行,你应关注什么? 6、如何获取客户的意向? 7、封闭式策略与开放式策略对探求客户关注的影响差异? 8、均匀订单与独立大单对你有什么启示? ★第七讲 高效外销团队应具备的素质、能力与技巧(请听我们的详细分析,必定让你受益匪浅) 1、必备的船务操作技能和敏感的货运风险意识 2、清晰的金融结算知识和高超的税费筹划技巧 3、信用证的正确认知和对国际贸易分期与延期结算的了解 4、离岸贸易的操作技巧 ------------------------------- ■■■■■■【讲━━师━━简━━介】 陈硕先生,双硕士(美国马里兰大学MBA、南开大学国际贸易专业硕士),深圳市 外经贸局贸易顾问,香港国际经济管理学院客座教授,香港贸易促进会会员, 粤港两地资深讲师及贸易问题处理专家,曾任世界5OO强之1的中国粮油食品进 出口集团公司进出口六部部长,中粮集团驻香港、加拿大商务主办,惠尔普(美) 上海有限公司南区经理和运营总监、深圳某著名商务咨询有限公司总经理、香港 IBT国际商务咨询有限公司国际贸易首席咨询师,东京丸一综合商社西北区市场 总监、珠海威玛石油设备进出口公司总经理,近lO年来先后在香港、深圳、广州、 上海、北京、山东、浙江、江苏、广东等地举行了8OO多场国际贸易专题讲座, 为3OO多家企业做过专门内训或顾问服务,受到企业和学员的广泛好评,陈先生 具有极深厚的理论知识和实践经验,是典型的实战派讲师,2O多年的外贸业务管 理经验,特别在处理外贸业务疑难问题方面有独到的见解和技巧,具有娴熟的业 务技能和极佳的语言表达能力,对国际贸易术语有极精确的理解,同时陈先生还 将传授很多创造性、边缘性的操作手法与心得同大家交流和分享,每次都令学员 意犹未尽,茅塞顿开,而且还将提供三个月的课后免费咨询服务,真正做到服务 到家。 ------------------------------- ■■■■■■【报━━名━━回━━执】 《打造高效外销团队 赢取超值海外订单》 报-名-回-执-表 报名传真:(O 7 5 5)8 2 8 5 0 1 7 7 企业名称:__________________________________人数:______人 联系人:________电话:______________传真:_______________ 手机:_______________电邮:________________费用:____________元 参会人:___________________________________ 付款方式:(请选择打√)□l、转帐□2、现金 地点: l、 广州 2、上海 ------------------------------- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 课 程 二: 提高通关效率与降低海关成本高级研讨班 ……………………………………………………………………………………………… 时间:2OO6年O5月27-28日(上 海 兆 安 酒 店) 时间:2OO6年O6月3-4日(广 州 侨 鑫 教 育 基 地) ……………………………………………………………………………………………… 【主 办】才 经 管 理 学 院 【收 费】2OOO元/人(包括资料费、午餐、证书费、以及上下午茶点等) 【对 象】总经理、财务人员、进出口经理、采购经理、物流经理、报关管理人员 【方 式】小班互动式教学/普通话/本次课程是同行业人士交流最佳机会,请各位多带名片交流。 【电 话】O 7 5 5-8 2 8 5 0 1 7 6 8 2 8 5 0 1 7 7 林 先 生 【传 真】O 7 5 5-8 2 8 5 0 1 7 7 ……………………………………………………………………………………………… ★★★★★【课――――程――――特――――色】 为老板解困 ――摈弃枯燥冗长的条文讲解 以案例互动讲授企业经常发愁的问题 从办事情、解决问题、提高效率、防范风险、保障权益的方法、路子去理解、去思考。 ……………………………………………………………………………………………… ★★★★★【课――――程――――背――――景】 随着中国加入WTO国际经济合作内容和方式的不断变化更新,国际贸易的运行速度、 运作模式,企业的生产方式和经营模式,都正在并将继续发生根本性的变化如何适 应新形势,深入研究和掌握WTO各项规则,特别加工贸易企业涉及法律法规、经济 政策和行政管理规范等方面的内容,要通过各种形式进行普及教育和对策研究,在 进出口货物通关、保税料件监管、外汇收支平衡、增值税管理等方面,不仅造成管 理有漏洞,严重增加企业成本,甚至还被海关、外管、税局列入重点检查、处罚、 监管对象,造成制约生产和投资的发展。企业在处理海关事务的时候,为什么成本居 高不下,给企业带来严重损失。本课程将直接为企业解困,企业处理海关事务的时 候合理节约进出口关税、降低企业运作成本,提高企业竞争力,实现企业利润最大化。 ……………………………………………………………………………………………… ★★★★★【培――――训――――收――――益】 l、节省货物在进出口通关时的成本 2、指导企业强化海关事务管理,防范法律风险 3、加速企业在进出口货物通关流程及效率 4、规范业务操作,减少因操作不当造成企业损失 5、节省关税及因海关事务处理不当 6、防止生产经营带来的意料外风险造成的“灰色”损失 7、学习应对方案,保护公司利益 ……………………………………………………………………………………………… ★★★★★【讲――――师――――介――――绍】 周先生:美国伯利克大学MBA、经济学硕士,海关管理干部学院讲师国际注册商务师, 中国注册会计师,资深关务及财税问题管理专家,曾长期在天津电子进出口集团总 公司、海关担任管理职务,先后在国际部报关科、调查处、海关保税处、稽查处、 审计处等部门工作,对企业关务管理方面存在的问题有深刻的了解,并兼任多家报 关行及大型企业的关务顾问,参与编写了《海关稽查实务》、《海关业务管理》、 《海关征税》、《海关监管理论实务》等专著,应邀对众多外资、外贸及民营进出 口企业进行过海关业务指导,深受企业和学员的好评,lO多年的海关从业经历, 使他积累了十分丰富的关务操作、财务及税务方面的管理经验,特别在处理疑难关 务及相关财务、出口退税方面有独到的见解和技巧,并深刻了解海_关内部运作及有 关规则,周先生将以他丰富的关务及财税实操经验和精彩的案例与大家分享。 ……………………………………………………………………………………………… ★★★★★【课――――程――――内――――容】 ■■一:公司的保税进出口业务管理 l、有办法让海关少来厂稽查吗? 2、能“随心所欲”地转厂吗? 3、怎样向海关争取高一点的单耗? 4、怎样堆放料件和设置仓库、账册才有助于避免被海关处罚? 5、消耗性材料、燃油、试机材料、节余料件或增产产品怎样才能免税? 6、余料、边角料、残次品、副产品如何处理才能缴纳尽可能少的税? 7、如何避免合同逾期处罚?遗失单证怎么办? 8、受灾保税货物怎样才能免税? 9、怎样发外加工或异地加工才不会被处罚? lO、如何有效避免串料的海关处罚 ll、怎样才能彻底免掉烦人的台账? l2、研发机构进口料件、检测、维修业务怎样才能免税?] ■■二:公司的一般贸易进出口业务管理 l、老发错货而被海关查处怎么办?如何避免单货不符的处罚? 2、如何减少海关抽查次数? 3、哪几种归类错误会被认定为瞒骗手法而被处罚? 4、如何准确归类以免处罚或交纳不必要的税、证? 5、进口货物怎样避免被海关误认受特殊关系安排? 6、特殊关系公司之间的进口怎样让海关接受报价? 7、申报的价格中哪些费用是可以不包括的? 8、如何在与海关价格磋商中取得有利地位? 9、租赁、运往境外加工修理的价格申报如何才能不增加税负? lO、出口货物如何报价才能保证较高的退税利益? ll、老是因为价格、归类或化验的问题影响通关怎么办? l2、怎样在被查扣时保持与外界的电话联系? ■■三:如何了解及运用好有关优惠政策 l、如何尽可能地靠上减免税项目利用好国家政策? 2、生产型企业购买非自产货物出口如何享受出口退税? 3、怎样利用暂时进口的政策使货物免税? 4、怎样使复运、补偿或更换的货物免税? 5、如何择优安排不作价设备、借用设备、模具免税进口的方式? 6、减免税货物如何解除监管或结转并尽可能少交税? 7、2OO6年进口哪些国家或地区的商品有税率优惠? 8、如何争取CEPA优惠及相关避税思路? ■■四:如何加快海关手续速度,降低通关成本 l、对办理海关手续“一头雾水”、找不到该找的科室怎么办? 2、如何加快办理合同领取手册? 3、如何简化合同变更(包括延期)手续? 4、怎样才能在海关评级中排前? 5、怎样才能享受便捷通关优惠? 6、一些做法符合商业习惯但不符合海关规定怎么办? 7、为什么说联网监管是大势所趋?如何申请? ■■五:如何有效管理公司的报关员 l、认识你的报关员实际在想什么,他在兼职吗? 2、如何识别和防范手册被人偷用进料? 3、如何识别不是海关收取的费用单据? 4、如何识破报关“拆数”黑中介? 5、如何识别报关员所说的真假? ■■六:如何与海关官员打交道 l、如何掌握海关官员的工作方式? 2、如何向关员的上级反映问题不用担心会引起反感或有“后遗症”? 3、如何利用政府等“第三方”力量推动海关事务? ■■七:如何在争议和处罚中维护公司利益 l、如何打听案件、问题处理进度和状况? 2、怎样知道公司的行为是违规行为、走私行为、还是走私罪? 3、如何有效把握处罚尺度争取最低的处罚? 4、怎样知道海关的处罚是否依法? 5、如何通过强调海关执法失误的责任避减处罚? 6、如何通过法律救济的途径维护公司权益?如何获得海关赔偿? ■■八:如何应对海关的各种稽查及减少处罚风险 l、海关稽查的主要内容及稽查流程 2、海关查帐时特别关注的事项有哪些? 3、企业如何因对海关的自查自报及帐务调整 4、海关中期下厂核查重点注意的l3个问题 5、引起海关稽查的几大主要原因及应对方法 6、被海关扣货应该找谁处理才最有效? 7、如果被海关盯上稽查企业还能做什么? 8、海关风险管理应对与内部控制制度建立 ■■九:海关帐务与会计、仓库的帐务的关系处理 l、海关帐的主要内容、编制方法及重要意义 2、如何做好海关要求的“三帐”平衡? 3、海关申报与会计记录如何保持一致? 4、各部门如何协作做好海关帐? 5、电子帐册的使用、报核流程及注意事项 6、如何建立库存平衡表和海关平衡表 ■■十:海关实务中有关疑难问题的处理技巧 l、来料加工企业转制的必要性及相关会计处理 2、选择来料、进料加工、一般贸易那个更有利 3、办理进出口如何避免不良货代损害公司利益? 4、手册核销时的各种问题处理方法? 5、如何使各种进出境快件符合企业利益又合海关要求 6、外汇核销时各种差异的核销处理方法 7、如何妥善处理减免税设备上的各种疑难问题? 8、保税区、出口加工区、保税物流圆区的关务处理 ……………………………………………………………………………………………… ★★★★★提高通关效率与降低海关成本高级研讨班 培━━训━━报━━名━━表 请传真到:O 7 5 5-8 2 8 5 0 1 7 7 企业名称:______________________________________________人数:________人 联系人:___________________电话:________________传真:_________________ 手机:_____________________电邮:________________费用:_________________ 参会人__________________________________________________________ 付款方式:(请选择打“√”) l、转帐 2、现金 地 点:(请选择打“√”) l、上海 2、广州 …………………………………………………………………………………………………………… 16:53:13 |
From: <jbo...@li...> - 2006-05-16 07:03:51
|
Author: mla...@jb... Date: 2006-05-16 03:03:47 -0400 (Tue, 16 May 2006) New Revision: 4244 Modified: labs/jbossweb/trunk/BUILDING.txt labs/jbossweb/trunk/build.properties.default labs/jbossweb/trunk/build.xml Log: Add download task for downloading a defined JBoss AS version directly from the sourceforge. Modified: labs/jbossweb/trunk/BUILDING.txt =================================================================== --- labs/jbossweb/trunk/BUILDING.txt 2006-05-16 06:46:58 UTC (rev 4243) +++ labs/jbossweb/trunk/BUILDING.txt 2006-05-16 07:03:47 UTC (rev 4244) @@ -3,4 +3,5 @@ - Install Ant 1.6.5 - put a JBoss AS binary distribution in the "jboss" folder (the version number must match what is in build.properties.default) +- Alternatively type "and download" to download the JBoss AS binary matching the build.properties.default defined version - type "ant"; the result is in "output/jbossweb-versionnumber" Modified: labs/jbossweb/trunk/build.properties.default =================================================================== --- labs/jbossweb/trunk/build.properties.default 2006-05-16 06:46:58 UTC (rev 4243) +++ labs/jbossweb/trunk/build.properties.default 2006-05-16 07:03:47 UTC (rev 4244) @@ -63,7 +63,7 @@ base-tomcat.loc=http://archive.apache.org/dist/tomcat # ----- Sourceforge files base location ----- -base-sf.loc=http://switch.dl.sourceforge.net/sourceforge -#base-sf.loc=http://heanet.dl.sourceforge.net/sourceforge +#base-sf.loc=http://switch.dl.sourceforge.net/sourceforge +base-sf.loc=http://heanet.dl.sourceforge.net/sourceforge #base-sf.loc=http://internap.dl.sourceforge.net/sourceforge Modified: labs/jbossweb/trunk/build.xml =================================================================== --- labs/jbossweb/trunk/build.xml 2006-05-16 06:46:58 UTC (rev 4243) +++ labs/jbossweb/trunk/build.xml 2006-05-16 07:03:47 UTC (rev 4244) @@ -12,7 +12,7 @@ <!-- Project Properties --> <property name="name" value="JBoss Web" /> - <property name="year" value="2005" /> + <property name="year" value="2006" /> <property name="version.major" value="4" /> <property name="version.minor" value="0" /> <property name="version.build" value="0" /> @@ -73,7 +73,30 @@ </target> + <!-- ===================== DEPLOY: Download JBoss ======================= --> + <target name="direxist"> + <echo message="Testing for ${destfile}"/> + <available file="${destfile}" type="dir" property="exist"/> + </target> + + <target name="downloadzip" unless="exist" depends="direxist"> + <!-- Download and extract the package --> + <get src="${sourcefile}" dest="${basedir}/file.zip" /> + <mkdir dir="${destdir}" /> + <unzip src="${basedir}/file.zip" dest="${destdir}"/> + <delete file="${basedir}/file.zip"/> + </target> + <target name="download" + description="Download binary packages" > + <antcall target="downloadzip"> + <param name="sourcefile" value="${base-sf.loc}/jboss/jboss-${jboss.version}.zip"/> + <param name="destfile" value="${jboss.build}"/> + <param name="destdir" value="${basedir}/jboss"/> + </antcall> + </target> + + <!-- ====================== DEPLOY: Copy Static Files =================== --> <target name="deploy-static" depends="init"> |
From: <jbo...@li...> - 2006-05-16 06:47:05
|
Author: mic...@jb... Date: 2006-05-16 02:46:58 -0400 (Tue, 16 May 2006) New Revision: 4243 Added: labs/jbossrules/trunk/documentation/training/ labs/jbossrules/trunk/documentation/training/developers-course/ labs/jbossrules/trunk/documentation/training/developers-course/course_outline.odt Log: Added: labs/jbossrules/trunk/documentation/training/developers-course/course_outline.odt =================================================================== (Binary files differ) Property changes on: labs/jbossrules/trunk/documentation/training/developers-course/course_outline.odt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <jbo...@li...> - 2006-05-16 06:29:00
|
Author: mic...@jb... Date: 2006-05-16 02:28:53 -0400 (Tue, 16 May 2006) New Revision: 4242 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Install/Section-Eclipse.xml Log: update site doco Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Install/Section-Eclipse.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Install/Section-Eclipse.xml 2006-05-16 05:41:08 UTC (rev 4241) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Install/Section-Eclipse.xml 2006-05-16 06:28:53 UTC (rev 4242) @@ -136,19 +136,6 @@ <para>The drools-ide project was checked out out using subversion and is ready for exporting.</para> - <para>NOTE: there is also an update site for the plug in. For developers - who want to update the update site (ha) you will need to open the feature - project, and the site project. They are kept in SVN, but in - /jbossrules/update instead of /trunk. They are plain vanilla eclipse - feature and site projects, so refreshing them should be self explanatory - should you need to do it.</para> - - <para>Should this be problematic, the drools-ide-update project can be - manually edited - change the version number in the site.xml, and then - change it in the feature.xml which is embedded in the /features/*.jar - file. Then place the updated plug in in the /plugins directory (with the - same file name as the /features jar file).</para> - <screenshot> <screeninfo>Select Export on the drools-ide project</screeninfo> @@ -237,4 +224,78 @@ </mediaobject> </screenshot> </section> + + <section> + <title>Building the update site</title> + + <para>There is also an update site for the plug in. For developers who + want to update the update site (ha) you will need to get to the update + site project (or create a new one). They are kept in SVN, but in + /jbossrules/update instead of /trunk. They are plain vanilla eclipse + feature and site projects.</para> + + <para>Eclipse refreshing plugins in features and sites seems to not work, + so what is best is to manually edit the site.xml project and the + feature.xml. To do this, open the site.xml file in the drools-ide-update + project, it should look something like this: <programlisting><?xml version="1.0" encoding="UTF-8"?> +<site> + <!-- change both the jar and the version number, make sure the new features jar is named + the same as what you put in --> + <feature url="features/org.drools.ide_1.0.2.jar" id="org.drools.ide" version="1.0.2"> + <category name="JBossRules"/> + </feature> + <category-def name="JBossRules" label="JBoss Rules"/> +</site> +</programlisting> Change the version attribute to be something new, and also + the name of the feature jar to have a new version number at the + end.</para> + + <para>Go into the /feature directory, and unzip the feature jar to get to + the feature.xml. (the feature jar really just contains the feature.xml). + Open the feature.xml, and it should look like: <programlisting><?xml version="1.0" encoding="UTF-8"?> +<feature + id="org.drools.ide" + label="Drools Rule Workbench" + version="1.0.2"> <!-- UPDATE THIS !! --> + + <description> + JBoss Rules (Drools) Workbench for developers. + </description> + + <copyright> + Copyright 2005 JBoss Inc + </copyright> + + <license> + Licensed under the Apache License, Version 2.0(the &quot;License&quot;); + 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 &quot;AS IS&quot; 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. + </license> + + <plugin + id="org.drools.ide" + download-size="0" + install-size="0" + version="1.0.0"/> <!-- THIS JUST HAS TO BE CONSISTENT WITH THE PLUG IN --> + +</feature> +</programlisting> Change the version number in the FEATURE tag to be the same + as what you referred to in the site.xml. If you changed the version number + of the main plug in, you will need to put the version number in the plug + in tag (which refers to org.drools.ide plugin). Then zip up the + feature.xml into a jar with the same name as you referred to in the + site.xml.</para> + + <para>Finally, drop the plugin jar into the /plugins jar directory of the + update site. Now you can upload the site as is, and it will show up as a + new version for Eclipse clients.</para> + </section> </section> \ No newline at end of file |
From: <jbo...@li...> - 2006-05-16 05:41:12
|
Author: mic...@jb... Date: 2006-05-16 01:41:08 -0400 (Tue, 16 May 2006) New Revision: 4241 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Install/Section-Eclipse.xml Log: updated install doco Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Install/Section-Eclipse.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Install/Section-Eclipse.xml 2006-05-16 05:22:22 UTC (rev 4240) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Install/Section-Eclipse.xml 2006-05-16 05:41:08 UTC (rev 4241) @@ -143,6 +143,12 @@ feature and site projects, so refreshing them should be self explanatory should you need to do it.</para> + <para>Should this be problematic, the drools-ide-update project can be + manually edited - change the version number in the site.xml, and then + change it in the feature.xml which is embedded in the /features/*.jar + file. Then place the updated plug in in the /plugins directory (with the + same file name as the /features jar file).</para> + <screenshot> <screeninfo>Select Export on the drools-ide project</screeninfo> |
From: <jbo...@li...> - 2006-05-16 05:22:39
|
Author: soh...@jb... Date: 2006-05-16 01:22:22 -0400 (Tue, 16 May 2006) New Revision: 4240 Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ReplyTopic.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/PageNavigator.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewForum.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewSummary.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/portlet.xml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml Log: 1) http://jira.jboss.com/jira/browse/JBFORUMS-42 - ViewTopic usecase 2) Some preference handling related code cleanup Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -105,5 +105,8 @@ BaseController.singleton = (ForumsModule)new InitialContext().lookup("java:portal/ForumsModule"); } return BaseController.singleton; - } + } + + //user preferences------------------------------------------------------------------------------------------------------------------------- + } Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -76,12 +76,16 @@ * DOCUMENT_ME */ public static final int FORUM_LOCKED = 1; - - + /** - * DOCUMENT_ME - */ - public static final int TOPIC_LOCKED = 1; + * DOCUMENT_ME + */ + int TOPIC_UNLOCKED = 0; + + /** + * DOCUMENT_ME + */ + int TOPIC_LOCKED = 1; /** Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -107,7 +107,8 @@ if(component!=null) { - value = (String)component.getValueBinding("value").getValue(FacesContext.getCurrentInstance()); + Object o = component.getValueBinding("value").getValue(FacesContext.getCurrentInstance()); + value = (String)o; } @@ -173,5 +174,5 @@ } return errorMsg; - } + } } Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ReplyTopic.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ReplyTopic.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ReplyTopic.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -135,6 +135,20 @@ } return navState; } + + /** + * + * + */ + public String startInstantReplyPreview() + { + String navState = null; + String message = this.getMessage(); + navState = this.start(); + this.setMessage(message); + this.preview(); + return navState; + } //--------execute------------------------------------------------------------------------------------------------------------- /** * @@ -200,5 +214,20 @@ } } return navState; - } + } + + /** + * + * + */ + public String executeInstantReply() + { + String navState = null; + String message = this.getMessage(); + this.start(); + this.setMessage(message); + this.execute(); + navState = "instantReply"; + return navState; + } } Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/PageNavigator.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/PageNavigator.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/PageNavigator.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -21,6 +21,7 @@ */ package org.jboss.portlet.forums.ui.view; +import java.io.Serializable; import java.util.Collection; import java.util.ArrayList; @@ -29,7 +30,7 @@ * * @author <a href="mailto:soh...@jb...">Sohil Shah</a> */ -public class PageNavigator +public class PageNavigator implements Serializable { /** * @@ -182,6 +183,22 @@ * * */ + public int getPageAfterAdd() + { + int pageAfterAdd = 0; + + double totalDbl = this.entries.length+1; + double pageSizeDbl = this.pageSize; + double pageCountDbl = totalDbl/pageSizeDbl; + pageAfterAdd = ((int)Math.ceil(pageCountDbl))-1; + + return pageAfterAdd; + } + + /** + * + * + */ public void setCurrentPage(int currentPage) { this.currentPage = currentPage; Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewForum.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewForum.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewForum.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -25,6 +25,8 @@ import java.util.Iterator; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import org.jboss.portlet.forums.model.Forum; import org.jboss.portlet.forums.model.Topic; @@ -47,59 +49,51 @@ private int topicsPerForum = 0; //feed in the topicsPerForum value as a managed property private String topicsPerForumKey = null; //feed in the topicsPerForum preference key as managed property + //managed bean reference injection + private ViewTopic topicBean = null; //used to extract the posts per topic user preference for now + //business data being generated in this bean by executing ui actions //this is data is created such that it can be consumed by the view components //like facelets private Forum forum = null; private PageNavigator pageNavigator = null; private Collection page = new ArrayList(); - - //----------------bean configuration supplied by the forums-config.xml--------------------------------------------------------------------------------------------- + private Map topicNavigator = new HashMap(); + + //----------------business data being generated for use by the view components like facelets--------------------------------------------------------------------------------------- /** - * @return Returns the topicsPerForum. + * */ - public int getTopicsPerForum() + public Forum getForum() { - return topicsPerForum; - } + return this.forum; + } + /** - * @param topicsPerForum The topicsPerForum to set. + * + * */ - public void setTopicsPerForum(int topicsPerForum) + public void setTopicBean(ViewTopic topicBean) { - this.topicsPerForum = topicsPerForum; + this.topicBean = topicBean; } - + + //page navigation related methods on this bean-------------------------------------------------------------------------------------------- /** - * @return Returns the topicsPerForumKey. + * */ - public String getTopicsPerForumKey() + public PageNavigator getPageNavigator() { - return topicsPerForumKey; + return this.pageNavigator; } - /** - * @param topicsPerForumKey The topicsPerForumKey to set. - */ - public void setTopicsPerForumKey(String topicsPerForumKey) - { - this.topicsPerForumKey = topicsPerForumKey; - } - //----------------business data being generated for use by the view components like facelets--------------------------------------------------------------------------------------- - /** - * - */ - public Forum getForum() - { - return this.forum; - } - //page navigation related methods on this bean-------------------------------------------------------------------------------------------- /** * + * */ - public PageNavigator getPageNavigator() + public Map getTopicNavigator() { - return this.pageNavigator; + return this.topicNavigator; } //-------------------------------------------------------------------------------------------- /** @@ -221,7 +215,48 @@ return present; } //------------user preferences------------------------------------------------------------------------------------------------------------- - + /** + * @return Returns the topicsPerForum. + */ + public int getTopicsPerForum() + { + return topicsPerForum; + } + /** + * @param topicsPerForum The topicsPerForum to set. + */ + public void setTopicsPerForum(int topicsPerForum) + { + this.topicsPerForum = topicsPerForum; + + //get the user's preferred pageSize for viewing a forum and its list of topics, + //instead of using the default page size + String userPreference = PortalUtil.getPreference(this.topicsPerForumKey); + if(userPreference!=null && userPreference.trim().length()>0) + { + int cour = 0; + try{cour = Integer.parseInt(userPreference);}catch(NumberFormatException nfe){} + if(cour>0) + { + this.topicsPerForum = cour; //here override the default page size with the user's preference + } + } + } + + /** + * @return Returns the topicsPerForumKey. + */ + public String getTopicsPerForumKey() + { + return topicsPerForumKey; + } + /** + * @param topicsPerForumKey The topicsPerForumKey to set. + */ + public void setTopicsPerForumKey(String topicsPerForumKey) + { + this.topicsPerForumKey = topicsPerForumKey; + } //------------------------------------------------------------------------------------------------------------------------------------- /** * @@ -287,28 +322,11 @@ } topicObjects = topics.toArray(); } - - - //calculate the pageSize of this forum listing of topics - int pageSize = this.topicsPerForum; //default page size - - //get the user's preferred pageSize for viewing a forum and its list of topics, - //instead of using the default page size - String topicsPerForum = PortalUtil.getPreference(this.topicsPerForumKey); - if(topicsPerForum!=null && topicsPerForum.trim().length()>0) - { - int cour = 0; - try{cour = Integer.parseInt(topicsPerForum);}catch(NumberFormatException nfe){} - if(cour>0) - { - pageSize = cour; //here override the default page size with the user's preference - } - } - + //setup the pageNavigator for this forum this.pageNavigator = new PageNavigator( topicObjects, //total number of entries to be split up into pages - pageSize, + this.topicsPerForum, 0 //currently selected page being displayed, first page by default ); @@ -319,6 +337,21 @@ } this.page = this.pageNavigator.getPage(); + + //setup a pageNavigator for each topic being displayed on this page + for(Iterator itr=this.page.iterator();itr.hasNext();) + { + Topic cour = (Topic)itr.next(); + Collection posts = cour.getPosts(); + if(posts!=null && !posts.isEmpty()) + { + PageNavigator topicNav = new PageNavigator(posts.toArray(), + this.topicBean.getPostsPerTopic(), //this is user's posts per page preference + 0 //current page of the navigator + ); + this.topicNavigator.put(cour.getId(),topicNav); + } + } } } //------------------------------------------------------------------------------------------------------------------------------------- Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewSummary.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewSummary.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewSummary.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -46,6 +46,10 @@ private int summaryTopicLimit = 0; private int summaryTopicDays = 0; private int summaryTopicReplies = 0; + private String summaryModeKey = null; + private String summaryTopicLimitKey = null; + private String summaryTopicDaysKey = null; + private String summaryTopicRepliesKey = null; //business data being generated in this bean by executing ui actions //this is data is created such that it can be consumed by the view components @@ -88,7 +92,7 @@ this.summaryMode = summaryMode; //overwrite the default value with the user's preference - String storedSummaryMode = PortalUtil.getPreference("summarymode"); + String storedSummaryMode = PortalUtil.getPreference(this.summaryModeKey); if(storedSummaryMode!=null && storedSummaryMode.trim().length()>0) { this.summaryMode = Integer.parseInt(storedSummaryMode); @@ -104,7 +108,7 @@ this.summaryTopicLimit = summaryTopicLimit; //overwrite the default value with the user's preference - String storedSummaryTopicLimit = PortalUtil.getPreference("summarytopiclimit"); + String storedSummaryTopicLimit = PortalUtil.getPreference(this.summaryTopicLimitKey); if(storedSummaryTopicLimit!=null && storedSummaryTopicLimit.trim().length()>0) { this.summaryTopicLimit = Integer.parseInt(storedSummaryTopicLimit); @@ -120,7 +124,7 @@ this.summaryTopicDays = summaryTopicDays; //overwrite the default value with the user's preference - String storedSummaryTopicDays = PortalUtil.getPreference("summarytopicdays"); + String storedSummaryTopicDays = PortalUtil.getPreference(this.summaryTopicDaysKey); if(storedSummaryTopicDays!=null && storedSummaryTopicDays.trim().length()>0) { this.summaryTopicDays = Integer.parseInt(storedSummaryTopicDays); @@ -136,12 +140,70 @@ this.summaryTopicReplies = summaryTopicReplies; //overwrite the default value with the user's preference - String storedSummaryTopicReplies = PortalUtil.getPreference("summarytopicreplies"); + String storedSummaryTopicReplies = PortalUtil.getPreference(this.summaryTopicRepliesKey); if(storedSummaryTopicReplies!=null && storedSummaryTopicReplies.trim().length()>0) { this.summaryTopicReplies = Integer.parseInt(storedSummaryTopicReplies); } } + + + /** + * @return Returns the summaryModeKey. + */ + public String getSummaryModeKey() + { + return summaryModeKey; + } + /** + * @param summaryModeKey The summaryModeKey to set. + */ + public void setSummaryModeKey(String summaryModeKey) + { + this.summaryModeKey = summaryModeKey; + } + /** + * @return Returns the summaryTopicDaysKey. + */ + public String getSummaryTopicDaysKey() + { + return summaryTopicDaysKey; + } + /** + * @param summaryTopicDaysKey The summaryTopicDaysKey to set. + */ + public void setSummaryTopicDaysKey(String summaryTopicDaysKey) + { + this.summaryTopicDaysKey = summaryTopicDaysKey; + } + /** + * @return Returns the summaryTopicLimitKey. + */ + public String getSummaryTopicLimitKey() + { + return summaryTopicLimitKey; + } + /** + * @param summaryTopicLimitKey The summaryTopicLimitKey to set. + */ + public void setSummaryTopicLimitKey(String summaryTopicLimitKey) + { + this.summaryTopicLimitKey = summaryTopicLimitKey; + } + /** + * @return Returns the summaryTopicRepliesKey. + */ + public String getSummaryTopicRepliesKey() + { + return summaryTopicRepliesKey; + } + /** + * @param summaryTopicRepliesKey The summaryTopicRepliesKey to set. + */ + public void setSummaryTopicRepliesKey(String summaryTopicRepliesKey) + { + this.summaryTopicRepliesKey = summaryTopicRepliesKey; + } //------------------------------------------------------------------------------------------------------------------------------------- /** * Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -22,6 +22,7 @@ package org.jboss.portlet.forums.ui.view; +import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @@ -31,48 +32,52 @@ import org.jboss.portlet.forums.ui.Constants; import org.jboss.portlet.forums.ui.ForumUtil; import org.jboss.portlet.forums.ui.JSFUtil; +import org.jboss.portlet.forums.ui.PortalUtil; /** * @author <a href="mailto:rys...@jb...">Ryszard Kozmik</a> + * @author <a href="mailto:soh...@jb...">Sohil Shah</a> */ public class ViewTopic extends BaseController { - - private Topic topic; - private boolean rowClass; - - // This is value of selectItem describing time constraint for displayed posts - private long postDays=0L; - - public Topic getTopic () - { - return this.topic; - } - - - public String getPagination() - { - /** - * TODO: implement real code to get the pagination... - */ - //stub code - return "10"; - } - public String getPageNumber() - { - /** - * TODO: implement real code to get the pageNumber... - */ - //stub code - return "2"; - } - + /** + * user preference related data + */ + private String postsPerTopicKey = null; + private int postsPerTopic = 0; + + /** + * + */ + private Topic topic; + private boolean rowClass; + private long postDays=0L; // This is value of selectItem describing time constraint for displayed posts + private PageNavigator pageNavigator = null; + private Collection page = new ArrayList(); + + /** + * + * + */ + public Topic getTopic () + { + return this.topic; + } + + /** + * + * + */ public void setPostDays(long postDays) { this.postDays = postDays; } + /** + * + * + */ public long getPostDays() { return postDays; @@ -114,48 +119,140 @@ } return isBallotView; + } + // page navigation related methods on this bean-------------------------------------------------------------------------------------------- + /** + * + */ + public PageNavigator getPageNavigator() + { + return this.pageNavigator; } + + /** + * + * + */ + public Collection getPage() + { + return this.page; + } //------------user preferences------------------------------------------------------------------------------------------------------------- - + /** + * @return Returns the postsPerTopicKey. + */ + public String getPostsPerTopicKey() + { + return postsPerTopicKey; + } + /** + * @param postsPerTopicKey The postsPerTopicKey to set. + */ + public void setPostsPerTopicKey(String postsPerTopicKey) + { + this.postsPerTopicKey = postsPerTopicKey; + } + + /** + * @return Returns the postsPerTopic. + */ + public int getPostsPerTopic() + { + return postsPerTopic; + } + /** + * @param postsPerTopic The postsPerTopic to set. + */ + public void setPostsPerTopic(int postsPerTopic) + { + this.postsPerTopic = postsPerTopic; + + //override this with the preference specified by the user...if + //nothing is found, use a default value + String userPreference = PortalUtil.getPreference(this.postsPerTopicKey); + if(userPreference!=null && userPreference.trim().length()>0) + { + int cour = -1; + try{cour = Integer.parseInt(userPreference);}catch(NumberFormatException nfe){} + if(cour!=-1) + { + this.postsPerTopic = cour; + } + } + } //------------------------------------------------------------------------------------------------------------------------------------- /** * @author Ryszard Kozmik */ - public ViewTopic () { - super(); - try - { - this.execute(); - } - catch(Exception e) - { - JSFUtil.handleException(e); - } + public ViewTopic () + { + super(); } - - - - - //ui actions supported by this bean---------------------------------------------------------------------------------------------------- + + //ui actions supported by this bean---------------------------------------------------------------------------------------------------- /** + * + */ + public boolean isInitialized() + { + boolean initialized = false; + try + { + this.execute(); + initialized = true; + } + catch(Exception e) + { + JSFUtil.handleException(e); + } + return initialized; + } + /** * This method gets topicId from parameters and tries to find topic with that id. */ private void execute() throws Exception { - int topicId = -1; - String t = ForumUtil.getParameter(Constants.p_topicId); - if(t!=null && t.trim().length()>0) - { - topicId = Integer.parseInt(t); - } - if(topicId!=-1) - { - // start with a stub implementation - this.topic = BaseController.getForumsModule().findTopicById(new Integer(topicId)); - } + //parse input data + int topicId = -1; + String t = ForumUtil.getParameter(Constants.p_topicId); + String page = ForumUtil.getParameter(Constants.p_page); + if(t!=null && t.trim().length()>0) + { + topicId = Integer.parseInt(t); + } + + //process the topic information + if(topicId!=-1) + { + this.topic = BaseController.getForumsModule().findTopicById(new Integer(topicId)); + Collection posts = this.topic.getPosts(); + + if(posts!=null && posts.size()>0) + { + int currentPage = 0; + if(page!=null && page.trim().length()>0) + { + //setup the page data + currentPage = Integer.parseInt(page); + } + + //setup the pageNavigator + this.pageNavigator = new PageNavigator( + posts.toArray(), //total number of entries to be split up into pages + this.postsPerTopic, + currentPage //currently selected page being displayed, first page by default + ); + + + + this.page = this.pageNavigator.getPage(); + } + } } + + //implement this functionality later in 1.1.0 release of forums------------------------------------------------------------------------------------------------------------------------------------------------- /** * This method is for changing the displayed amount of posts in topic. User may * want to see posts from 1 Day, 7 Days, 2 Weeks etc. Additionaly user may @@ -166,6 +263,5 @@ public String topicsConstraint () { - } - */ + }*/ } Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-05-16 05:22:22 UTC (rev 4240) @@ -2,18 +2,18 @@ <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN" - "http://java.sun.com/dtd/web-facesconfig_1_0.dtd" > + "http://java.sun.com/dtd/web-facesconfig_1_0.dtd"> <faces-config> <!-- general application configuration --> <application> <!-- jbossportal-facelets integration --> - <property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver> - <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler> + <!--property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver> + <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler--> <!-- standalone facelets integration --> - <!--view-handler>com.sun.facelets.FaceletViewHandler</view-handler--> + <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> <!-- internationalization --> <locale-config> @@ -79,21 +79,37 @@ <managed-bean-scope>request</managed-bean-scope> <!-- user preferences --> <managed-property> + <property-name>summaryModeKey</property-name> + <value>summarymode</value> + </managed-property> + <managed-property> + <property-name>summaryTopicLimitKey</property-name> + <value>summarytopiclimit</value> + </managed-property> + <managed-property> + <property-name>summaryTopicDaysKey</property-name> + <value>summarytopicdays</value> + </managed-property> + <managed-property> + <property-name>summaryTopicRepliesKey</property-name> + <value>summarytopicreplies</value> + </managed-property> + <managed-property> <property-name>summarymode</property-name> <value>0</value> - </managed-property> + </managed-property> <managed-property> <property-name>summarytopiclimit</property-name> <value>6</value> - </managed-property> + </managed-property> <managed-property> <property-name>summarytopicdays</property-name> <value>20</value> - </managed-property> + </managed-property> <managed-property> <property-name>summarytopicreplies</property-name> - <value>15</value> - </managed-property> + <value>15</value> + </managed-property> </managed-bean> <!-- configuration for ViewCategory --> @@ -112,11 +128,16 @@ <managed-property> <property-name>topicsPerForumKey</property-name> <value>topicsperforum</value> - </managed-property> - <managed-property> + </managed-property> + <managed-property> <property-name>topicsPerForum</property-name> <value>10</value> </managed-property> + <managed-property> + <property-name>topicBean</property-name> + <property-class>org.jboss.portlet.forums.ui.view.ViewTopic</property-class> + <value>#{topic}</value> + </managed-property> </managed-bean> <navigation-rule> <from-view-id>/views/forums/viewforum_body.xhtml</from-view-id> @@ -124,7 +145,42 @@ <from-outcome>startNewTopic</from-outcome> <to-view-id>/views/topics/posting_new_body.xhtml</to-view-id> </navigation-case> - </navigation-rule> + </navigation-rule> + + <!-- managedBean for the viewTopic usecase --> + <managed-bean> + <managed-bean-name>topic</managed-bean-name> + <managed-bean-class>org.jboss.portlet.forums.ui.view.ViewTopic</managed-bean-class> + <managed-bean-scope>request</managed-bean-scope> + <!-- user preferences related configuration --> + <managed-property> + <property-name>postsPerTopicKey</property-name> + <value>postspertopic</value> + </managed-property> + <managed-property> + <property-name>postsPerTopic</property-name> + <value>5</value> + </managed-property> + </managed-bean> + <navigation-rule> + <from-view-id>/views/topics/viewtopic_body.xhtml</from-view-id> + <navigation-case> + <from-outcome>startNewTopic</from-outcome> + <to-view-id>/views/topics/posting_new_body.xhtml</to-view-id> + </navigation-case> + <navigation-case> + <from-outcome>startReply</from-outcome> + <to-view-id>/views/topics/posting_reply_body.xhtml</to-view-id> + </navigation-case> + <navigation-case> + <from-outcome>startEditPost</from-outcome> + <to-view-id>/views/topics/posting_edit_body.xhtml</to-view-id> + </navigation-case> + <navigation-case> + <from-outcome>instantReply</from-outcome> + <to-view-id>/views/topics/viewtopic_body.xhtml</to-view-id> + </navigation-case> + </navigation-rule> <!-- configuration for NewTopic --> <managed-bean> @@ -232,29 +288,7 @@ <to-view-id>/views/topics/posting_edit_body.xhtml</to-view-id> </navigation-case> </navigation-rule> - - <!-- managedBean for the viewTopic usecase --> - <managed-bean> - <managed-bean-name>topic</managed-bean-name> - <managed-bean-class>org.jboss.portlet.forums.ui.view.ViewTopic</managed-bean-class> - <managed-bean-scope>request</managed-bean-scope> - </managed-bean> - <navigation-rule> - <from-view-id>/views/topics/viewtopic_body.xhtml</from-view-id> - <navigation-case> - <from-outcome>startNewTopic</from-outcome> - <to-view-id>/views/topics/posting_new_body.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>startReply</from-outcome> - <to-view-id>/views/topics/posting_reply_body.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>startEditPost</from-outcome> - <to-view-id>/views/topics/posting_edit_body.xhtml</to-view-id> - </navigation-case> - </navigation-rule> - + <!-- managedBean for the jumpbox usecase --> <managed-bean> <managed-bean-name>jumpbox</managed-bean-name> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/portlet.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/portlet.xml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/portlet.xml 2006-05-16 05:22:22 UTC (rev 4240) @@ -122,6 +122,10 @@ <name>topicsperforum</name> <value>10</value> </preference> + <preference> + <name>postspertopic</name> + <value>15</value> + </preference> <!-- not yet integrated with the JSF layer --> <preference> <name>notifyreply</name> @@ -137,12 +141,8 @@ <preference> <name>postorder</name> <value>ascending</value> - </preference> + </preference> <preference> - <name>postspertopic</name> - <value>15</value> - </preference> - <preference> <name>dateformat</name> <value>EEE MMM d, yyyy HH:mm aaa</value> </preference> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2006-05-16 05:22:22 UTC (rev 4240) @@ -35,8 +35,6 @@ <c:if test="#{forum.initialized && forum.forum!=null && forum.forum.id!=-1}"> - - <!-- title, newtopic, forum, and page navigation --> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> @@ -186,8 +184,27 @@ <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}" styleClass="topictitle"> <f:param name="t" value="${topicrow.id}"/> <h:outputText value="${topicrow.subject}"/> - </h:outputLink> - </span> + </h:outputLink> + </span> + <!-- mini post navigator for this topic --> + <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}"> + <span class="gensmall"> + <br/> + <img src="#{forums:themeURL('resourceIconMinipostURL')}" alt="Goto page" title="Goto page"/>Goto page: + [ + <c:forEach items="#{forum.topicNavigator[topicrow.id].pages}" var="page" varStatus="idx"> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topicrow.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + <c:if test="${idx.index-1 ne forum.topicNavigator[topicrow.id].totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + ] + </span> + </c:if> </td> <td class="row2" align="center" valign="middle"> <span class="postdetails"> @@ -268,8 +285,27 @@ <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}" styleClass="topictitle"> <f:param name="t" value="${topicrow.id}"/> <h:outputText value="${topicrow.subject}"/> - </h:outputLink> - </span> + </h:outputLink> + </span> + <!-- mini post navigator for this topic --> + <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}"> + <span class="gensmall"> + <br/> + <img src="#{forums:themeURL('resourceIconMinipostURL')}" alt="Goto page" title="Goto page"/>Goto page: + [ + <c:forEach items="#{forum.topicNavigator[topicrow.id].pages}" var="page" varStatus="idx"> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topicrow.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + <c:if test="${idx.index-1 ne forum.topicNavigator[topicrow.id].totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + ] + </span> + </c:if> </td> <td class="row2" align="center" valign="middle"> <span class="postdetails"> @@ -349,8 +385,27 @@ <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}" styleClass="topictitle"> <f:param name="t" value="${topicrow.id}"/> <h:outputText value="${topicrow.subject}"/> - </h:outputLink> - </span> + </h:outputLink> + </span> + <!-- mini post navigator for this topic --> + <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}"> + <span class="gensmall"> + <br/> + <img src="#{forums:themeURL('resourceIconMinipostURL')}" alt="Goto page" title="Goto page"/>Goto page: + [ + <c:forEach items="#{forum.topicNavigator[topicrow.id].pages}" var="page" varStatus="idx"> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topicrow.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + <c:if test="${idx.index-1 ne forum.topicNavigator[topicrow.id].totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + ] + </span> + </c:if> </td> <td class="row2" align="center" valign="middle"> <span class="postdetails"> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml 2006-05-16 05:22:22 UTC (rev 4240) @@ -290,7 +290,10 @@ <!--h:form id="post"--> <!-- keeps the forum where this topic is being created in context, this is a control parameter --> <input type="hidden" name="f" value="#{replyTopic.forumId}"/> - <input type="hidden" name="t" value="#{replyTopic.topicId}"/> + <input type="hidden" name="t" value="#{replyTopic.topicId}"/> + <c:if test="#{param['page'] ne null}"> + <input type="hidden" name="page" value="#{param['page']}"/> + </c:if> <!-- add Subject --> <tr> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-05-16 05:22:22 UTC (rev 4240) @@ -31,8 +31,9 @@ <ui:composition template="/views/common/common.xhtml"> <ui:define name="mainContent"> - - <c:if test="#{topic.topic!=null && topic.topic.id!=-1}"> + + <c:choose> + <c:when test="#{topic.initialized && topic.topic!=null && topic.topic.id!=-1}"> <table width="100%" cellspacing="2" cellpadding="2" border="0"> <tr> <td align="left" valign="bottom" colspan="2"> @@ -42,11 +43,53 @@ <h:outputText value="#{topic.topic.subject}"/> </h:outputLink> </td> - <td align="right" valign="bottom" nowrap="nowrap"> - <span class="gensmall"> - <b>#{forum.pagination}</b> - </span> - </td> + <!-- page navigation --> + <c:if test="#{topic.pageNavigator.totalPages gt 1}"> + <td align="right" valign="middle" nowrap="nowrap"> + <span class="gensmall"></span><br/> + <span class="nav"> + Goto page + <!-- previous link --> + <c:if test="#{topic.pageNavigator.pageNumber gt 1}"> + &nbsp;&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{topic.pageNavigator.currentPage-1}"/> + <h:outputText value="Previous"/> + </h:outputLink> + &nbsp;&nbsp; + </c:if> + <!-- actual pages --> + <c:forEach items="#{topic.pageNavigator.pages}" var="page" varStatus="idx"> + <c:choose> + <c:when test="#{topic.pageNavigator.pageNumber==page}"> + <b>${page}</b> + </c:when> + <c:otherwise> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + </c:otherwise> + </c:choose> + <c:if test="${idx.index-1 ne topic.pageNavigator.totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + <!-- Next link --> + <c:if test="#{topic.pageNavigator.pageNumber lt topic.pageNavigator.totalPages}"> + &nbsp;&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{topic.pageNavigator.currentPage+1}"/> + <h:outputText value="Next"/> + </h:outputLink> + &nbsp;&nbsp; + </c:if> + </span> + </td> + </c:if> </tr> <tr> <!-- insert the newTopic and replyTopic buttons here --> @@ -150,15 +193,7 @@ <!-- TODO: hook in the previous/next topic function --> <!--tr align="right"> <td class="catHead" colspan="2" height="28"><span class="nav"><a href="${n:out("U_VIEW_OLDER_TOPIC")}" class="nav">${n:i18n("View_previous_topic")}</a> :: <a href="${n:out("U_VIEW_NEWER_TOPIC")}" class="nav">${n:i18n("View_next_topic")}</a> </span></td> - </tr--> - <!-- TODO: POLL DISPLAY - <if ctx="poll_ballot_display"> - <include page="viewtopic_poll_ballot.jsp"/> - </if> - <if ctx="poll_result_display"> - <include page="viewtopic_poll_result.jsp"/> - </if> - --> + </tr--> <!-- POLL DISPLAY --> <c:if test="#{topic.pollPresent && topic.ballotView}"> <ui:include src="/views/topics/viewtopic_poll_ballot.xhtml"> @@ -180,15 +215,14 @@ </tr> <!-- iterate and display each post on this topic in the forum --> - <c:forEach items="#{topic.topic.posts}" var="postrow" varStatus="status" > + <c:forEach items="#{topic.page}" var="postrow" varStatus="status" > <tr> <td width='150' align='left' valign='top' class='${(status.index%2==0)?"row1":"row2"}'> <!-- insert security check to make sure "posting" is allowed --> <span class="name">${postrow.poster.user.userName}</span> <br/> <!-- TODO: NEED TO BE REIMPLEMENTED - <span class="postdetails"> - + <span class="postdetails"> ${n:out("postrow.poster.user.POSTER_RANK")} <br/> ${n:out("postrow.RANK_IMAGE")}${n:out("postrow.POSTER_AVATAR")} @@ -223,17 +257,8 @@ <span class="gen">&nbsp;</span> &nbsp; &nbsp;${resource.Post_subject}&nbsp;:&nbsp;${postrow.message.subject} </span> - </td> - <!-- TODO: MISSING IMAGE LINKS TO DIFFERENT ACTIONS - <td valign="top" nowrap="">${n:out("postrow.QUOTE_IMG")} - ${n:out("postrow.EDIT_IMG")} - ${n:out("postrow.REPOST_IMG")} - ${n:out("postrow.DELETE_IMG")} - ${n:out("postrow.IP_IMG")} - </td>--> - <!-- TODO: please remove me...this is just a temporary integration until the above TODO is completed..this - is only for unit testing the edit post usecase - --> + </td> + <!-- "Quote", "Edit", and "Delete" buttons --> <td valign="top" nowrap=""> <!-- add the quote link --> <h:commandLink action="#{replyTopic.startQuote}" style="text-decoration: none;"> @@ -241,18 +266,14 @@ <f:param name="t" value="#{topic.topic.id}"/> <f:param name="p" value="#{postrow.id}"/> <f:verbatim> - <img border="0" - src="#{forums:themeURL('resourceReplyLockedURL')}" - alt="${resource.Topic_locked}" /> + <img border="0" src="#{forums:themeURL('resourceIconQuoteURL')}"/> </f:verbatim> </h:commandLink> <!-- add the edit post link --> <h:commandLink action="#{editPost.start}" style="text-decoration: none;"> <f:param name="p" value="#{postrow.id}"/> <f:verbatim> - <img border="0" - src="#{forums:themeURL('resourceReplyNewURL')}" - alt="${resource.Reply_to_topic}" /> + <img border="0" src="#{forums:themeURL('resourceIconEditURL')}"/> </f:verbatim> </h:commandLink> <!-- add the delete post link --> @@ -261,9 +282,7 @@ <f:param name="t" value="#{topic.topic.id}"/> <f:param name="f" value="#{topic.topic.forum.id}"/> <f:verbatim> - <img border="0" - src="#{forums:themeURL('resourceReplyLockedURL')}" - alt="${resource.Topic_locked}" /> + <img border="0" src="#{forums:themeURL('resourceIconDelpostURL')}"/> </f:verbatim> </h:outputLink> </td> @@ -414,15 +433,15 @@ </c:if> <!-- TODO: Status for ICQ. Might be cool for other communicators too.--> <!--<script language="JavaScript" - type="text/javascript">--> + type="text/javascript">--> <!-- - if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 ) - document.write(' ${postrow.ICQ_IMG}'); - else - document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">${postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">${postrow.ICQ_STATUS_IMG}</div></div>'); + if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 ) + document.write(' ${postrow.ICQ_IMG}'); + else + document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">${postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">${postrow.ICQ_STATUS_IMG}</div></div>'); - //--> + //--> <!--</script> <noscript>${postrow.ICQ_IMG}</noscript>--> </td> @@ -436,14 +455,13 @@ </td> </tr> </c:forEach> - - - <!-- TODO: THIS PART OF CODE IS WAITING FOR FORUMSMODULE METHODS NEEDED FOR THIS FEATURE - <tr align="center"> + + <!-- TODO: THIS PART OF CODE IS WAITING FOR FORUMSMODULE METHODS NEEDED FOR THIS FEATURE --> + <!--tr align="center"> <td class="catBottom" colspan="2" height="28"> <table cellspacing="0" cellpadding="0" border="0"> - <tr> - <h:form> + <tr> + <h:form> <td align="center"> <span class="gensmall"> ${resource.Display_posts}: @@ -466,11 +484,12 @@ </td> </h:form> </tr> - </table> + </table> </td> </tr>--> - </table> - </c:if> + + + </table> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> @@ -566,22 +585,70 @@ <h:outputText value="#{topic.topic.subject}"/> </h:outputLink> </td> - <td align="right" valign="top" nowrap="nowrap"> - <br/> - <span class="nav">#{forum.pagination}</span> - </td> + <!-- page navigation --> + <c:if test="#{topic.pageNavigator.totalPages gt 1}"> + <td align="right" valign="middle" nowrap="nowrap"> + <span class="gensmall"></span><br/> + <span class="nav"> + Goto page + <!-- previous link --> + <c:if test="#{topic.pageNavigator.pageNumber gt 1}"> + &nbsp;&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{topic.pageNavigator.currentPage-1}"/> + <h:outputText value="Previous"/> + </h:outputLink> + &nbsp;&nbsp; + </c:if> + <!-- actual pages --> + <c:forEach items="#{topic.pageNavigator.pages}" var="page" varStatus="idx"> + <c:choose> + <c:when test="#{topic.pageNavigator.pageNumber==page}"> + <b>${page}</b> + </c:when> + <c:otherwise> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + </c:otherwise> + </c:choose> + <c:if test="${idx.index-1 ne topic.pageNavigator.totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + <!-- Next link --> + <c:if test="#{topic.pageNavigator.pageNumber lt topic.pageNavigator.totalPages}"> + &nbsp;&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{topic.pageNavigator.currentPage+1}"/> + <h:outputText value="Next"/> + </h:outputLink> + &nbsp;&nbsp; + </c:if> + </span> + </td> + </c:if> </tr> - <tr> - <!-- TODO: PAGE NUMBERING--> - <td align="left" colspan="3"> - <span class="nav"> - <h:outputFormat value="#{resource.PageNumber}" style="text:bold;" > - <f:param value="#{topic.pageNumber}"/> - <f:param value=""/> - </h:outputFormat> - </span> - </td> - </tr> + <!-- the current page number information --> + <c:if test="#{topic.pageNavigator.totalPages gt 1}"> + <tr> + <td>&nbsp;</td> + </tr> + <tr> + <td align="left" colspan="3"> + <span class="nav"> + Page <b>#{topic.pageNavigator.pageNumber}</b> of <b>#{topic.pageNavigator.totalPages}</b> + </span> + </td> + </tr> + <tr> + <td>&nbsp;</td> + </tr> + </c:if> </table> <table width="100%" cellspacing="2" border="0" align="center"> @@ -594,66 +661,107 @@ <br/> </td> --> + + <!-- instant reply widget --> + <!-- TODO: security check needed here to check if "replying" to this topic is allowed --> <script language='JavaScript' type='text/javascript'> - <!-- - function checkForm() - { - formErrors = false; - if (document.post.message.value.length < 2) - { - formErrors = 'Vous devez entrer un message avant de poster.'; - } - if (formErrors) - { - alert(formErrors); - return false; - } - else - { - return true; - } - } - --> - </script> - <!-- TODO: SECURITY CHECK NEEDED--> - <!-- TODO: THIS INSTANT REPLY BOX IS WAITING FOR POSTINGVIEW UPDATE TO SUPPORT REPLYING + function checkForm() + { + formErrors = false; + if (document["post:message"].value.length &lt; 2) + { + formErrors = "${resource.Empty_message}"; + } + if (formErrors) + { + alert(formErrors); + return false; + } + else + { + return true; + } + } + </script> <td> - <h:form name="post" onsubmit="return checkForm(this)" > + <h:form id="post"> + <input type="hidden" name="f" value="#{topic.topic.forum.id}"/> + <input type="hidden" name="t" value="#{topic.topic.id}"/> + <!-- add this reply and navigate to the page that will have this reply --> + <input type="hidden" name="page" value="#{topic.pageNavigator.pageAfterAdd}"/> + <span class="genmed"> <b>${resource.Instant_reply}</b> <br/> <br/> - <h:inputTextarea class="post" name="message" rows="10" cols="50" wrap="virtual"> - </h:inputTextarea> + <h:inputTextarea id="message" value="#{replyTopic.message}" rows="10" cols="50" styleClass="post"></h:inputTextarea> <br/> - <br/> - <input type="hidden" name="f" value="#{newTopic.forumId}"/> - <input type="hidden" name="t" value="#{newTopic.topicId}"/> - <input type="submit" name="preview" class="liteoption" - value='${n:i18n("Preview")}'/> - &nbsp; - <input type="submit" name="post" class="mainoption" - value='${n:i18n("Submit")}'/> + <br/> + <h:commandButton action="#{replyTopic.startInstantReplyPreview}" value="${resource.Preview}" + styleClass="liteoption" onclick="return checkForm();"/> + &nbsp; + <h:commandButton action="#{replyTopic.executeInstantReply}" value="${resource.Submit}" + styleClass="mainoption" onclick="return checkForm();"/> </span> - </form> - </td>--> - <!-- TODO: IN THIS PLACE THE JUMPBOXVIEW SHOULD BE INCLUDED--> + </h:form> + </td> + <!-- integrate jumpbox here --> <td align="right" valign="top" nowrap="nowrap"> - <ui:include src="/views/jumpbox.xhtml"/> - <!--<span class="gensmall">${n:out("S_AUTH_LIST")}</span>--> + <ui:include src="/views/jumpbox.xhtml"/> </td> </tr> - <!-- TODO: SECURITY CHECK NEEDED, REIMPLEMENTATION OF HARDCODED HTML IN PORTLET WHICH NEEDS MODERATOR VIEWS + <!-- TODO: security check needed for the moderator functions integrated into this topic --> <tr> <td> - ${n:out("S_TOPIC_ADMIN")} + &nbsp;<br/> + <a href="" style="text-decoration: none;"> + <img border="0" src="/portal-forums/subSilver/images/topic_delete.gif" alt="Delete this topic" title="Delete this topic"/> + </a>&nbsp; + <a href="" style="text-decoration: none;"> + <img border="0" src="/portal-forums/subSilver/images/topic_move.gif" alt="Move this topic" title="Move this topic"/> + </a>&nbsp; + <c:choose> + <c:when test="#{top... [truncated message content] |
From: <jbo...@li...> - 2006-05-16 04:42:31
|
Author: mic...@jb... Date: 2006-05-16 00:34:09 -0400 (Tue, 16 May 2006) New Revision: 4239 Modified: labs/jbossrules/updates/drools-ide-update/plugins/org.drools.ide_1.0.0.jar Log: RC3 release Modified: labs/jbossrules/updates/drools-ide-update/plugins/org.drools.ide_1.0.0.jar =================================================================== (Binary files differ) |
From: <jbo...@li...> - 2006-05-16 03:14:55
|
Author: mic...@jb... Date: 2006-05-15 23:14:49 -0400 (Mon, 15 May 2006) New Revision: 4238 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Deployment/Section-Deployment.xml Log: updated for out of process deployment Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Deployment/Section-Deployment.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Deployment/Section-Deployment.xml 2006-05-16 02:30:14 UTC (rev 4237) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Deployment/Section-Deployment.xml 2006-05-16 03:14:49 UTC (rev 4238) @@ -101,6 +101,11 @@ deploy remotely, and "bind" rule assets to JNDI as a means of using them in a container environment.</para> </section> + + <para> + Please note that when using package builder, you may want to check the hasError() flag before continuing deploying your rules (if there are errors, you can get them from the package builder - rather then letting it fail later on when you try to deploy). + </para> + </section> <section> @@ -123,6 +128,10 @@ system can have minimal dependencies (just one jar). It also means that any errors to do with compiling are well contained and and known before deployment to the running system is attempted.</para> + + <para> + Use the PackageBuilder class out of process, and then use getPackage() to get the Package object. You can then (for example) serialize the Package object to a file (using standard java serialization). The runtime system, which only needs drools-core, can then load the file using RuleBaseFactory.newRuleBase().addPackage(deserialized package object). + </para> </section> <section> |
From: <jbo...@li...> - 2006-05-16 02:30:18
|
Author: mic...@jb... Date: 2006-05-15 22:30:14 -0400 (Mon, 15 May 2006) New Revision: 4237 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Decision_Tables/Section-Spreadsheet.xml Log: typos Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Decision_Tables/Section-Spreadsheet.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Decision_Tables/Section-Spreadsheet.xml 2006-05-16 02:20:24 UTC (rev 4236) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Decision_Tables/Section-Spreadsheet.xml 2006-05-16 02:30:14 UTC (rev 4237) @@ -348,9 +348,9 @@ <entry>XOR-GROUP</entry> <entry>Cell values in this column mean that the rule-row belongs - to the given XOR/activation group group. An Xor group means that - only one rule in the named group will fire (ie the first one to - fire cancels the other rules activations).</entry> + to the given XOR/activation group . An Activation group means + that only one rule in the named group will fire (ie the first + one to fire cancels the other rules activations).</entry> <entry>optional</entry> </row> |
From: <jbo...@li...> - 2006-05-16 02:20:30
|
Author: mic...@jb... Date: 2006-05-15 22:20:24 -0400 (Mon, 15 May 2006) New Revision: 4236 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-Working_Memory.xml Log: updated logicals Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-Working_Memory.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-Working_Memory.xml 2006-05-16 00:14:59 UTC (rev 4235) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Engine/Section-Working_Memory.xml 2006-05-16 02:20:24 UTC (rev 4236) @@ -31,6 +31,10 @@ a fact, it is examined for matches against the rules etc. However, no actions are taken until you call "fireAllRules()" after you have finished asserting your facts.</para> + + <para>Drools uses an IdentityHashMap – if an instance is asserted twice + then it returns the previous fact handle – i.e. it ignores the second + assertion for the same fact. Once </para> </section> <section> @@ -54,38 +58,70 @@ <section> <title><indexterm> - <primary>Logical Assertion</primary></indexterm> - </title> + <primary>Logical Assertion</primary> + </indexterm></title> - <para> - In a regular assertion, you need to explicitly retract a fact. In logical assertions, the fact that was asserted will be automatically retracted when - the conditions that asserted it in the first place are no longer true (its actually cleverer then this, if there are no possible conditions that could support the logical assertion, only then will it be retracted). - </para> + <para>In a regular assertion, you need to explicitly retract a fact. In + logical assertions, the fact that was asserted will be automatically + retracted when the conditions that asserted it in the first place are no + longer true (its actually cleverer then this, if there are no possible + conditions that could support the logical assertion, only then will it be + retracted).</para> - <para> - This sounds confusing but its not really. Logical assertions are a powerful form of truth maintenance. A logically asserted fact can be thought of as a proxy for all the conditions that cause the rule it belongs to to be true. This means that you can use a logically asserted fact in a condition in other rules, without including all the conditions that triggered the logical assertion (meaning that all those conditions are not repeated everywhere). Logically asserted facts are like other facts, nothing special, you can even use "not" to check for the non existance of a logically asserted fact. - </para> + <para>This sounds confusing but its not really. Logical assertions are a + powerful form of truth maintenance. A logically asserted fact can be + thought of as a proxy for all the conditions that cause the rule it + belongs to to be true. This means that you can use a logically asserted + fact in a condition in other rules, without including all the conditions + that triggered the logical assertion (meaning that all those conditions + are not repeated everywhere). Logically asserted facts are like other + facts, nothing special, you can even use "not" to check for the non + existance of a logically asserted fact.</para> - <section> - <title>Example scenario</title> - <para> - An example may make things clearer. - Imagine a credit card processing application, processing transactions for a given account (and we have a working memory accumulating knowledge about a single accounts transaction). The rule engine is doing its best to decide if transactions are possibly fraudulent or not. Imagine this rule base basically has rules that kick in when there is "reason to be suspicious" and when "everything is normal". </para> - <para> - Of course there are many rules that operate no matter what (performing standard calculations etc). - Now there are possibly many reasons as to what could trigger a "reason to be suspicious": someone notifying the bank, a sequence of large transactions, transactions for geographically disparate transactions, or even reports of credit card theft. Rather then smattering all the little conditions in lots of rules, imagine there is a fact class called "SuspiciousAccount". </para> - <para> - Then there can be a series of rules whose job is to look for things that may raise suspicion, and if they fire, they simply assert a new SuspiciousAccount() instance. All the other rules just have conditions like "not SuspiciousAccount()" or "SuspiciousAccount()" depending on their needs. Note that this has the advantage of allowing there to be many rules around raising suspicion, without touching the other rules. When the facts causing the SuspiciousAccount() assertion are removed, the rule engine reverts back to the normal "mode" of operation (and for instance, a rule with "not SuspiciousAccount()" may kick in which flushes through any interrupted transactions). - </para> - <para> - If you have followed this far, you will note that truth maintenance like logical assertions allows rules to behave a little like a human would, and can certainly make the rules more managable. - </para> + <para>Normal assertions are said to be “STATED” (ie The Fact has been + stated - just like the intuitive concept). You cannot logically assert + fact, that is already STATED (it has no effect - it only needs to be + STATED once that is). If you logically assert something and then later + normally assert the same fact then that the fact that was logically + asserted is changed to STATED (ie becomes a normal non logically asserted + fact). </para> - </section> - </section> + <section> + <title>Example scenario</title> + <para>An example may make things clearer. Imagine a credit card + processing application, processing transactions for a given account (and + we have a working memory accumulating knowledge about a single accounts + transaction). The rule engine is doing its best to decide if + transactions are possibly fraudulent or not. Imagine this rule base + basically has rules that kick in when there is "reason to be suspicious" + and when "everything is normal".</para> + <para>Of course there are many rules that operate no matter what + (performing standard calculations etc). Now there are possibly many + reasons as to what could trigger a "reason to be suspicious": someone + notifying the bank, a sequence of large transactions, transactions for + geographically disparate transactions, or even reports of credit card + theft. Rather then smattering all the little conditions in lots of + rules, imagine there is a fact class called "SuspiciousAccount".</para> + <para>Then there can be a series of rules whose job is to look for + things that may raise suspicion, and if they fire, they simply assert a + new SuspiciousAccount() instance. All the other rules just have + conditions like "not SuspiciousAccount()" or "SuspiciousAccount()" + depending on their needs. Note that this has the advantage of allowing + there to be many rules around raising suspicion, without touching the + other rules. When the facts causing the SuspiciousAccount() assertion + are removed, the rule engine reverts back to the normal "mode" of + operation (and for instance, a rule with "not SuspiciousAccount()" may + kick in which flushes through any interrupted transactions).</para> + + <para>If you have followed this far, you will note that truth + maintenance like logical assertions allows rules to behave a little like + a human would, and can certainly make the rules more managable.</para> + </section> + </section> + <section> <title>Globals</title> |
From: <jbo...@li...> - 2006-05-16 00:15:09
|
Author: mic...@jb... Date: 2006-05-15 20:14:59 -0400 (Mon, 15 May 2006) New Revision: 4235 Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.png labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.svg Log: changed to activation-group Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml 2006-05-15 21:38:40 UTC (rev 4234) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/Section-Rule.xml 2006-05-16 00:14:59 UTC (rev 4235) @@ -174,15 +174,21 @@ </section> <section> - <title>xor-group</title> + <title>activation-group</title> <para>default value N/A</para> <para>type : String</para> - <para>Rules that belong to the same named xor-group will only fire exclusively. - In other words, the first rule in an xor-group to fire will cancel the other rules activations (stop them from firing). - The Xor group attribute is any string, as long as the string is identical for all the rules you need to be in the one group.</para> + <para>Rules that belong to the same named activation-group will only + fire exclusively. In other words, the first rule in an activation-group + to fire will cancel the other rules activations (stop them from firing). + The Activtion group attribute is any string, as long as the string is + identical for all the rules you need to be in the one group.</para> + + <para>NOTE: this used to be called Xor group, but technically its not + quite an Xor, but you may hear people mention Xor group, just swap that + term in your mind with activation-group.</para> </section> <section> Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.png =================================================================== (Binary files differ) Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.svg =================================================================== --- labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.svg 2006-05-15 21:38:40 UTC (rev 4234) +++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Rule_Language/rule_attributes.svg 2006-05-16 00:14:59 UTC (rev 4235) @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <!-- Generated by Microsoft Visio 11.0, SVG Export, v1.0 rule_attributes.svg Page-1 --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="3.90316in" - height="1.86039in" viewBox="0 0 281.028 133.948" xml:space="preserve" color-interpolation-filters="sRGB" class="st6"> - <v:documentProperties v:langID="1033" v:metric="true"/> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="3.71024in" + height="1.85852in" viewBox="0 0 267.137 133.813" xml:space="preserve" color-interpolation-filters="sRGB" class="st6"> + <v:documentProperties v:langID="1033" v:metric="true" v:viewMarkup="false"/> <style type="text/css"> <![CDATA[ .st1 {fill:#e8eef7;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24} .st2 {fill:#000000;font-family:Arial;font-size:0.666664em} .st3 {marker-end:url(#mrkr2-12);stroke:#4677bf;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24} - .st4 {fill:#4677bf;fill-opacity:1;stroke:#4677bf;stroke-opacity:1;stroke-width:0.08695656915758} + .st4 {fill:#4677bf;fill-opacity:1;stroke:#4677bf;stroke-opacity:1;stroke-width:0.086956386131125} .st5 {fill:#000000;font-family:Arial;font-size:0.666664em;font-style:italic} .st6 {fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-linecap:square;stroke-miterlimit:3} ]]> @@ -20,18 +20,18 @@ <g id="lend2"> <path d="M 1 1 L 0 0 L 1 -1 L 1 1 " style="stroke:none"/> </g> - <marker id="mrkr2-12" class="st4" v:arrowType="2" v:arrowSize="2" v:setback="11.5" refX="-11.499993728913" orient="auto" + <marker id="mrkr2-12" class="st4" v:arrowType="2" v:arrowSize="2" v:setback="0" refX="-0" orient="auto" markerUnits="strokeWidth"> - <use xlink:href="#lend2" transform="scale(-11.499993728913,-11.499993728913) "/> + <use xlink:href="#lend2" transform="scale(-11.500017934187,-11.500017934187) "/> </marker> </defs> <g v:mID="0" v:index="1" v:groupContext="foregroundPage"> <title>Page-1</title> - <v:pageProperties v:drawingScale="0.0393701" v:pageScale="0.0393701" v:drawingUnits="24" v:shadowOffsetX="8.50395" - v:shadowOffsetY="-8.50395"/> + <v:pageProperties v:drawingScale="0.0393701" v:pageScale="0.0393701" v:drawingUnits="24" v:shadowOffsetX="8.50394" + v:shadowOffsetY="-8.50394"/> <v:layer v:name="Flowchart" v:index="0"/> <v:layer v:name="Connector" v:index="1"/> - <g id="shape1-1" v:mID="1" v:groupContext="shape" v:layerMember="0" transform="translate(64.9006,-104.813)"> + <g id="shape1-1" v:mID="1" v:groupContext="shape" v:layerMember="0" transform="translate(64.9003,-104.673)"> <title>Process.89</title> <desc>‘no-loop’</desc> <v:custProps> @@ -42,13 +42,13 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="23.2135" cy="127.24" width="46.44" height="13.4147"/> - <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L43.59 133.95 A2.83472 2.83472 -180 0 0 46.43 131.11 L46.43 - 123.37 A2.83472 2.83472 -180 0 0 43.59 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="23.2135" cy="127.103" width="46.44" height="13.4147"/> + <path d="M-0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L43.59 133.81 A2.83472 2.83472 -180 0 0 46.43 130.97 L46.43 + 123.23 A2.83472 2.83472 -180 0 0 43.59 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 -0 123.23 L0 130.97 Z" class="st1"/> - <text x="8.1" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘no-loop’</text> </g> - <g id="shape2-4" v:mID="2" v:groupContext="shape" v:layerMember="0" transform="translate(65.1969,-85.7979)"> + <text x="8.1" y="129.5" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘no-loop’</text> </g> + <g id="shape2-4" v:mID="2" v:groupContext="shape" v:layerMember="0" transform="translate(65.1966,-85.6582)"> <title>Process.90</title> <desc>‘salience’</desc> <v:custProps> @@ -59,22 +59,22 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="23.2135" cy="127.24" width="46.44" height="13.4147"/> - <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L43.59 133.95 A2.83472 2.83472 -180 0 0 46.43 131.11 L46.43 - 123.37 A2.83472 2.83472 -180 0 0 43.59 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="23.2135" cy="127.103" width="46.44" height="13.4147"/> + <path d="M-0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L43.59 133.81 A2.83472 2.83472 -180 0 0 46.43 130.97 L46.43 + 123.23 A2.83472 2.83472 -180 0 0 43.59 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 -0 123.23 L0 130.97 Z" class="st1"/> - <text x="6.77" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘salience’</text> </g> - <g id="shape3-7" v:mID="3" v:groupContext="shape" v:layerMember="1" transform="translate(11.978,-111.521)"> + <text x="6.77" y="129.5" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘salience’</text> </g> + <g id="shape3-7" v:mID="3" v:groupContext="shape" v:layerMember="1" transform="translate(11.9778,-111.381)"> <title>Dynamic connector.91</title> - <path d="M0 133.95 L50.16 133.95 L50.16 133.95" class="st3"/> + <path d="M0 133.81 L50.16 133.81 L52.92 133.81" class="st3"/> </g> - <g id="shape4-13" v:mID="4" v:groupContext="shape" v:layerMember="1" transform="translate(18.3208,-92.126)"> + <g id="shape4-13" v:mID="4" v:groupContext="shape" v:layerMember="1" transform="translate(18.3206,-91.9863)"> <title>Dynamic connector.92</title> - <path d="M0 114.56 L11.71 114.56 A5.70532 4.01385 0 0 1 17.42 118.57 L17.42 129.93 A5.70532 4.01385 -180 0 0 23.13 133.95 - L44.1 133.95 L44.12 133.95" class="st3"/> + <path d="M0 114.42 L11.71 114.42 A5.70531 4.01384 180 0 1 17.42 118.43 L17.42 129.79 A5.70531 4.01384 -0 0 0 23.13 133.81 + L44.1 133.81 L44.12 133.81 L46.88 133.81" class="st3"/> </g> - <g id="shape5-18" v:mID="5" v:groupContext="shape" v:layerMember="0" transform="translate(51.0236,-68.79)"> + <g id="shape5-18" v:mID="5" v:groupContext="shape" v:layerMember="0" transform="translate(51.0233,-68.6503)"> <title>Process.93</title> <desc>‘agenda-group’</desc> <v:custProps> @@ -85,13 +85,13 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="36.8639" cy="127.24" width="73.74" height="13.4147"/> - <path d="M-0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L70.89 133.95 A2.83472 2.83472 -180 0 0 73.73 131.11 L73.73 - 123.37 A2.83472 2.83472 -180 0 0 70.89 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 0 123.37 L0 131.11 + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="36.8638" cy="127.103" width="73.74" height="13.4147"/> + <path d="M-0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L70.89 133.81 A2.83472 2.83472 -180 0 0 73.73 130.97 L73.73 + 123.23 A2.83472 2.83472 -180 0 0 70.89 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 0 123.23 L0 130.97 Z" class="st1"/> - <text x="10.19" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘agenda-group’</text> </g> - <g id="shape6-21" v:mID="6" v:groupContext="shape" v:layerMember="0" transform="translate(58.5294,-0.75852)"> + <text x="10.18" y="129.5" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘agenda-group’</text> </g> + <g id="shape6-21" v:mID="6" v:groupContext="shape" v:layerMember="0" transform="translate(58.5291,-0.618942)"> <title>Process.94</title> <desc>‘duration’</desc> <v:custProps> @@ -102,41 +102,41 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="29.3444" cy="127.24" width="58.7" height="13.4147"/> - <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L55.85 133.95 A2.83472 2.83472 -180 0 0 58.69 131.11 L58.69 - 123.37 A2.83472 2.83472 -180 0 0 55.85 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="29.3443" cy="127.103" width="58.7" height="13.4147"/> + <path d="M0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L55.85 133.81 A2.83472 2.83472 -180 0 0 58.69 130.97 L58.69 + 123.23 A2.83472 2.83472 -180 0 0 55.85 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 0 123.23 L0 130.97 Z" class="st1"/> - <text x="13.12" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘duration’</text> </g> - <g id="shape7-24" v:mID="7" v:groupContext="shape" v:layerMember="1" transform="translate(18.3208,-76.5354)"> + <text x="13.11" y="129.5" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘duration’</text> </g> + <g id="shape7-24" v:mID="7" v:groupContext="shape" v:layerMember="1" transform="translate(18.3206,-76.3957)"> <title>Dynamic connector.95</title> - <path d="M0 98.97 L11.64 98.97 A5.66929 3.62108 0 0 1 17.31 102.59 L17.31 130.33 A5.66929 3.62108 -180 0 0 22.98 133.95 - L30.17 133.95 L30.17 133.95" class="st3"/> + <path d="M0 98.83 L11.64 98.83 A5.66928 3.62107 180 0 1 17.31 102.45 L17.31 130.19 A5.66928 3.62107 -0 0 0 22.98 133.81 + L30.17 133.81 L32.93 133.81" class="st3"/> </g> - <g id="shape8-29" v:mID="8" v:groupContext="shape" v:layerMember="1" transform="translate(18.3208,-7.088)"> + <g id="shape8-29" v:mID="8" v:groupContext="shape" v:layerMember="1" transform="translate(18.3206,-6.94841)"> <title>Dynamic connector.96</title> - <path d="M0 29.52 L11.64 29.52 A5.66929 5.66929 0 0 1 17.31 35.19 L17.31 128.28 A5.66929 5.66929 -180 0 0 22.98 133.95 - L37.69 133.95 L37.69 133.95" class="st3"/> + <path d="M0 29.38 L11.64 29.38 A5.66928 5.66928 0 0 1 17.31 35.05 L17.31 128.14 A5.66928 5.66928 -180 0 0 22.98 133.81 + L37.69 133.81 L40.45 133.81" class="st3"/> </g> - <g id="shape9-34" v:mID="9" v:groupContext="shape" v:layerMember="1" transform="translate(111.328,-111.525)"> + <g id="shape9-34" v:mID="9" v:groupContext="shape" v:layerMember="1" transform="translate(111.328,-111.385)"> <title>Dynamic connector.98</title> - <path d="M0 133.95 L32.06 133.95 L32.06 133.95" class="st3"/> + <path d="M0 133.81 L32.06 133.81 L34.82 133.81" class="st3"/> </g> - <g id="shape10-39" v:mID="10" v:groupContext="shape" v:layerMember="1" transform="translate(117.459,-7.088)"> + <g id="shape10-39" v:mID="10" v:groupContext="shape" v:layerMember="1" transform="translate(117.459,-6.94841)"> <title>Dynamic connector.99</title> - <path d="M0 133.95 L25.13 133.95 L25.13 133.95" class="st3"/> + <path d="M0 133.81 L25.13 133.81 L27.89 133.81" class="st3"/> </g> - <g id="shape11-44" v:mID="11" v:groupContext="shape" v:layerMember="1" transform="translate(111.328,-93.5433)"> + <g id="shape11-44" v:mID="11" v:groupContext="shape" v:layerMember="1" transform="translate(111.328,-93.4036)"> <title>Dynamic connector.100</title> - <path d="M0 133.95 L9.6 133.95 A5.66929 3.72082 -180 0 0 15.27 130.23 L15.27 119.69 A5.66929 3.72082 0 0 1 20.94 115.97 - L58.66 115.97 L58.66 115.97" class="st3"/> + <path d="M0 133.81 L9.6 133.81 A5.66928 3.72081 -0 0 0 15.27 130.09 L15.27 119.55 A5.66928 3.72081 180 0 1 20.94 115.83 + L58.66 115.83 L61.42 115.83" class="st3"/> </g> - <g id="shape12-49" v:mID="12" v:groupContext="shape" v:layerMember="1" transform="translate(124.978,-76.5354)"> + <g id="shape12-49" v:mID="12" v:groupContext="shape" v:layerMember="1" transform="translate(124.978,-76.3957)"> <title>Dynamic connector.101</title> - <path d="M0 133.95 L5.31 133.95 A5.31496 3.39447 -180 0 0 10.63 130.55 L10.63 102.33 A5.27187 3.36695 0 0 1 15.9 98.96 - L18.41 98.96 L18.41 98.96" class="st3"/> + <path d="M0 133.81 L5.31 133.81 A5.31495 3.39446 -0 0 0 10.63 130.41 L10.63 102.19 A5.27186 3.36694 180 0 1 15.9 98.82 + L18.41 98.82 L21.17 98.82" class="st3"/> </g> - <g id="shape13-54" v:mID="13" v:groupContext="shape" v:layerMember="0" transform="translate(146.152,-104.813)"> + <g id="shape13-54" v:mID="13" v:groupContext="shape" v:layerMember="0" transform="translate(146.152,-104.673)"> <title>Process.156</title> <desc>value</desc> <v:custProps> @@ -147,20 +147,20 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="18.4974" cy="127.24" width="37.01" height="13.4147"/> - <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L34.16 133.95 A2.83472 2.83472 -180 0 0 37 131.11 L37 123.37 - A2.83472 2.83472 -180 0 0 34.16 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 0 123.37 L0 131.11 Z" + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="18.4974" cy="127.103" width="37.01" height="13.4147"/> + <path d="M0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L34.16 133.81 A2.83472 2.83472 -180 0 0 37 130.97 L37 123.23 + A2.83472 2.83472 -180 0 0 34.16 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 0 123.23 L0 130.97 Z" class="st1"/> - <text x="8.93" y="129.64" class="st5" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>value</text> </g> - <g id="shape14-57" v:mID="14" v:groupContext="shape" v:layerMember="1;0" transform="translate(255.158,-105.649)"> + <text x="8.93" y="129.5" class="st5" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>value</text> </g> + <g id="shape14-57" v:mID="14" v:groupContext="shape" v:layerMember="1;0" transform="translate(255.157,-105.509)"> <title>On-page reference.157</title> <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <path d="M0 128.08 A5.87 5.87 0 1 1 11.74 128.08 A5.87 5.87 0 1 1 0 128.08 Z" class="st1"/> + <path d="M0 127.94 A5.86999 5.86999 0 0 1 11.74 127.94 A5.86999 5.86999 0 0 1 0 127.94 Z" class="st1"/> </g> - <g id="shape15-59" v:mID="15" v:groupContext="shape" v:layerMember="0" transform="translate(206.89,-120.293)"> + <g id="shape15-59" v:mID="15" v:groupContext="shape" v:layerMember="0" transform="translate(206.889,-120.153)"> <title>Process.160</title> <desc>;</desc> <v:custProps> @@ -171,34 +171,34 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="10.0608" cy="127.24" width="20.14" height="13.4147"/> - <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L17.29 133.95 A2.83472 2.83472 -180 0 0 20.12 131.11 L20.12 - 123.37 A2.83472 2.83472 -180 0 0 17.29 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="10.0608" cy="127.103" width="20.14" height="13.4147"/> + <path d="M0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L17.29 133.81 A2.83472 2.83472 -180 0 0 20.12 130.97 L20.12 + 123.23 A2.83472 2.83472 -180 0 0 17.29 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 -0 123.23 L0 130.97 Z" class="st1"/> - <text x="8.96" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>;</text> </g> - <g id="shape16-62" v:mID="16" v:groupContext="shape" v:layerMember="1" transform="translate(183.147,-111.518)"> + <text x="8.95" y="129.5" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>;</text> </g> + <g id="shape16-62" v:mID="16" v:groupContext="shape" v:layerMember="1" transform="translate(183.147,-111.378)"> <title>Dynamic connector.161</title> - <path d="M0 133.95 L5.31 133.95 A5.31496 5.31496 -180 0 0 10.63 128.63 L10.63 124.14 A5.66929 5.66929 0 0 1 16.3 118.47 - L20.98 118.47 L20.98 118.47" class="st3"/> + <path d="M0 133.81 L5.31 133.81 A5.31495 5.31495 -180 0 0 10.63 128.49 L10.63 124 A5.66928 5.66928 0 0 1 16.3 118.33 + L20.98 118.33 L23.74 118.33" class="st3"/> </g> - <g id="shape17-67" v:mID="17" v:groupContext="shape" v:layerMember="1" transform="translate(227.012,-111.518)"> + <g id="shape17-67" v:mID="17" v:groupContext="shape" v:layerMember="1" transform="translate(227.011,-111.378)"> <title>Dynamic connector.162</title> - <path d="M0 118.47 L5.31 118.47 A5.31496 5.31496 0 0 1 10.63 123.78 L10.63 128.28 A5.66929 5.66929 -180 0 0 16.3 133.95 - L25.39 133.95 L25.39 133.95" class="st3"/> + <path d="M0 118.33 L5.31 118.33 A5.31495 5.31495 0 0 1 10.63 123.64 L10.63 128.14 A5.66928 5.66928 -180 0 0 16.3 133.81 + L25.39 133.81 L28.15 133.81" class="st3"/> </g> - <g id="shape18-72" v:mID="18" v:groupContext="shape" v:layerMember="1" transform="translate(183.147,-111.521)"> + <g id="shape18-72" v:mID="18" v:groupContext="shape" v:layerMember="1" transform="translate(183.147,-111.381)"> <title>Dynamic connector.163</title> - <path d="M0 133.95 L69.25 133.95 L69.25 133.95" class="st3"/> + <path d="M0 133.81 L69.25 133.81 L72.01 133.81" class="st3"/> </g> - <g id="shape19-77" v:mID="19" v:groupContext="shape" v:layerMember="1;0" transform="translate(0.240176,-105.649)"> + <g id="shape19-77" v:mID="19" v:groupContext="shape" v:layerMember="1;0" transform="translate(0.24,-105.509)"> <title>On-page reference.164</title> <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <path d="M0 128.08 A5.87 5.87 0 0 1 11.74 128.08 A5.87 5.87 0 1 1 0 128.08 Z" class="st1"/> + <path d="M0 127.94 A5.86999 5.86999 0 0 1 11.74 127.94 A5.86999 5.86999 0 0 1 0 127.94 Z" class="st1"/> </g> - <g id="shape20-79" v:mID="20" v:groupContext="shape" v:layerMember="0" transform="translate(145.346,-0.379582)"> + <g id="shape20-79" v:mID="20" v:groupContext="shape" v:layerMember="0" transform="translate(145.346,-0.240005)"> <title>Process.201</title> <desc>duration-value (ms)</desc> <v:custProps> @@ -209,17 +209,17 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="48.6281" cy="127.24" width="97.27" height="13.4147"/> - <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L94.42 133.95 A2.83472 2.83472 -180 0 0 97.26 131.11 L97.26 - 123.37 A2.83472 2.83472 -180 0 0 94.42 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 -0 123.37 L0 131.11 + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="48.628" cy="127.103" width="97.27" height="13.4147"/> + <path d="M-0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L94.42 133.81 A2.83472 2.83472 -180 0 0 97.26 130.97 L97.26 + 123.23 A2.83472 2.83472 -180 0 0 94.42 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 0 123.23 L0 130.97 Z" class="st1"/> - <text x="14.17" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>duration-value (ms)</text> </g> - <g id="shape21-82" v:mID="21" v:groupContext="shape" v:layerMember="1" transform="translate(242.602,-7.08461)"> + <text x="14.16" y="129.5" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>duration-value (ms)</text> </g> + <g id="shape21-82" v:mID="21" v:groupContext="shape" v:layerMember="1" transform="translate(242.601,-6.94502)"> <title>Dynamic connector.202</title> - <path d="M0 133.95 L12.76 133.95 A5.66929 5.66929 -180 0 0 18.43 128.28 L18.43 38.14 L18.43 38.14" class="st3"/> + <path d="M0 133.81 L12.76 133.81 A5.66928 5.66928 -180 0 0 18.43 128.14 L18.43 38 L18.43 35.24" class="st3"/> </g> - <g id="shape22-87" v:mID="22" v:groupContext="shape" v:layerMember="0" transform="translate(51.0236,-51.7821)"> + <g id="shape22-87" v:mID="22" v:groupContext="shape" v:layerMember="0" transform="translate(51.0233,-51.6424)"> <title>Process.60</title> <desc>‘auto-focus’</desc> <v:custProps> @@ -230,23 +230,23 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="36.8639" cy="127.24" width="73.74" height="13.4147"/> - <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L70.89 133.95 A2.83472 2.83472 -180 0 0 73.73 131.11 L73.73 - 123.37 A2.83472 2.83472 -180 0 0 70.89 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 0 123.37 L0 131.11 + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="36.8638" cy="127.103" width="73.74" height="13.4147"/> + <path d="M-0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L70.89 133.81 A2.83472 2.83472 -180 0 0 73.73 130.97 L73.73 + 123.23 A2.83472 2.83472 -180 0 0 70.89 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 -0 123.23 L0 130.97 Z" class="st1"/> - <text x="16.42" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘auto-focus’</text> </g> - <g id="shape23-90" v:mID="23" v:groupContext="shape" v:layerMember="1" transform="translate(11.978,-59.5276)"> + <text x="16.41" y="129.5" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘auto-focus’</text> </g> + <g id="shape23-90" v:mID="23" v:groupContext="shape" v:layerMember="1" transform="translate(11.9778,-59.3879)"> <title>Dynamic connector.61</title> - <path d="M0 81.96 L18.19 81.96 A5.66929 3.71689 0 0 1 23.86 85.67 L23.86 130.23 A5.66929 3.71689 -180 0 0 29.53 133.95 - L36.72 133.95 L36.72 133.95" class="st3"/> + <path d="M0 81.82 L18.19 81.82 A5.66928 3.71688 180 0 1 23.86 85.53 L23.86 130.09 A5.66928 3.71688 -0 0 0 29.53 133.81 + L36.72 133.81 L39.48 133.81" class="st3"/> </g> - <g id="shape24-95" v:mID="24" v:groupContext="shape" v:layerMember="1" transform="translate(125.187,-56.6929)"> + <g id="shape24-95" v:mID="24" v:groupContext="shape" v:layerMember="1" transform="translate(125.187,-56.5532)"> <title>Dynamic connector.62</title> - <path d="M0 133.95 L5.31 133.95 A5.31496 3.67451 -180 0 0 10.63 130.27 L10.63 82.69 A5.16762 3.57265 0 0 1 15.8 79.12 - L18.21 79.12 L18.21 79.12" class="st3"/> + <path d="M0 133.81 L5.31 133.81 A5.31495 3.6745 -0 0 0 10.63 130.13 L10.63 82.55 A5.16761 3.57264 180 0 1 15.8 78.98 + L18.21 78.98 L20.97 78.98" class="st3"/> </g> - <g id="shape25-100" v:mID="25" v:groupContext="shape" v:layerMember="0" transform="translate(52.4409,-31.1811)"> + <g id="shape25-100" v:mID="25" v:groupContext="shape" v:layerMember="0" transform="translate(52.4406,-31.0415)"> <title>Process.25</title> <desc>‘auto-focus’</desc> <v:custProps> @@ -257,21 +257,21 @@ <v:userDefs> <v:ud v:nameU="visVersion" v:val="VT0(11):26"/> </v:userDefs> - <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5197"/> - <v:textRect cx="36.8639" cy="127.24" width="73.74" height="13.4147"/> - <path d="M0 131.11 A2.83472 2.83472 -180 0 0 2.83 133.95 L70.89 133.95 A2.83472 2.83472 -180 0 0 73.73 131.11 L73.73 - 123.37 A2.83472 2.83472 -180 0 0 70.89 120.53 L2.83 120.53 A2.83472 2.83472 -180 0 0 0 123.37 L0 131.11 + <v:textBlock v:margins="rect(2,2,2,2)" v:tabSpace="42.5196"/> + <v:textRect cx="36.8638" cy="127.103" width="73.74" height="13.4147"/> + <path d="M0 130.97 A2.83472 2.83472 -180 0 0 2.83 133.81 L70.89 133.81 A2.83472 2.83472 -180 0 0 73.73 130.97 L73.73 + 123.23 A2.83472 2.83472 -180 0 0 70.89 120.39 L2.83 120.39 A2.83472 2.83472 -180 0 0 -0 123.23 L0 130.97 Z" class="st1"/> - <text x="17.98" y="129.64" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘xor-group’</text> </g> - <g id="shape26-103" v:mID="26" v:groupContext="shape" v:layerMember="1" transform="translate(11.7798,-36.8504)"> + <text x="6.63" y="129.5" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>‘activation-group’</text> </g> + <g id="shape26-103" v:mID="26" v:groupContext="shape" v:layerMember="1" transform="translate(11.7796,-36.7108)"> <title>Dynamic connector.26</title> - <path d="M0 59.28 L18.19 59.28 A5.66929 5.33812 0 0 1 23.86 64.62 L23.86 128.61 A5.66929 5.33812 -180 0 0 29.53 133.95 - L36.72 133.95 L36.72 133.95" class="st3"/> + <path d="M0 59.14 L18.19 59.14 A5.66928 5.33811 180 0 1 23.86 64.48 L23.86 128.47 A5.66928 5.33811 -0 0 0 29.53 133.81 + L36.72 133.81 L39.48 133.81" class="st3"/> </g> - <g id="shape27-108" v:mID="27" v:groupContext="shape" v:layerMember="1" transform="translate(125.197,-41.1024)"> + <g id="shape27-108" v:mID="27" v:groupContext="shape" v:layerMember="1" transform="translate(125.197,-40.9628)"> <title>Dynamic connector.27</title> - <path d="M0 133.95 L5.31 133.95 A5.31496 4.74969 -180 0 0 10.63 129.19 L10.63 67.69 A5.16762 4.61802 0 0 1 15.8 63.08 - L18.21 63.08 L18.21 63.08" class="st3"/> + <path d="M0 133.81 L5.31 133.81 A5.31495 4.74968 -0 0 0 10.63 129.05 L10.63 67.55 A5.16761 4.61801 180 0 1 15.8 62.94 + L18.21 62.94 L20.97 62.94" class="st3"/> </g> </g> </svg> |
From: <jbo...@li...> - 2006-05-15 21:39:05
|
Author: szimano Date: 2006-05-15 17:38:40 -0400 (Mon, 15 May 2006) New Revision: 4234 Added: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/SendNotificationPlugin.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/WikiTypes.xml labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/AdminSimpleCredentials.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/Credentials.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/JBossPortalCredentials.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/SimpleCredentials.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiCommon.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiEngine.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiPage.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/ATOMPlugin.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/HTMLTranslatorParts.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/RDFPlugin.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/RSSPlugin.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/DictionaryTest.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/GetSavePageTest.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/PageModsTest.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/SubPagesTest.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/TestCredentials.java labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/WikiTest.java Log: JBWIKI-87 Added plugin for user, changed a little bit postedit processing (added wikisession there) Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/forge-wiki/src/java/org/jboss/wiki/WikiPortlet.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -34,6 +34,7 @@ import javax.portlet.ActionResponse; import javax.portlet.GenericPortlet; import javax.portlet.PortletException; +import javax.portlet.PortletSession; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; @@ -317,7 +318,8 @@ edPage.save(credentials, Integer .valueOf((String) convertedParameters .get("editSessionId")), - (String) convertedParameters.get("language")); + (String) convertedParameters.get("language"), + new PortletWikiSession(rReq.getPortletSession())); } catch (NumberFormatException e) { log.error(e); } catch (EditSessionExpired e) { @@ -367,15 +369,7 @@ + ((rReq.getServerPort() == 80) ? "" : ":" + rReq.getServerPort()); - // prepare some data for plugins in session - rReq.getPortletSession().setAttribute(WikiSession.CREDENTIALS, - credentials); - rReq.getPortletSession() - .setAttribute(WikiSession.HOST_URL, hostURL); - rReq.getPortletSession().setAttribute(WikiSession.ACTION_URL, - wikiURL); - rReq.getPortletSession().setAttribute(WikiSession.IS_SECURE, - new Boolean(rReq.isSecure())); + prepareSession(rReq.getPortletSession(), credentials, hostURL, wikiURL, rReq.isSecure()); /* * WikiPage noSuchPage = new WikiPage("", credentials, "There is no @@ -629,4 +623,13 @@ throw (e); } } + + private void prepareSession(PortletSession portletSession, + Credentials credentials, String hostURL, String wikiURL, Boolean isSecure) { + // prepare some data for plugins in session + portletSession.setAttribute(WikiSession.CREDENTIALS, credentials); + portletSession.setAttribute(WikiSession.HOST_URL, hostURL); + portletSession.setAttribute(WikiSession.ACTION_URL, wikiURL); + portletSession.setAttribute(WikiSession.IS_SECURE, isSecure); + } } \ No newline at end of file Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/WikiTypes.xml =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/WikiTypes.xml 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/etc/WikiTypes.xml 2006-05-15 21:38:40 UTC (rev 4234) @@ -13,6 +13,10 @@ <class>org.jboss.wiki.plugins.TrailPlugin</class> </plugin> <plugin> + <name>watchList</name> + <class>org.jboss.wiki.plugins.WatchListPlugin</class> + </plugin> + <plugin> <name>subPagesList</name> <class>org.jboss.wiki.plugins.SubpagesListPlugin</class> </plugin> @@ -140,6 +144,10 @@ <name>updateRefs</name> <class>org.jboss.wiki.plugins.UpdateRefs</class> </plugin> + <plugin> + <name>sendNotifications</name> + <class>org.jboss.wiki.plugins.SendNotificationPlugin</class> + </plugin> </wikiType> <wikiType> <name>admin</name> Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/AdminSimpleCredentials.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/AdminSimpleCredentials.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/AdminSimpleCredentials.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -63,4 +63,9 @@ return new TreeSet<String>(); } + @Override + public String getEmail() { + return null; + } + } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/Credentials.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/Credentials.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/Credentials.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -26,47 +26,72 @@ import javax.portlet.ActionRequest; import javax.portlet.RenderRequest; -/**@author <a href="mailto:tom...@jb...">Tomasz Szymanski</a><br /> - * <p></p> +/** + * @author <a href="mailto:tom...@jb...">Tomasz Szymanski</a><br /> + * <p> + * </p> * */ public abstract class Credentials { - /**Gets userName + /** + * Gets userName + * * @return userName of current user. */ public abstract String getName(); - - /**Checks if any user is logged in. + + /** + * Checks if any user is logged in. + * * @return true if anyone is logged in, false othwerwise. */ public abstract boolean isLoggedIn(); - - /**Checks if logged in user is Admin. + + /** + * Checks if logged in user is Admin. + * * @return true if user is admin, false othwerwise. */ public abstract boolean isAdmin(); - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ public String toString() { return getName(); } - - /**Sets ActionRequest for current credentials. - * @param rReq ActionRequest to set. + + /** + * Sets ActionRequest for current credentials. + * + * @param rReq + * ActionRequest to set. */ public abstract void setParam(Object param); - - /**Checks if user is in given role. - * @param role to check + + /** + * Checks if user is in given role. + * + * @param role + * to check * @return True if is in role, false otherwise. */ public abstract boolean isUserInRole(String role); - - /**Get Set of ALL role names. + + /** + * Get Set of ALL role names. + * * @return Set of role names or empty Set if there are no roles */ public abstract Set<String> getAllRoles(); - } + + /** + * Get email address of this user + * + * @return Email or null if email is not available + */ + public abstract String getEmail(); +} Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/JBossPortalCredentials.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/JBossPortalCredentials.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/JBossPortalCredentials.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -55,6 +55,8 @@ private Set<Role> allRoles; private TransactionManager tm; + + private String email; private static final String roleModulesCtx = "java:portal/RoleModule"; @@ -78,6 +80,7 @@ isAdmin = jrReq.getUser().getRoleNames() .contains(adminRoleName); roles = jrReq.getUser().getRoleNames(); + email = jrReq.getUser().getRealEmail(); } } else if (param instanceof JBossRenderRequest) { @@ -89,6 +92,7 @@ isAdmin = jrReq.getUser().getRoleNames() .contains(adminRoleName); roles = jrReq.getUser().getRoleNames(); + email = jrReq.getUser().getRealEmail(); } else { name = "Unknown"; } @@ -121,7 +125,9 @@ public boolean isAdmin() { return isAdmin; } + private static final String userModuleCtx = "java:portal/UserModule"; + public boolean isLoggedIn() { return logedIn; } @@ -145,4 +151,9 @@ return roleNames; } + @Override + public String getEmail() { + return email; + } + } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/SimpleCredentials.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/SimpleCredentials.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/SimpleCredentials.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -64,5 +64,10 @@ return new TreeSet<String>(); } + @Override + public String getEmail() { + return null; + } + } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiCommon.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiCommon.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiCommon.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -21,11 +21,11 @@ */ package org.jboss.wiki; -import java.util.Map; +import java.io.IOException; import java.util.Set; -import java.util.TreeMap; import java.util.TreeSet; +import javax.jms.JMSException; import javax.jms.ObjectMessage; import javax.jms.Queue; import javax.jms.QueueConnectionFactory; @@ -39,32 +39,35 @@ import org.jboss.wiki.exceptions.WikiManagementNotFoundException; import org.jboss.wiki.management.NotificationMsg; import org.jboss.wiki.management.WikiServiceMenagement; +import org.jboss.wiki.plugins.DifferenceEngine; +import org.jboss.wiki.plugins.WatchListPlugin; public class WikiCommon { - + public static final String wikiButtons = "!WikiButtons"; - + public static final String WIKI_SERVICE_NAME = "wiki:service=wikiService"; - + private static Logger log = Logger.getLogger(WikiCommon.class); - + private static WikiServiceMenagement wikiServiceMenagement; - public static WikiServiceMenagement getWikiManagement() throws WikiManagementNotFoundException{ + public static WikiServiceMenagement getWikiManagement() + throws WikiManagementNotFoundException { try { - if (wikiServiceMenagement == null) - wikiServiceMenagement = (WikiServiceMenagement) MBeanProxyExt.create( - WikiServiceMenagement.class, - WIKI_SERVICE_NAME, - MBeanServerLocator.locate()); - - return wikiServiceMenagement; - } catch (Exception e) { - throw new WikiManagementNotFoundException(e); - } + if (wikiServiceMenagement == null) + wikiServiceMenagement = (WikiServiceMenagement) MBeanProxyExt + .create(WikiServiceMenagement.class, WIKI_SERVICE_NAME, + MBeanServerLocator.locate()); + + return wikiServiceMenagement; + } catch (Exception e) { + throw new WikiManagementNotFoundException(e); + } } - - public static void sendNotificationMail(WikiPage page) { + + public static void sendNotificationMail(WikiPage page, + WikiSession wikiSession, WikiEngine engine) { try { InitialContext context = new InitialContext(); @@ -78,48 +81,50 @@ false, QueueSession.AUTO_ACKNOWLEDGE); if (sess != null) { - - String notifs = page.getMetaDataProperty("notifications"); - - if (notifs != null) { - Set<String> emails = new TreeSet<String>(); - String[] splitedMails = notifs.split(";"); - - for (int i = 0; i < splitedMails.length; i++) { - emails.add(splitedMails[i]); + + String notifs = page + .getMetaDataProperty(WatchListPlugin.WATCH_PROPERTY); + + if (notifs != null && notifs.length() > 0) { + Set<String> users = new TreeSet<String>(); + String[] splitedUsers = notifs.split(";"); + + String userStr = ""; + for (int i = 0; i < splitedUsers.length; i++) { + userStr += " [" + i + "] " + splitedUsers[i]; } - + + log.info(userStr); + + for (int i = 1; i < splitedUsers.length; i += 2) { + users.add(splitedUsers[i]); + } + page = (WikiPage) page.clone(); - WikiEngine engine = getWikiManagement().getWikiEngine(); - page = engine.getWikiType("htmlClear").process(page, new WikiSession(){ - - private Map<String, Object> attributes = new TreeMap<String, Object>(); - public Object getAttribute(String attributeName) { - return attributes.get(attributeName); - } - public void setAttribute(String attributeName, Object attribute) { - attributes.put(attributeName, attribute); - } + WikiPage pageHtml = engine.getWikiType("htmlClear") + .process(page, wikiSession); - public void removeAttribute(String attributeName) { - attributes.remove(attributeName); - } + DifferenceEngine differenceEngine = new DifferenceEngine( + "UTF-8"); - public String getId() { - return this.toString(); - }}); - - NotificationMsg notifMsg = new NotificationMsg(emails, page.getContent(), page.getName()); + String diffs = differenceEngine.makeDiff(page + .getContent(), page.getPageAtVersion(true, + page.getLastVersion() - 1).getContent()); + + NotificationMsg notifMsg = new NotificationMsg(users, + diffs + "<br />\n" + pageHtml.getContent(), + page.getName()); ObjectMessage msg = sess.createObjectMessage(notifMsg); sess.createSender(queue).send(msg); } - } - else { + } else { log.error("Couldn't create queue session."); } - } catch (Exception e) { + } catch (CloneNotSupportedException e) { log.error(e); + } catch (JMSException e) { + log.error(e); } } catch (NamingException e1) { log.error(e1); Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiEngine.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiEngine.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiEngine.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -45,6 +45,7 @@ import org.jboss.wiki.exceptions.PageNotEditedException; import org.jboss.wiki.exceptions.PageRenamingException; import org.jboss.wiki.exceptions.WikiSaveException; +import org.jboss.wiki.plugins.WatchListPlugin; import org.jboss.logging.Logger; import org.w3c.dom.Document; @@ -859,7 +860,7 @@ languageDataSources.get(langCode).getMediaDataSource().preSave(); } - public void savePage(Credentials credentials, WikiPage page, String langCode) + public void savePage(Credentials credentials, WikiPage page, String langCode, WikiSession wikiSession) throws WikiSaveException, EditingNotAllowedException { if (!page.isEditable(credentials)) { @@ -878,7 +879,7 @@ if (postEditProcess != null) { // there are some plugins for postediting a page - page = postEditProcess.process(page, null); + page = postEditProcess.process(page, wikiSession); } // put processed page to pages map @@ -894,11 +895,6 @@ postSave(langCode); - // send notifications - page.setMetaDataProperty("notifications", "sz...@as..."); - log.info("sending notif"); - WikiCommon.sendNotificationMail(page); - } public void postSave(String langCode) throws WikiSaveException { Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiPage.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiPage.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/WikiPage.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -134,17 +134,20 @@ editSessionWatchers = new HashMap<Integer, EditSessionWatcher>(); log = Logger.getLogger(WikiPage.class); - this.editRoles = (editRoles == null) ? new TreeSet<String>() : editRoles; - this.viewRoles = (viewRoles == null) ? new TreeSet<String>() : viewRoles; + this.editRoles = (editRoles == null) ? new TreeSet<String>() + : editRoles; + this.viewRoles = (viewRoles == null) ? new TreeSet<String>() + : viewRoles; this.length = length; - + setLangCode(langCode); - + } - public synchronized void save(Credentials credentials,Integer editActionId, String langCode) - throws EditSessionExpired, WikiSaveException, EditingNotAllowedException { + public synchronized void save(Credentials credentials, + Integer editActionId, String langCode, WikiSession wikiSession) throws EditSessionExpired, + WikiSaveException, EditingNotAllowedException { if (expiredSessionIds.contains(editActionId)) { throw new EditSessionExpired( @@ -156,7 +159,7 @@ editSessionWatchers.remove(editActionId); } - wikiEngine.savePage(credentials, this, langCode); + wikiEngine.savePage(credentials, this, langCode, wikiSession); } public WikiPage getPageAtVersion(boolean loadContent, int version) { @@ -180,7 +183,6 @@ return getPageContent(); } - public void showPage() { log.info("Page name: " + getName()); log.info("Page author: " + getLastAuthor()); @@ -434,8 +436,7 @@ public void setEditRoles(Set<String> editRoles) { if (editRoles == null) { this.editRoles.clear(); - } - else { + } else { this.editRoles = editRoles; } } @@ -443,8 +444,7 @@ public void setViewRoles(Set<String> viewRoles) { if (viewRoles == null) { this.viewRoles.clear(); - } - else { + } else { this.viewRoles = viewRoles; } } @@ -536,8 +536,16 @@ props.setProperty(key, value); wikiEngine.saveMetaProps(props, this); + + wikiEngine.refreshPage(getName(), getLangCode()); } + public void resetMetaProps() { + if (permVariables.get(METADATA) != null) { + permVariables.remove(METADATA); + } + } + public String getMetaDataProperty(String key) { if (permVariables.get(METADATA) != null) { return ((Properties) permVariables.get(METADATA)).getProperty(key); Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/ATOMPlugin.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/ATOMPlugin.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/ATOMPlugin.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -127,7 +127,7 @@ @Override public void init() { - differenceEngine = new DifferenceEngine("ISO-8859-1"); + differenceEngine = new DifferenceEngine("UTF-8"); } } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/HTMLTranslatorParts.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/HTMLTranslatorParts.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/HTMLTranslatorParts.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -1025,10 +1025,10 @@ public WikiPage process(final WikiPage wikiPage, WikiSession wikiSession) { WikiPage newPage = null; - portalHome = (String) wikiSession.getAttribute("hostURL") - + (String) wikiSession.getAttribute("actionURL"); + portalHome = (String) wikiSession.getAttribute(WikiSession.HOST_URL) + + (String) wikiSession.getAttribute(WikiSession.ACTION_URL); wikiHome = ""; - imagePath = (String) wikiSession.getAttribute("hostURL") + imagePath = (String) wikiSession.getAttribute(WikiSession.HOST_URL) + "/wiki" + (!wikiPage.getLangCode().equals(wikiEngine.defaultLangugeCode) ? "/" + wikiPage.getLangCode().toLowerCase() Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/RDFPlugin.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/RDFPlugin.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/RDFPlugin.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -111,7 +111,7 @@ @Override public void init() { - differenceEngine = new DifferenceEngine("ISO-8859-1"); + differenceEngine = new DifferenceEngine("UTF-8"); } } Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/RSSPlugin.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/RSSPlugin.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/RSSPlugin.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -93,7 +93,7 @@ @Override public void init() { - differenceEngine = new DifferenceEngine("ISO-8859-1"); + differenceEngine = new DifferenceEngine("UTF-8"); } } Added: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/SendNotificationPlugin.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/SendNotificationPlugin.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/SendNotificationPlugin.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -0,0 +1,56 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.wiki.plugins; + +import java.io.IOException; + +import org.jboss.wiki.WikiCommon; +import org.jboss.wiki.WikiPage; +import org.jboss.wiki.WikiPlugin; +import org.jboss.wiki.WikiSession; + +public class SendNotificationPlugin extends WikiPlugin { + + @Override + public WikiPage process(WikiPage wikiPage, WikiSession wikiSession) { + // just send notifications + + try { + WikiPage clonedPage = (WikiPage) wikiPage.clone(); + + log.debug("sending notif"); + + WikiCommon + .sendNotificationMail(clonedPage, wikiSession, wikiEngine); + } catch (CloneNotSupportedException e) { + log.error(e); + } + + return wikiPage; + } + + @Override + public void init() { + + } + +} Added: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-common/src/java/org/jboss/wiki/plugins/WatchListPlugin.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -0,0 +1,129 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.wiki.plugins; + +import org.jboss.wiki.Credentials; +import org.jboss.wiki.WikiPage; +import org.jboss.wiki.WikiPlugin; +import org.jboss.wiki.WikiSession; + +/** + * Plugin that adds user to watch list (for sending on-change notifications) + * + * @author <a href="mailto:tom...@jb...">Tomasz Szymanski</a> + * + */ +public class WatchListPlugin extends WikiPlugin { + + public static final String WATCH_PROPERTY = "notifications"; + + @Override + public WikiPage process(WikiPage wikiPage, WikiSession wikiSession) { + Credentials cred = (Credentials) wikiSession + .getAttribute(WikiSession.CREDENTIALS); + + if (cred.isLoggedIn()) { + String notifications = wikiPage + .getMetaDataProperty(WatchListPlugin.WATCH_PROPERTY); + + if (notifications == null) { + notifications = ""; + } + else if (notifications.startsWith(";")) { + notifications = notifications.substring(1); + } + + String[] users = notifications.split(";"); + + if (wikiSession.getAttribute("var1") != null + && wikiSession.getAttribute("var1").equals("watch") + && wikiSession.getAttribute("var2") != null + && wikiSession.getAttribute("var2").equals("toggle")) { + // toggle page watch/unwatch + + log.info("Adding user: " + cred.getName() + + " to watchlist for page: " + wikiPage.getName()); + + notifications = toggleWatch(users, cred.getName(), cred.getEmail()); + users = notifications.split(";"); + + wikiPage.setMetaDataProperty(WATCH_PROPERTY, notifications); + + } + + StringBuffer buffer = new StringBuffer(wikiPage.getContent()); + buffer.append("<hr />\n").append("<h3>Page watching</h3>\n"); + + boolean watcher = userInWatchList(users, cred.getName()); + + buffer.append( + (watcher) ? "You are watching this page. " + : "You are not watching this page. ").append( + "<a href=\"").append( + wikiSession.getAttribute(WikiSession.ACTION_URL)).append( + "&var1=watch&var2=toggle\" >[").append( + (watcher) ? "Stop watching this page" : "Watch this page") + .append("]</a>"); + + wikiPage.setContent(buffer.toString()); + } + + return wikiPage; + } + + private String toggleWatch(String[] users, String user, String email) { + String notifs = ""; + if (users.length > 0 && userInWatchList(users, user)) { + for (int i = 0; i < users.length; i += 2) { + if (!users[i].equals(user)) { + notifs += users[i] + ";" + users[i + 1] + ";"; + } + } + } else { + for (int i = 0; i < users.length; i++) { + if (notifs.length() != 0 || (users[i].length() != 0 && notifs.length() == 0)) { + notifs += users[i] + ";"; + } + } + notifs += user + ";" + email + ";"; + } + + return notifs; + } + + @Override + public void init() { + + } + + private boolean userInWatchList(String[] allUsers, String user) { + boolean is = false; + + for (int i = 0; i < allUsers.length && is == false; i += 2) { + if (allUsers[i].equals(user)) { + is = true; + } + } + + return is; + } +} Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/DictionaryTest.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/DictionaryTest.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/DictionaryTest.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -51,11 +51,11 @@ // set apropriate content of pages wikiPage1.setContent("1 ["+page2+"]"); wikiPage1.setLastVersion(wikiPage1.getLastVersion()+1); - wikiPage1.save(plainUser, wikiEngine.getEditSessionId(), langCode); + wikiPage1.save(plainUser, wikiEngine.getEditSessionId(), langCode, testWikiSession); wikiPage2.setContent("1 ["+page2+"]"); wikiPage2.setLastVersion(wikiPage2.getLastVersion()+1); - wikiPage2.save(plainUser, wikiEngine.getEditSessionId(), langCode); + wikiPage2.save(plainUser, wikiEngine.getEditSessionId(), langCode, testWikiSession); int i = 0; String newPage2Name = page2 + (i++); Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/GetSavePageTest.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/GetSavePageTest.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/GetSavePageTest.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -92,7 +92,7 @@ } // try saving page with wrong sessionId - wikiPage.save(plainUser, NUM_OF_SESSIDS * 2, langCode); + wikiPage.save(plainUser, NUM_OF_SESSIDS * 2, langCode, testWikiSession); // check what wikiEngine thinks assertTrue(wikiEngine.arePagesEdited()); @@ -115,7 +115,7 @@ PAGE_CONTENT.length(), langCode); // save page - wikiEngine.savePage(plainUser, testPage, langCode); + wikiEngine.savePage(plainUser, testPage, langCode, testWikiSession); // add testpage to to-delete list pagesToDelete.add(testPageName); @@ -130,7 +130,7 @@ testPage.setContent(PAGE_CONTENT_2); testPage.setLastVersion(testPage.getLastVersion() + 1); - wikiEngine.savePage(plainUser, testPage, langCode); + wikiEngine.savePage(plainUser, testPage, langCode, testWikiSession); // get page again at current version testPage = wikiEngine.getByName(testPageName, null, langCode); Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/PageModsTest.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/PageModsTest.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/PageModsTest.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -50,7 +50,7 @@ page.setLastVersion(page.getLastVersion() + 1); try { - wikiEngine.savePage(plainUser, page, langCode); + wikiEngine.savePage(plainUser, page, langCode, testWikiSession); fail("Saving should throw an exception - page isn't editable"); } catch (EditingNotAllowedException e) { // it's ok - page isn't editable @@ -96,7 +96,7 @@ page.setLastVersion(page.getLastVersion() + 1); try { - wikiEngine.savePage(plainUser, page, langCode); + wikiEngine.savePage(plainUser, page, langCode, testWikiSession); fail("Saving should throw an exception - page isn't editable"); } catch (EditingNotAllowedException e) { // it's ok - page isn't editable Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/SubPagesTest.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/SubPagesTest.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/SubPagesTest.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -48,7 +48,7 @@ PAGE_CONTENT_2, 1, 1, new Date(), wikiEngine, true, true, null, null, PAGE_CONTENT_2.length(), langCode); - wikiEngine.savePage(plainUser, subPage1, langCode); + wikiEngine.savePage(plainUser, subPage1, langCode, testWikiSession); //add to "to-delete" list pagesToDelete.add(page+"/"+SUB_PAGE_1); @@ -58,7 +58,7 @@ PAGE_CONTENT_3, 1, 1, new Date(), wikiEngine, true, true, null, null, PAGE_CONTENT_3.length(), langCode); - wikiEngine.savePage(plainUser, subPage2, langCode); + wikiEngine.savePage(plainUser, subPage2, langCode, testWikiSession); //add to "to-delete" list pagesToDelete.add(page+"/"+SUB_PAGE_2); @@ -83,7 +83,7 @@ PAGE_CONTENT_2, 1, 1, new Date(), wikiEngine, true, true, null, null, PAGE_CONTENT_2.length(), langCode); - wikiEngine.savePage(plainUser, rootPage, langCode); + wikiEngine.savePage(plainUser, rootPage, langCode, testWikiSession); createdPages.add(page); // create first subpage @@ -91,7 +91,7 @@ PAGE_CONTENT_2, 1, 1, new Date(), wikiEngine, true, true, null, null, PAGE_CONTENT_2.length(), langCode); - wikiEngine.savePage(plainUser, subPage1, langCode); + wikiEngine.savePage(plainUser, subPage1, langCode, testWikiSession); createdPages.add(page + "/" + SUB_PAGE_1); // create second subpage @@ -99,7 +99,7 @@ PAGE_CONTENT_2, 1, 1, new Date(), wikiEngine, true, true, null, null, PAGE_CONTENT_2.length(), langCode); - wikiEngine.savePage(plainUser, subPage2, langCode); + wikiEngine.savePage(plainUser, subPage2, langCode, testWikiSession); createdPages.add(page + "/" + SUB_PAGE_2); // create first subsubpage @@ -107,7 +107,7 @@ PAGE_CONTENT_2, 1, 1, new Date(), wikiEngine, true, true, null, null, PAGE_CONTENT_2.length(), langCode); - wikiEngine.savePage(plainUser, subSubPage1, langCode); + wikiEngine.savePage(plainUser, subSubPage1, langCode, testWikiSession); createdPages.add(page + "/" + SUB_PAGE_1 + "/" + SUB_PAGE_1); // add a page that is more deep inside @@ -116,7 +116,7 @@ PAGE_CONTENT_2, 1, 1, new Date(), wikiEngine, true, true, null, null, PAGE_CONTENT_2.length(), langCode); - wikiEngine.savePage(plainUser, subSubmultiple, langCode); + wikiEngine.savePage(plainUser, subSubmultiple, langCode, testWikiSession); createdPages.add(name); Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/TestCredentials.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/TestCredentials.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/TestCredentials.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -78,5 +78,10 @@ public Set<String> getAllRoles() { return roles; } + + @Override + public String getEmail() { + return null; + } } \ No newline at end of file Modified: labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/WikiTest.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/WikiTest.java 2006-05-15 17:52:24 UTC (rev 4233) +++ labs/jbosslabs/trunk/portal-extensions/jbosswiki/wiki-test/src/java/org/jboss/wiki/test/WikiTest.java 2006-05-15 21:38:40 UTC (rev 4234) @@ -136,7 +136,7 @@ new Date(), wikiEngine, true, true, null, null, pageContent .length(), langCode); - wikiPage.save(plainUser, wikiEngine.getEditSessionId(), langCode); + wikiPage.save(plainUser, wikiEngine.getEditSessionId(), langCode, testWikiSession); pagesToDelete.add(testPageName); |
From: <jbo...@li...> - 2006-05-15 17:52:27
|
Author: mar...@jb... Date: 2006-05-15 13:52:24 -0400 (Mon, 15 May 2006) New Revision: 4233 Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/README.txt Log: Added important instructions. http://jira.jboss.com/jira/browse/JBTM-65 Modified: labs/jbosstm/trunk/ArjunaJTS/trailmap/README.txt =================================================================== --- labs/jbosstm/trunk/ArjunaJTS/trailmap/README.txt 2006-05-15 17:47:58 UTC (rev 4232) +++ labs/jbosstm/trunk/ArjunaJTS/trailmap/README.txt 2006-05-15 17:52:24 UTC (rev 4233) @@ -20,8 +20,11 @@ allow a better understanding of the way to use the JBossTS Programming interfaces. -To build the sources files you should follow instructins given below: +To build the sources files you should follow instructions given below: +- Download the version of JacORB from the JBossTS download page. Place this +in a directory called jacorb_2_1 in the root of your JBossTS installation, i.e., +at the same level as the trailmap directory. - Ensure you have the Ant build system installed. Ant is a Java build tool, similar to make. @@ -46,12 +49,17 @@ the jacorb (version 2.2.2) jar files From a command prompt, go (or 'cd') to the directory containing the - build.xml file (<arjunats_install_root>/trailmap) and type 'ant'. + build.xml file (<jbossjts_install_root>/trailmap) and type 'ant'. Add the generated file named arjunats-demo.jar and located under - <arjunats_install_root>/trailmap/lib in you CLASSPATH environment + <jbossjts_install_root>/trailmap/lib in you CLASSPATH environment variable. + +When running the local JTS transactions part of the trailmap, you will need to start +the recovery manager: java com.arjuna.ats.arjuna.recovery.RecoveryManager -test +You will need a jacorb.properties file to run the distributed JTS tests. + For each sample, refer to the appropriate trail page. Database Note: |
From: <jbo...@li...> - 2006-05-15 17:48:02
|
Author: mar...@jb... Date: 2006-05-15 13:47:58 -0400 (Mon, 15 May 2006) New Revision: 4232 Modified: labs/jbosstm/trunk/ArjunaJTS/INSTALL Log: Added notes on the problems with the trailmap. Modified: labs/jbosstm/trunk/ArjunaJTS/INSTALL =================================================================== --- labs/jbosstm/trunk/ArjunaJTS/INSTALL 2006-05-15 17:34:24 UTC (rev 4231) +++ labs/jbosstm/trunk/ArjunaJTS/INSTALL 2006-05-15 17:47:58 UTC (rev 4232) @@ -67,3 +67,13 @@ The application server will now be configured to use the JBossJTS transaction manager instead of the JBoss Transaction Manager. + +Note, the following issues exist with the trailmap shipped with JBossTS (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=82879): + +(i) it talks about ArjunaTS and the arjunats-properties.xml file. This was the old name for JBossTS. The +new properties file is the jbossjts-properties.xml. + +(ii) when running the local JTS transactions part of the trailmap, you will need to start +the recovery manager: java com.arjuna.ats.arjuna.recovery.RecoveryManager -test + +(iii) you will need a jacorb.properties file to run the distributed JTS tests. \ No newline at end of file |
From: <jbo...@li...> - 2006-05-15 17:34:32
|
Author: mar...@jb... Date: 2006-05-15 13:34:24 -0400 (Mon, 15 May 2006) New Revision: 4231 Modified: labs/jbosstm/trunk/ArjunaJTS/INSTALL Log: Added rules on editing jbossjts-properties.xml and jacorb_properties files. Modified: labs/jbosstm/trunk/ArjunaJTS/INSTALL =================================================================== --- labs/jbosstm/trunk/ArjunaJTS/INSTALL 2006-05-15 15:19:14 UTC (rev 4230) +++ labs/jbosstm/trunk/ArjunaJTS/INSTALL 2006-05-15 17:34:24 UTC (rev 4231) @@ -26,6 +26,9 @@ - copy the following configuration file from the JBossJTS installation into the server/XXX/conf directory of the JBoss 4.0.3 SP1 installation - etc/jbossjts-properties.xml + - edit the properties file to remove either the arjunacore XARecoveryModule or the jts + XARecoveryModule, depending upon whether you are using JTS or local JTA, respectively. + - Edit the server/all/conf/jboss-service.xml file and replace the jboss:service=TransactionManager mbean declaration with the following @@ -57,5 +60,10 @@ <!-- JBoss TS interceptor --> <initializer>com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl</initializer> +Replace jacorb.jar in client/lib and server/all/lib with the jacorb.jar located http://labs.jboss.com/file-access/default/members/jbosstm/downloads/4.2/binary/jacorb_2_2_1_patch.zip + +For each deployment of JacORB, you will need to ensure that the jacorb.implname in the jacorb.properties +file is unique. + The application server will now be configured to use the JBossJTS transaction manager instead of the JBoss Transaction Manager. |
From: <jbo...@li...> - 2006-05-15 15:20:36
|
Author: mic...@jb... Date: 2006-05-15 11:19:14 -0400 (Mon, 15 May 2006) New Revision: 4230 Modified: labs/trailblazers/trunk/EJB3/EEE.ipr labs/trailblazers/trunk/EJB3/EEE.iws labs/trailblazers/trunk/EJB3/lib/jboss-annotations-ejb3.jar labs/trailblazers/trunk/EJB3/lib/jboss-ejb3.jar labs/trailblazers/trunk/EJB3/lib/jboss-ejb3x.jar labs/trailblazers/trunk/EJB3/src/trail/interceptor/InterceptorCalculator.java labs/trailblazers/trunk/EJB3/src/trail/interceptor/Tracer.java Log: Update to 4.0.4 GA Modified: labs/trailblazers/trunk/EJB3/EEE.ipr =================================================================== --- labs/trailblazers/trunk/EJB3/EEE.ipr 2006-05-15 14:05:04 UTC (rev 4229) +++ labs/trailblazers/trunk/EJB3/EEE.ipr 2006-05-15 15:19:14 UTC (rev 4230) @@ -1,199 +1,199 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4" relativePaths="true"> - <component name="AntConfiguration"> - <defaultAnt bundledAnt="true" /> - </component> - <component name="CodeStyleSettingsManager"> - <option name="PER_PROJECT_SETTINGS" /> - <option name="USE_PER_PROJECT_SETTINGS" value="false" /> - </component> - <component name="CompilerConfiguration"> - <option name="DEFAULT_COMPILER" value="Javac" /> - <option name="CLEAR_OUTPUT_DIRECTORY" value="false" /> - <option name="DEPLOY_AFTER_MAKE" value="0" /> - <resourceExtensions> - <entry name=".+\.(properties|xml|html|dtd|tld)" /> - <entry name=".+\.(gif|png|jpeg|jpg)" /> - </resourceExtensions> - <wildcardResourcePatterns> - <entry name="?*.properties" /> - <entry name="?*.xml" /> - <entry name="?*.gif" /> - <entry name="?*.png" /> - <entry name="?*.jpeg" /> - <entry name="?*.jpg" /> - <entry name="?*.html" /> - <entry name="?*.dtd" /> - <entry name="?*.tld" /> - </wildcardResourcePatterns> - </component> - <component name="DataSourceManagerImpl" /> - <component name="DependenciesAnalyzeManager"> - <option name="myForwardDirection" value="false" /> - </component> - <component name="DependencyValidationManager" /> - <component name="EntryPointsManager"> - <entry_points /> - </component> - <component name="ExportToHTMLSettings"> - <option name="PRINT_LINE_NUMBERS" value="false" /> - <option name="OPEN_IN_BROWSER" value="false" /> - <option name="OUTPUT_DIRECTORY" /> - </component> - <component name="GUI Designer component loader factory" /> - <component name="JavacSettings"> - <option name="DEBUGGING_INFO" value="true" /> - <option name="GENERATE_NO_WARNINGS" value="false" /> - <option name="DEPRECATION" value="true" /> - <option name="ADDITIONAL_OPTIONS_STRING" value="" /> - <option name="MAXIMUM_HEAP_SIZE" value="128" /> - </component> - <component name="JavadocGenerationManager"> - <option name="OUTPUT_DIRECTORY" /> - <option name="OPTION_SCOPE" value="protected" /> - <option name="OPTION_HIERARCHY" value="true" /> - <option name="OPTION_NAVIGATOR" value="true" /> - <option name="OPTION_INDEX" value="true" /> - <option name="OPTION_SEPARATE_INDEX" value="true" /> - <option name="OPTION_DOCUMENT_TAG_USE" value="false" /> - <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" /> - <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" /> - <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" /> - <option name="OPTION_DEPRECATED_LIST" value="true" /> - <option name="OTHER_OPTIONS" value="" /> - <option name="HEAP_SIZE" /> - <option name="OPEN_IN_BROWSER" value="true" /> - </component> - <component name="JikesSettings"> - <option name="JIKES_PATH" value="" /> - <option name="DEBUGGING_INFO" value="true" /> - <option name="DEPRECATION" value="true" /> - <option name="GENERATE_NO_WARNINGS" value="false" /> - <option name="IS_EMACS_ERRORS_MODE" value="true" /> - <option name="ADDITIONAL_OPTIONS_STRING" value="" /> - </component> - <component name="Palette2"> - <group name="Swing"> - <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false"> - <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> - </item> - <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false"> - <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> - </item> - <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false"> - <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> - </item> - <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false"> - <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> - </item> - <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> - <initial-values> - <property name="text" value="Button" /> - </initial-values> - </item> - <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> - <initial-values> - <property name="text" value="RadioButton" /> - </initial-values> - </item> - <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> - <initial-values> - <property name="text" value="CheckBox" /> - </initial-values> - </item> - <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> - <initial-values> - <property name="text" value="Label" /> - </initial-values> - </item> - <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> - <preferred-size width="150" height="-1" /> - </default-constraints> - </item> - <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> - <preferred-size width="150" height="-1" /> - </default-constraints> - </item> - <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> - <preferred-size width="150" height="-1" /> - </default-constraints> - </item> - <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false"> - <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> - <preferred-size width="150" height="50" /> - </default-constraints> - </item> - <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false"> - <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> - <preferred-size width="150" height="50" /> - </default-constraints> - </item> - <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false"> - <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> - <preferred-size width="150" height="50" /> - </default-constraints> - </item> - <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> - </item> - <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false"> - <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> - <preferred-size width="150" height="50" /> - </default-constraints> - </item> - <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false"> - <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> - <preferred-size width="150" height="50" /> - </default-constraints> - </item> - <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false"> - <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> - <preferred-size width="150" height="50" /> - </default-constraints> - </item> - <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false"> - <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> - <preferred-size width="200" height="200" /> - </default-constraints> - </item> - <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false"> - <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> - <preferred-size width="200" height="200" /> - </default-constraints> - </item> - <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> - </item> - <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false"> - <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> - </item> - </group> - </component> - <component name="ProjectModuleManager"> - <modules> - <module fileurl="file://$PROJECT_DIR$/EEE.iml" filepath="$PROJECT_DIR$/EEE.iml" /> - </modules> - </component> - <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="java version "1.5.0_02"" /> - <component name="RmicSettings"> - <option name="IS_EANABLED" value="false" /> - <option name="DEBUGGING_INFO" value="true" /> - <option name="GENERATE_NO_WARNINGS" value="false" /> - <option name="GENERATE_IIOP_STUBS" value="false" /> - <option name="ADDITIONAL_OPTIONS_STRING" value="" /> - </component> - <component name="libraryTable" /> - <component name="uidesigner-configuration"> - <option name="INSTRUMENT_CLASSES" value="true" /> - <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" /> - </component> - <UsedPathMacros /> -</project> - +<?xml version="1.0" encoding="UTF-8"?> +<project version="4" relativePaths="true"> + <component name="AntConfiguration"> + <defaultAnt bundledAnt="true" /> + </component> + <component name="CodeStyleSettingsManager"> + <option name="PER_PROJECT_SETTINGS" /> + <option name="USE_PER_PROJECT_SETTINGS" value="false" /> + </component> + <component name="CompilerConfiguration"> + <option name="DEFAULT_COMPILER" value="Javac" /> + <option name="CLEAR_OUTPUT_DIRECTORY" value="false" /> + <option name="DEPLOY_AFTER_MAKE" value="0" /> + <resourceExtensions> + <entry name=".+\.(properties|xml|html|dtd|tld)" /> + <entry name=".+\.(gif|png|jpeg|jpg)" /> + </resourceExtensions> + <wildcardResourcePatterns> + <entry name="?*.properties" /> + <entry name="?*.xml" /> + <entry name="?*.gif" /> + <entry name="?*.png" /> + <entry name="?*.jpeg" /> + <entry name="?*.jpg" /> + <entry name="?*.html" /> + <entry name="?*.dtd" /> + <entry name="?*.tld" /> + </wildcardResourcePatterns> + </component> + <component name="DataSourceManagerImpl" /> + <component name="DependenciesAnalyzeManager"> + <option name="myForwardDirection" value="false" /> + </component> + <component name="DependencyValidationManager" /> + <component name="EntryPointsManager"> + <entry_points /> + </component> + <component name="ExportToHTMLSettings"> + <option name="PRINT_LINE_NUMBERS" value="false" /> + <option name="OPEN_IN_BROWSER" value="false" /> + <option name="OUTPUT_DIRECTORY" /> + </component> + <component name="GUI Designer component loader factory" /> + <component name="JavacSettings"> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="DEPRECATION" value="true" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + <option name="MAXIMUM_HEAP_SIZE" value="128" /> + </component> + <component name="JavadocGenerationManager"> + <option name="OUTPUT_DIRECTORY" /> + <option name="OPTION_SCOPE" value="protected" /> + <option name="OPTION_HIERARCHY" value="true" /> + <option name="OPTION_NAVIGATOR" value="true" /> + <option name="OPTION_INDEX" value="true" /> + <option name="OPTION_SEPARATE_INDEX" value="true" /> + <option name="OPTION_DOCUMENT_TAG_USE" value="false" /> + <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" /> + <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" /> + <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" /> + <option name="OPTION_DEPRECATED_LIST" value="true" /> + <option name="OTHER_OPTIONS" value="" /> + <option name="HEAP_SIZE" /> + <option name="OPEN_IN_BROWSER" value="true" /> + </component> + <component name="JikesSettings"> + <option name="JIKES_PATH" value="" /> + <option name="DEBUGGING_INFO" value="true" /> + <option name="DEPRECATION" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="IS_EMACS_ERRORS_MODE" value="true" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + </component> + <component name="Palette2"> + <group name="Swing"> + <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false"> + <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> + </item> + <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false"> + <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> + </item> + <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false"> + <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> + <initial-values> + <property name="text" value="Button" /> + </initial-values> + </item> + <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="RadioButton" /> + </initial-values> + </item> + <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="CheckBox" /> + </initial-values> + </item> + <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="Label" /> + </initial-values> + </item> + <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false"> + <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> + <preferred-size width="200" height="200" /> + </default-constraints> + </item> + <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> + <preferred-size width="200" height="200" /> + </default-constraints> + </item> + <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> + </item> + </group> + </component> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/EEE.iml" filepath="$PROJECT_DIR$/EEE.iml" /> + </modules> + </component> + <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="java version "1.5.0_02"" /> + <component name="RmicSettings"> + <option name="IS_EANABLED" value="false" /> + <option name="DEBUGGING_INFO" value="true" /> + <option name="GENERATE_NO_WARNINGS" value="false" /> + <option name="GENERATE_IIOP_STUBS" value="false" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="" /> + </component> + <component name="libraryTable" /> + <component name="uidesigner-configuration"> + <option name="INSTRUMENT_CLASSES" value="true" /> + <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" /> + </component> + <UsedPathMacros /> +</project> + Modified: labs/trailblazers/trunk/EJB3/EEE.iws =================================================================== --- labs/trailblazers/trunk/EJB3/EEE.iws 2006-05-15 14:05:04 UTC (rev 4229) +++ labs/trailblazers/trunk/EJB3/EEE.iws 2006-05-15 15:19:14 UTC (rev 4230) @@ -135,92 +135,92 @@ <component name="FileEditorManager"> <leaf> <file leaf-file-name="index.html" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/docs/background/install/index.html"> + <entry file="file://$PROJECT_DIR$/docs/services/interceptor/index.html"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <state line="239" column="7" selection-start="7734" selection-end="7734" vertical-scroll-proportion="0.6621622"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="build.xml" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/build.xml"> + <file leaf-file-name="Tracer.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/trail/interceptor/Tracer.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="98" column="29" selection-start="2683" selection-end="2683" vertical-scroll-proportion="1.984985"> - <folding /> + <state line="3" column="26" selection-start="74" selection-end="74" vertical-scroll-proportion="0.076576576"> + <folding> + <element signature="imports" expanded="true" /> + </folding> </state> </provider> </entry> </file> - <file leaf-file-name="Calculator.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/trail/sfsb/Calculator.java"> + <file leaf-file-name="CalculatorMBean.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/trail/jmx/CalculatorMBean.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="4" column="17" selection-start="67" selection-end="67" vertical-scroll-proportion="0.1021021"> + <state line="7" column="13" selection-start="198" selection-end="198" vertical-scroll-proportion="0.15315315"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="StatefulCalculator.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/trail/sfsb/StatefulCalculator.java"> + <file leaf-file-name="CalculationRecord.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/trail/mdb/CalculationRecord.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="7" column="13" selection-start="114" selection-end="114" vertical-scroll-proportion="0.12762763"> + <state line="4" column="13" selection-start="61" selection-end="61" vertical-scroll-proportion="0.1021021"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="Calculator.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/trail/lifecycle/Calculator.java"> + <file leaf-file-name="CalculatorBean.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/trail/mdb/CalculatorBean.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="4" column="17" selection-start="72" selection-end="72" vertical-scroll-proportion="0.1021021"> + <state line="14" column="13" selection-start="359" selection-end="359" vertical-scroll-proportion="0.2807808"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="SessionCalculator.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/trail/lifecycle/SessionCalculator.java"> + <file leaf-file-name="RecordManager.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/trail/mdb/RecordManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="3" column="25" selection-start="71" selection-end="71" vertical-scroll-proportion="0.076576576"> - <folding> - <element signature="imports" expanded="true" /> - </folding> + <state line="5" column="13" selection-start="89" selection-end="89" vertical-scroll-proportion="0.1021021"> + <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="SessionRecord.java" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/trail/lifecycle/SessionRecord.java"> + <file leaf-file-name="CalculationRecord.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/trail/mdpojo/CalculationRecord.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="2" column="13" selection-start="39" selection-end="39" vertical-scroll-proportion="0.04992658"> + <state line="4" column="13" selection-start="64" selection-end="64" vertical-scroll-proportion="0.1021021"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="ApptransCalculator.java" pinned="false" current="true" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/src/trail/apptrans/ApptransCalculator.java"> + <file leaf-file-name="Calculator.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/trail/mdpojo/Calculator.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="46" column="62" selection-start="1234" selection-end="1234" vertical-scroll-proportion="0.3978979"> + <state line="5" column="17" selection-start="93" selection-end="93" vertical-scroll-proportion="0.12481645"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="web.xml" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/dd2/web/web.xml"> + <file leaf-file-name="MdpojoCalculator.java" pinned="false" current="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/trail/mdpojo/MdpojoCalculator.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <state line="14" column="13" selection-start="349" selection-end="349" vertical-scroll-proportion="0.2807808"> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="jboss-web.xml" pinned="false" current="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/dd/web/jboss-web.xml"> + <file leaf-file-name="RecordManager.java" pinned="false" current="true" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/trail/mdpojo/RecordManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <state line="5" column="13" selection-start="92" selection-end="92" vertical-scroll-proportion="0.1021021"> <folding /> </state> </provider> @@ -386,6 +386,58 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail/mdpojo" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="EEE.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="EEE" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail/mdb" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="EEE.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="EEE" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail/lifecycle" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> @@ -412,6 +464,58 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail/jmx" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="EEE.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="EEE" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail/interceptor" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="EEE.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="EEE" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/trail/apptrans" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> @@ -452,6 +556,54 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/docs/services" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="EEE.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="EEE" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/docs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/docs/services" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/docs/services/interceptor" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="EEE.ipr" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="EEE" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/docs" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/docs/background" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> @@ -515,6 +667,13 @@ <component name="RestoreUpdateTree" /> <component name="RunManager"> <activeType name="Application" /> + <configuration selected="false" default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> + </configuration> <configuration selected="false" default="true" type="Application" factoryName="Application"> <option name="MAIN_CLASS_NAME" /> <option name="VM_PARAMETERS" /> @@ -540,13 +699,6 @@ <value defaultName="wholeProject" /> </option> </configuration> - <configuration selected="false" default="true" type="Remote" factoryName="Remote"> - <option name="USE_SOCKET_TRANSPORT" value="true" /> - <option name="SERVER_MODE" value="false" /> - <option name="SHMEM_ADDRESS" value="javadebug" /> - <option name="HOST" value="localhost" /> - <option name="PORT" value="5005" /> - </configuration> <configuration selected="false" default="true" type="Applet" factoryName="Applet"> <module name="" /> <option name="MAIN_CLASS_NAME" /> @@ -603,12 +755,12 @@ </todo-panel> </component> <component name="ToolWindowManager"> - <frame x="184" y="23" width="1099" height="828" extended-state="0" /> + <frame x="33" y="23" width="1099" height="828" extended-state="0" /> <editor active="true" /> <layout> <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33006993" order="7" /> - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.25023788" order="0" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.25594673" order="0" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.32968536" order="1" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" /> <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" /> @@ -694,109 +846,111 @@ <option name="FILTER_TARGETS" value="false" /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/docs/services/apptrans/update.jsp"> + <entry file="file://$PROJECT_DIR$/dd2/web/web.xml"> <provider selected="true" editor-type-id="text-editor"> <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/trail/apptrans/Calculator.java"> + <entry file="file://$PROJECT_DIR$/dd/web/jboss-web.xml"> <provider selected="true" editor-type-id="text-editor"> - <state line="5" column="17" selection-start="101" selection-end="101" vertical-scroll-proportion="0.09985316"> + <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/dd/ear/application.xml"> + <entry file="file://$PROJECT_DIR$/src/trail/lifecycle/SessionRecord.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="8" column="20" selection-start="400" selection-end="409" vertical-scroll-proportion="0.2042042"> + <state line="2" column="13" selection-start="39" selection-end="39" vertical-scroll-proportion="0.04992658"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/dd2/web/jboss-web.xml"> + <entry file="file://$PROJECT_DIR$/src/trail/apptrans/ApptransCalculator.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <state line="46" column="62" selection-start="1234" selection-end="1234" vertical-scroll-proportion="0.37237236"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/dd/web/web.xml"> + <entry file="file://$PROJECT_DIR$/src/trail/interceptor/InterceptorCalculator.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="5" column="4" selection-start="183" selection-end="183" vertical-scroll-proportion="0.025525525"> - <folding /> + <state line="3" column="26" selection-start="74" selection-end="74" vertical-scroll-proportion="0.076576576"> + <folding> + <element signature="imports" expanded="true" /> + </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/dd2/web/web.xml"> + <entry file="file://$PROJECT_DIR$/docs/services/interceptor/index.html"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <state line="239" column="7" selection-start="7734" selection-end="7734" vertical-scroll-proportion="0.6621622"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/dd/web/jboss-web.xml"> + <entry file="file://$PROJECT_DIR$/src/trail/interceptor/Tracer.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> - <folding /> + <state line="3" column="26" selection-start="74" selection-end="74" vertical-scroll-proportion="0.076576576"> + <folding> + <element signature="imports" expanded="true" /> + </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/docs/background/install/index.html"> + <entry file="file://$PROJECT_DIR$/src/trail/jmx/CalculatorMBean.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0"> + <state line="7" column="13" selection-start="198" selection-end="198" vertical-scroll-proportion="0.15315315"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/build.xml"> + <entry file="file://$PROJECT_DIR$/src/trail/mdb/CalculationRecord.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="98" column="29" selection-start="2683" selection-end="2683" vertical-scroll-proportion="1.984985"> + <state line="4" column="13" selection-start="61" selection-end="61" vertical-scroll-proportion="0.1021021"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/trail/sfsb/Calculator.java"> + <entry file="file://$PROJECT_DIR$/src/trail/mdb/CalculatorBean.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="4" column="17" selection-start="67" selection-end="67" vertical-scroll-proportion="0.1021021"> + <state line="14" column="13" selection-start="359" selection-end="359" vertical-scroll-proportion="0.2807808"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/trail/sfsb/StatefulCalculator.java"> + <entry file="file://$PROJECT_DIR$/src/trail/mdb/RecordManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="7" column="13" selection-start="114" selection-end="114" vertical-scroll-proportion="0.12762763"> + <state line="5" column="13" selection-start="89" selection-end="89" vertical-scroll-proportion="0.1021021"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/trail/lifecycle/Calculator.java"> + <entry file="file://$PROJECT_DIR$/src/trail/mdpojo/CalculationRecord.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="4" column="17" selection-start="72" selection-end="72" vertical-scroll-proportion="0.1021021"> + <state line="4" column="13" selection-start="64" selection-end="64" vertical-scroll-proportion="0.1021021"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/trail/lifecycle/SessionCalculator.java"> + <entry file="file://$PROJECT_DIR$/src/trail/mdpojo/Calculator.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="3" column="25" selection-start="71" selection-end="71" vertical-scroll-proportion="0.076576576"> - <folding> - <element signature="imports" expanded="true" /> - </folding> + <state line="5" column="17" selection-start="93" selection-end="93" vertical-scroll-proportion="0.12481645"> + <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/trail/lifecycle/SessionRecord.java"> + <entry file="file://$PROJECT_DIR$/src/trail/mdpojo/MdpojoCalculator.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="2" column="13" selection-start="39" selection-end="39" vertical-scroll-proportion="0.04992658"> + <state line="14" column="13" selection-start="349" selection-end="349" vertical-scroll-proportion="0.2807808"> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/trail/apptrans/ApptransCalculator.java"> + <entry file="file://$PROJECT_DIR$/src/trail/mdpojo/RecordManager.java"> <provider selected="true" editor-type-id="text-editor"> - <state line="46" column="62" selection-start="1234" selection-end="1234" vertical-scroll-proportion="0.3978979"> + <state line="5" column="13" selection-start="92" selection-end="92" vertical-scroll-proportion="0.1021021"> <folding /> </state> </provider> Modified: labs/trailblazers/trunk/EJB3/lib/jboss-annotations-ejb3.jar =================================================================== (Binary files differ) Modified: labs/trailblazers/trunk/EJB3/lib/jboss-ejb3.jar =================================================================== (Binary files differ) Modified: labs/trailblazers/trunk/EJB3/lib/jboss-ejb3x.jar =================================================================== (Binary files differ) Modified: labs/trailblazers/trunk/EJB3/src/trail/interceptor/InterceptorCalculator.java =================================================================== --- labs/trailblazers/trunk/EJB3/src/trail/interceptor/InterceptorCalculator.java 2006-05-15 14:05:04 UTC (rev 4229) +++ labs/trailblazers/trunk/EJB3/src/trail/interceptor/InterceptorCalculator.java 2006-05-15 15:19:14 UTC (rev 4230) @@ -1,13 +1,15 @@ package trail.interceptor; import javax.ejb.*; +import javax.interceptor.*; import java.util.*; import java.io.Serializable; //TODO: Fix the client @Stateful @Interceptors (Tracer.class) -public class InterceptorCalculator implements Calculator, Serializable { +public class + InterceptorCalculator implements Calculator, Serializable { public ArrayList <Integer> starts = new ArrayList <Integer> (); public ArrayList <Integer> ends = new ArrayList <Integer> (); Modified: labs/trailblazers/trunk/EJB3/src/trail/interceptor/Tracer.java =================================================================== --- labs/trailblazers/trunk/EJB3/src/trail/interceptor/Tracer.java 2006-05-15 14:05:04 UTC (rev 4229) +++ labs/trailblazers/trunk/EJB3/src/trail/interceptor/Tracer.java 2006-05-15 15:19:14 UTC (rev 4230) @@ -1,6 +1,7 @@ package trail.interceptor; import javax.ejb.*; +import javax.interceptor.*; public class Tracer { @@ -29,7 +30,7 @@ long time = System.currentTimeMillis() - start; System.out.println("This method takes " + time + "ms to execute"); - cal.setTrace(cal.getTrace() + "<br/>" + + cal.setTrace(cal.getTrace() + "<br/>" + "This method takes " + time + "ms to execute"); } |