JBoss Portal SVN: r13302 - branches.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-05-06 08:09:09 -0400 (Wed, 06 May 2009)
New Revision: 13302
Added:
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/
Log:
[JBEPP-73] - Branch for patch
Copied: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73 (from rev 13301, branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-60)
15 years
JBoss Portal SVN: r13301 - branches.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-05-06 08:01:12 -0400 (Wed, 06 May 2009)
New Revision: 13301
Added:
branches/Enterprise_Portal_Platform_4_3_GA_CP01_JBEPP-73/
Log:
[JBEPP-73] - Branch for patch
Copied: branches/Enterprise_Portal_Platform_4_3_GA_CP01_JBEPP-73 (from rev 13300, tags/Enterprise_Portal_Platform_4_3_GA_CP01)
15 years
JBoss Portal SVN: r13300 - branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/portlet.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-05-06 07:50:51 -0400 (Wed, 06 May 2009)
New Revision: 13300
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java
Log:
[JBEPP-72] - Same HTTP header property set multiple times if set by multiple portlets
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java 2009-05-06 11:38:51 UTC (rev 13299)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java 2009-05-06 11:50:51 UTC (rev 13300)
@@ -82,7 +82,7 @@
for (String key: unsr.getProperties().getTransportHeaders().keySet())
{
String value = unsr.getProperties().getTransportHeaders().getValue(key);
- ((AbstractServerContext) invocation.getServerContext()).getResponse().addHeader(key, value);
+ ((AbstractServerContext) invocation.getServerContext()).getResponse().setHeader(key, value);
}
}
}
@@ -98,7 +98,7 @@
for (String key: fr.getProperties().getTransportHeaders().keySet())
{
String value = fr.getProperties().getTransportHeaders().getValue(key);
- ((AbstractServerContext) invocation.getServerContext()).getResponse().addHeader(key, value);
+ ((AbstractServerContext) invocation.getServerContext()).getResponse().setHeader(key, value);
}
}
}
15 years
JBoss Portal SVN: r13299 - branches/Enterprise_Portal_Platform_4_3/build.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-05-06 07:38:51 -0400 (Wed, 06 May 2009)
New Revision: 13299
Modified:
branches/Enterprise_Portal_Platform_4_3/build/build-thirdparty.xml
Log:
[JBEPP-71] - Response.setProperty is not resetting the value as per the api doc
Modified: branches/Enterprise_Portal_Platform_4_3/build/build-thirdparty.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/build/build-thirdparty.xml 2009-05-06 10:38:41 UTC (rev 13298)
+++ branches/Enterprise_Portal_Platform_4_3/build/build-thirdparty.xml 2009-05-06 11:38:51 UTC (rev 13299)
@@ -44,7 +44,7 @@
<componentref name="jboss-portal/modules/common" version="1.2.4"/>
<componentref name="jboss-portal/modules/web" version="1.2.3"/>
<componentref name="jboss-portal/modules/test" version="1.0.4"/>
- <componentref name="jboss-portal/modules/portlet" version="2.0.7"/>
+ <componentref name="jboss-portal/modules/portlet" version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/identity" version="1.0.8"/>
<componentref name="jboss-portal/modules/cms" version="1.2.5"/>
<componentref name="antlr" version="2.7.6-brew"/>
15 years
JBoss Portal SVN: r13298 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-05-06 06:38:41 -0400 (Wed, 06 May 2009)
New Revision: 13298
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
Log:
[JBPORTAL-2311] - javadoc for tests
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java 2009-05-05 16:41:12 UTC (rev 13297)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java 2009-05-06 10:38:41 UTC (rev 13298)
@@ -9,6 +9,8 @@
import org.testng.annotations.Test;
/**
+ * Testing file actions of CMS which require workflow security.
+ *
* @author <a href="mailto:vrockai@redhat.com">Viliam Rockai</a>
*/
@@ -17,65 +19,72 @@
private static final String SUB_MOVE = "submit";
+ /** prefix for locator properties = cms.file.work. */
public final String casePfx = "cms.file.work.";
- private final String LAB_LANG_CZECH = getLoc(casePfx+"lab.lang.czech","label=Czech");
- private final String LNK_DENY = getLoc(casePfx+"lnk.deny","link=Deny");
- private final String LNK_PREVIEW = getLoc(casePfx+"lnk.preview","link=Preview");
- private final String LNK_APPROVE = getLoc(casePfx+"lnk.approve","link=Approve");
- private final String SUB_FILE_CREATE = getLoc(casePfx+"sub.file.create","save");
- private final String SUB_FILE_CREATE_CANCEL = getLoc(casePfx+"sub.file.create.cancel","cancel");
- private final String SEL_LANG = getLoc(casePfx+"sel.lang","language");
- private final String INP_TITLE = getLoc(casePfx+"inp.title","title");
- private final String INP_DESC = getLoc(casePfx+"inp.desc","description");
- private final String INP_FILENAME = getLoc(casePfx+"inp.filename","filename");
- private final String LAB_CREATE_FILE = getLoc(casePfx+"lab.create.file","label=Create File");
- private final String LNK_CMS = getLoc(casePfx+"lnk.cms","link=CMS");
- private final String LNK_ADMIN = getLoc(casePfx+"lnk.admin","link=Admin");
+ private final String LAB_LANG_CZECH = getLoc(casePfx + "lab.lang.czech", "label=Czech");
+ private final String LNK_DENY = getLoc(casePfx + "lnk.deny", "link=Deny");
+ private final String LNK_PREVIEW = getLoc(casePfx + "lnk.preview", "link=Preview");
+ private final String LNK_APPROVE = getLoc(casePfx + "lnk.approve", "link=Approve");
+ private final String SUB_FILE_CREATE = getLoc(casePfx + "sub.file.create", "save");
+ private final String SUB_FILE_CREATE_CANCEL = getLoc(casePfx + "sub.file.create.cancel", "cancel");
+ private final String SEL_LANG = getLoc(casePfx + "sel.lang", "language");
+ private final String INP_TITLE = getLoc(casePfx + "inp.title", "title");
+ private final String INP_DESC = getLoc(casePfx + "inp.desc", "description");
+ private final String INP_FILENAME = getLoc(casePfx + "inp.filename", "filename");
+ private final String LAB_CREATE_FILE = getLoc(casePfx + "lab.create.file", "label=Create File");
+ private final String LNK_CMS = getLoc(casePfx + "lnk.cms", "link=CMS");
+ private final String LNK_ADMIN = getLoc(casePfx + "lnk.admin", "link=Admin");
- public final String SELECT_CMS_MAIN = getLoc(casePfx+"select.cms.main","//div[@id='center']/div/div/div[1]/div/select");
- public final String CMS_FILE_TABLE = getLoc(casePfx+"cms.file.table","//div[@id='center']/div/div/div[3]/table");
-
- public final String CMS_T_SELECT = getLoc(casePfx+"cms.t.select","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/select");
- public final String CMS_T_SUBMIT = getLoc(casePfx+"cms.t.submit","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/input");
-
- public final String CMS_WF_TABLE = getLoc(casePfx+"cms.wf.table","//div[@id='center']/div/div/table[2]");
- public final String CMS_FV_TABLE = getLoc(casePfx+"cms.fv.table","//div[@id='center']/div/div/table");
- public final String CMS_T_VER = getLoc(casePfx+"cms.t.ver","//div[@id=''center'']/div/div/table/tbody/tr[{0}]/td[1]/a");
- public final String WYSIWYG_EDITOR_LOCATOR = getLoc(casePfx+"wysiwyg.editor.locator","mce_editor_0");
-
+ public final String SELECT_CMS_MAIN = getLoc(casePfx + "select.cms.main", "//div[@id='center']/div/div/div[1]/div/select");
+ public final String CMS_FILE_TABLE = getLoc(casePfx + "cms.file.table", "//div[@id='center']/div/div/div[3]/table");
+
+ public final String CMS_T_SELECT = getLoc(casePfx + "cms.t.select", "//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/select");
+ public final String CMS_T_SUBMIT = getLoc(casePfx + "cms.t.submit", "//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/input");
+
+ public final String CMS_WF_TABLE = getLoc(casePfx + "cms.wf.table", "//div[@id='center']/div/div/table[2]");
+ public final String CMS_FV_TABLE = getLoc(casePfx + "cms.fv.table", "//div[@id='center']/div/div/table");
+ public final String CMS_T_VER = getLoc(casePfx + "cms.t.ver", "//div[@id=''center'']/div/div/table/tbody/tr[{0}]/td[1]/a");
+ public final String WYSIWYG_EDITOR_LOCATOR = getLoc(casePfx + "wysiwyg.editor.locator", "mce_editor_0");
+
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
logoutIfPossible();
login("admin", "admin");
- }
-
- @AfterMethod( groups = { "log" })
+ }
+
+ @AfterMethod(groups = { "log" })
public void logoutAfterTest() {
-
+
}
-
+
+ /**
+ * Creates new file with no content. At first attempt it cancels the action
+ * and file is not created. At the second attempt it really creates the
+ * file. The file is approved and it is asserted that only one file with the
+ * specified file name exists in the file table.
+ */
@Test(enabled = true, description = "Simple file creation.")
public void testCreateFileApprove() {
-
+
// canceling first
-
+
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.waitForPopUp("_top", PAGE_LOAD);
selenium.type(INP_FILENAME, "newFile");
selenium.type(INP_DESC, "newFile description");
selenium.type(INP_TITLE, "newFile title");
selenium.select(SEL_LANG, LAB_LANG_CZECH);
-
+
selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
// saving
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -85,32 +94,37 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SELECT_CMS_MAIN, LAB_CREATE_FILE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.waitForPopUp("_top", PAGE_LOAD);
selenium.type(INP_FILENAME, "newFile");
selenium.type(INP_DESC, "newFile description");
selenium.type(INP_TITLE, "newFile title");
selenium.select(SEL_LANG, LAB_LANG_CZECH);
-
+
selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
int row = countTableRows(CMS_WF_TABLE) - 1;
Assert.assertEquals(row, 1, "More instances of newly created document exists.");
-
+
Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
-
+
selenium.click(LNK_APPROVE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
row = countTableRows(CMS_FV_TABLE) - 1;
Assert.assertEquals(row, 3, "More then 2 version of recently created and approved file found.");
}
-
+
+ /**
+ * The file named "newFileDeny" is created, but then is denied in the
+ * workflow process. It is asserted that the file is not appearing in the
+ * file table.
+ */
@Test(enabled = true, description = "Simple file creation.")
public void testCreateFileDeny() {
selenium.click(LNK_ADMIN);
@@ -126,25 +140,29 @@
selenium.select(SEL_LANG, LAB_LANG_CZECH);
selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
int row = countTableRows(CMS_WF_TABLE) - 1;
Assert.assertEquals(row, 1, "More instances of newly created document exists.");
-
+
Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
Assert.assertTrue(selenium.isElementPresent(LNK_PREVIEW));
Assert.assertTrue(selenium.isElementPresent(LNK_APPROVE));
Assert.assertTrue(selenium.isElementPresent(LNK_DENY));
-
+
selenium.click(LNK_DENY);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertFalse(selenium.isTextPresent("newFileDeny"));
}
+ /**
+ * File named "file2preview" with content "vivat!" is created and then
+ * previewed. The content of file is asserted to be appearing on the screen.
+ */
@Test(enabled = true, description = "Simple file creation.")
- public void testCreateFilePreview(){
+ public void testCreateFilePreview() {
String name = "file2preview";
-
+
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_ADMIN);
@@ -163,18 +181,25 @@
fillInEditor("vivat!");
selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.click(LNK_PREVIEW);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertTrue(selenium.isTextPresent("Pending Approval Queue"));
-
+
selenium.selectFrame(WYSIWYG_EDITOR_LOCATOR);
Assert.assertTrue(selenium.isTextPresent("vivat!"));
selenium.selectFrame("relative=top");
-
+
}
-
+
+ /**
+ * The file from {@link CMSFileWorkflowTestCase#testDeleteFile()} is used in
+ * this test. The file is deleted. In the first approach the deletion is
+ * canceled. In the second approach the file deletion is affirmed and the
+ * file is deleted. The file is then asserted not to appear in the file
+ * table.
+ */
@Test(enabled = true, dependsOnMethods = "testCreateFileApprove", description = "Simple file delete Cancel in first step, and then delete.")
public void testDeleteFile() {
selenium.click(LNK_ADMIN);
@@ -184,52 +209,62 @@
selenium.waitForPageToLoad(PAGE_LOAD);
int row = findTableRow(CMS_FILE_TABLE, "newFile", 0) + 1;
-
- selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Delete");
- selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
+
+ selenium.select(MessageFormat.format(CMS_T_SELECT, row), "label=Delete");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT, row));
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
-
+
selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
row = findTableRow(CMS_FILE_TABLE, "newFile", 0) + 1;
-
- selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Delete");
- selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
-
+
+ selenium.select(MessageFormat.format(CMS_T_SELECT, row), "label=Delete");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT, row));
+
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent("Confirm Deletion of /newFile"));
Assert.assertTrue(selenium.isTextPresent("WARNING! You will not be able to undo these change!"));
Assert.assertTrue(selenium.isTextPresent("Are you sure you want to delete this resource?"));
selenium.click(SUB_MOVE);
selenium.waitForPageToLoad(PAGE_LOAD);
+ Assert.assertFalse(selenium.isTextPresent("newFile"));
}
-
+
+ /**
+ * Moving of the file. File named "fileToMove" is created in the root
+ * directory. The file is then moved into the "default" directory. At first
+ * attempt the file move is canceled and it is asserted that the file wasnt
+ * moved (it is not appearing in the "default" directory). At the second
+ * attempt the file is really moved to the destination directory and it is
+ * asserted that the file is not present in the root directory but is
+ * present in the "default" directory.
+ */
@Test(enabled = true, description = "File creation and moving to default directory.")
public void testMoveFile() {
- createFile("fileToMove","");
-
- //canceling first
-
+ createFile("fileToMove", "");
+
+ // canceling first
+
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
int row = findTableRow(CMS_FILE_TABLE, "fileToMove", 0) + 1;
;
- selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Move");
- selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
+ selenium.select(MessageFormat.format(CMS_T_SELECT, row), "label=Move");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT, row));
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
// assuming file is not moved
-
+
selenium.click("link=default");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -239,7 +274,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=fileToMove"));
-
+
// really moving file
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -249,15 +284,15 @@
selenium.waitForPageToLoad(PAGE_LOAD);
row = findTableRow(CMS_FILE_TABLE, "fileToMove", 0) + 1;
- selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Move");
- selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
+ selenium.select(MessageFormat.format(CMS_T_SELECT, row), "label=Move");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT, row));
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
selenium.click(SUB_MOVE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
// assuming file is moved
-
+
selenium.click("link=default");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -269,17 +304,22 @@
Assert.assertFalse(selenium.isElementPresent("link=fileToMove"));
}
+ /**
+ * Copying of a file. The file named "file2copy" is created in the root
+ * directory and then is copied into the default directory. File is then
+ * asserted to appear in both root and the "default" directories.
+ */
@Test(enabled = true, dependsOnMethods = "testCreateFileApprove", description = "File creation and copying to default directory.")
public void testCopyFile() {
- createFile("file2copy","");
+ createFile("file2copy", "");
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
int row = findTableRow(CMS_FILE_TABLE, "file2copy", 0) + 1;
- selenium.select(MessageFormat.format(CMS_T_SELECT,row), "label=Copy");
- selenium.click(MessageFormat.format(CMS_T_SUBMIT,row));
+ selenium.select(MessageFormat.format(CMS_T_SELECT, row), "label=Copy");
+ selenium.click(MessageFormat.format(CMS_T_SUBMIT, row));
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=default");
selenium.click(SUB_MOVE);
@@ -294,33 +334,41 @@
Assert.assertTrue(selenium.isElementPresent("link=file2copy"));
}
-
-
- @Test(enabled = true, dependsOnMethods = "testCreateFileApprove", description="File Creation and editing.")
- public void testEditFile(){
-
+
+ /**
+ * Basic editing on a file - changing it content. The file "file2edit" is
+ * created. The string "contentstring1" is inserted as a content of this
+ * file. At the first attempt the file creation is canceled at the second
+ * attpemt the file is created and approved. The content of the file is then
+ * changed to "contentstring2" and the change is approved. The content of
+ * the file is then changed to "contentstring3" and the change is denied. At
+ * the end it is asserted that the file content is "contentstring2".
+ */
+ @Test(enabled = true, dependsOnMethods = "testCreateFileApprove", description = "File Creation and editing.")
+ public void testEditFile() {
+
int row = -1;
String file = "file2edit";
-
- createFile(file,"contentstring1");
-
+
+ createFile(file, "contentstring1");
+
// canceling for the first time
-
+
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
-
- selenium.click("link="+file);
+
+ selenium.click("link=" + file);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
row = findTableRow(CMS_FV_TABLE, "1.1", 2) + 1;
selenium.click(MessageFormat.format(CMS_T_VER, row));
selenium.waitForPageToLoad(PAGE_LOAD);
fillInEditor("contentstring2");
selenium.click(SUB_FILE_CREATE_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
// really creating and approving
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -330,32 +378,32 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
-
- selenium.click("link="+file);
+
+ selenium.click("link=" + file);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
row = findTableRow(CMS_FV_TABLE, "1.1", 2) + 1;
selenium.click(MessageFormat.format(CMS_T_VER, row));
selenium.waitForPageToLoad(PAGE_LOAD);
fillInEditor("contentstring2");
selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.click(LNK_APPROVE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
row = findTableRow(CMS_FV_TABLE, "1.3", 2) + 1;
selenium.click(MessageFormat.format(CMS_T_VER, row));
selenium.waitForPageToLoad(PAGE_LOAD);
fillInEditor("contentstring3");
selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.click(LNK_DENY);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertFalse(selenium.isTextPresent("1.5"));
-
+
row = findTableRow(CMS_FV_TABLE, "1.3", 2) + 1;
selenium.click(MessageFormat.format(CMS_T_VER, row));
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -363,10 +411,9 @@
Assert.assertTrue(selenium.isTextPresent("contentstring2"));
selenium.selectFrame("relative=top");
}
-
-
- private void createFile(String name,String content) {
-
+
+ private void createFile(String name, String content) {
+
// save and approve
selenium.open(ADDR_PORTAL);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -383,21 +430,22 @@
selenium.type(INP_DESC, name + " description");
selenium.type(INP_TITLE, "existingFile title");
selenium.select(SEL_LANG, LAB_LANG_CZECH);
-
+
selenium.click(SUB_FILE_CREATE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.click(LNK_APPROVE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
Assert.assertEquals(name, selenium.getText("link=" + name));
- logout();login("admin","admin");
+ logout();
+ login("admin", "admin");
}
-
- private void fillInEditor(String content){
- selenium.getEval("selenium.fillInEditor('"+WYSIWYG_EDITOR_LOCATOR+"','"+content+"')");
+
+ private void fillInEditor(String content) {
+ selenium.getEval("selenium.fillInEditor('" + WYSIWYG_EDITOR_LOCATOR + "','" + content + "')");
}
}
15 years
JBoss Portal SVN: r13297 - branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-05 12:41:12 -0400 (Tue, 05 May 2009)
New Revision: 13297
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
Log:
- JBPORTAL-2384: Handle pages named default separately to replicate previous behavior.
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2009-05-05 16:40:12 UTC (rev 13296)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2009-05-05 16:41:12 UTC (rev 13297)
@@ -248,17 +248,17 @@
}
else
{
- // Copy to dashboard link: only if page doesn't already exist in the dashboard
+ // Copy to dashboard link: only if page doesn't already exist in the dashboard and is not named
+ // default (to preserve previous behavior).
if ((user != null))
{
// if the page exists in dashboard, its id will be dashboardId.getChildId(pageName)...
- if (controller.getPortalObjectContainer().getObject(cm.getDashboardIdFor(user).getChildId(pageName)) == null)
+ if (!"default".equals(pageName) && controller.getPortalObjectContainer().getObject(cm.getDashboardIdFor(user).getChildId(pageName)) == null)
{
ImportPageToDashboardCommand iptdc = new ImportPageToDashboardCommand(page.getId());
rd.setAttribute("org.jboss.portal.header.COPY_TO_DASHBOARD_URL", new PortalURLImpl(iptdc, controllerCtx, null, null));
}
}
-
}
}
15 years
JBoss Portal SVN: r13296 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-05 12:40:12 -0400 (Tue, 05 May 2009)
New Revision: 13296
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
Log:
- JBPORTAL-2384: Handle pages named default separately to replicate previous behavior.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2009-05-05 14:20:53 UTC (rev 13295)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2009-05-05 16:40:12 UTC (rev 13296)
@@ -249,11 +249,12 @@
}
else
{
- // Copy to dashboard link: only if page doesn't already exist in the dashboard
+ // Copy to dashboard link: only if page doesn't already exist in the dashboard and is not named
+ // default (to preserve previous behavior).
if ((user != null))
{
// if the page exists in dashboard, its id will be dashboardId.getChildId(pageName)...
- if (controller.getPortalObjectContainer().getObject(cm.getDashboardIdFor(user).getChildId(pageName)) == null)
+ if (!"default".equals(pageName) && controller.getPortalObjectContainer().getObject(cm.getDashboardIdFor(user).getChildId(pageName)) == null)
{
ImportPageToDashboardCommand iptdc = new ImportPageToDashboardCommand(page.getId());
rd.setAttribute("org.jboss.portal.header.COPY_TO_DASHBOARD_URL", new PortalURLImpl(iptdc, controllerCtx, null, null));
15 years
JBoss Portal SVN: r13295 - in branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core: impl/model and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-05 10:20:53 -0400 (Tue, 05 May 2009)
New Revision: 13295
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/CustomizationManager.java
Log:
- JBPORTAL-2384:
+ Really avoid creating dashboard until needed.
+ Fixed incorrect behavior for copy to dashboard link where the link wouldn't appear if the dashboard didn't already exist.
+ Problem with new behavior: copy to dashboard is now also present on default/default which wasn't the case before... This
doesn't have any side effect has copy will not copy if the page already exists in dashboard.
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2009-05-05 14:10:01 UTC (rev 13294)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2009-05-05 14:20:53 UTC (rev 13295)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -39,7 +39,6 @@
import org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceRenderCommand;
import org.jboss.portal.core.model.instance.command.render.RenderPortletInstanceCommand;
import org.jboss.portal.core.model.portal.Page;
-import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectId;
@@ -66,10 +65,10 @@
import org.jboss.portal.theme.page.WindowContext;
import org.jboss.portal.theme.page.WindowResult;
+import java.security.Principal;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import java.security.Principal;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -227,6 +226,8 @@
rd.setAttribute("org.jboss.portal.header.LOGIN_URL", portalURL);
}
+ CustomizationManager cm = controller.getCustomizationManager();
+
// Edit dashboard page || Copy to dashboard link
boolean isDashboard = false;
if (cc instanceof RenderPageCommand)
@@ -247,12 +248,11 @@
}
else
{
- //
- CustomizationManager cm = controller.getCustomizationManager();
- if ((user != null) && (cm.hasDashboard(user)))
+ // Copy to dashboard link: only if page doesn't already exist in the dashboard
+ if ((user != null))
{
- Portal dashboard = cm.getDashboard(user);
- if (dashboard.getChild(pageName) == null)
+ // if the page exists in dashboard, its id will be dashboardId.getChildId(pageName)...
+ if (controller.getPortalObjectContainer().getObject(cm.getDashboardIdFor(user).getChildId(pageName)) == null)
{
ImportPageToDashboardCommand iptdc = new ImportPageToDashboardCommand(page.getId());
rd.setAttribute("org.jboss.portal.header.COPY_TO_DASHBOARD_URL", new PortalURLImpl(iptdc, controllerCtx, null, null));
@@ -265,13 +265,9 @@
//
if (!isDashboard && user != null)
{
- Portal dashboard = controller.getCustomizationManager().getDashboard(user);
- if (dashboard != null)
- {
- ViewPortalCommand vdc = new ViewPortalCommand(dashboard.getId());
- rd.setAttribute("org.jboss.portal.header.DASHBOARD_URL", new PortalURLImpl(vdc, controllerCtx, null, null));
- }
-
+ PortalObjectId dashboardId = cm.getDashboardIdFor(user);
+ ViewPortalCommand vdc = new ViewPortalCommand(dashboardId);
+ rd.setAttribute("org.jboss.portal.header.DASHBOARD_URL", new PortalURLImpl(vdc, controllerCtx, null, null));
}
//
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2009-05-05 14:10:01 UTC (rev 13294)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2009-05-05 14:20:53 UTC (rev 13295)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -266,17 +266,17 @@
public boolean hasDashboard(User user)
{
- Context dashboardContext = portalObjectContainer.getContext(dashboardContextId);
+ Context dashboardContext = portalObjectContainer.getContext(dashboardContextId);
- //
- String userId = getUserId(user);
+ //
+ String userId = getUserId(user);
- //
- Portal dashboardPortal = dashboardContext.getPortal(userId);
-
- return dashboardPortal != null;
+ //
+ Portal dashboardPortal = dashboardContext.getPortal(userId);
+
+ return dashboardPortal != null;
}
-
+
public Portal getDashboard(User user) throws IllegalArgumentException
{
//
@@ -363,6 +363,20 @@
}
}
+ public PortalObjectId getDashboardIdFor(User user)
+ {
+ if (user != null)
+ {
+ String userId = getUserId(user);
+
+ Context dashboardContext = portalObjectContainer.getContext(dashboardContextId);
+
+ return dashboardContext.getId().getChildId(userId);
+ }
+
+ return null;
+ }
+
private String getUserId(User user)
{
return user.getUserName();
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/CustomizationManager.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/CustomizationManager.java 2009-05-05 14:10:01 UTC (rev 13294)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/model/CustomizationManager.java 2009-05-05 14:20:53 UTC (rev 13295)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -25,6 +25,7 @@
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.identity.User;
@@ -73,15 +74,23 @@
*/
boolean isDashboard(PortalObject object, User user);
- /**
- * Returns true if a dashboard exists for the user
- */
+ /** Returns true if a dashboard exists for the user */
boolean hasDashboard(User user);
-
+
/**
* Destroys the dashboard of a specified user.
*
* @param userId
*/
void destroyDashboard(String userId);
+
+ /**
+ * Retrieves the identifier for the specified user's dashboard. Note that this doesn't imply that the dashboard
+ * actually exists. In particular, this allows for creation of URLs targeting the user's dashboard without having to
+ * actually create the associated dashboard until it is really needed.
+ *
+ * @param user the user whose dashboard we want to get the id
+ * @return the identifier for the specified user's dashboard (whether that dashboard exists or not)
+ */
+ PortalObjectId getDashboardIdFor(User user);
}
15 years
JBoss Portal SVN: r13294 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core: impl/model and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-05 10:10:01 -0400 (Tue, 05 May 2009)
New Revision: 13294
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/CustomizationManager.java
Log:
- JBPORTAL-2384:
+ Really avoid creating dashboard until needed.
+ Fixed incorrect behavior for copy to dashboard link where the link wouldn't appear if the dashboard didn't already exist.
+ Problem with new behavior: copy to dashboard is now also present on default/default which wasn't the case before... This
doesn't have any side effect has copy will not copy if the page already exists in dashboard.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2009-05-05 13:00:39 UTC (rev 13293)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2009-05-05 14:10:01 UTC (rev 13294)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -20,6 +20,7 @@
* 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.portal.core.aspects.controller;
import org.apache.log4j.Logger;
@@ -39,7 +40,6 @@
import org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceRenderCommand;
import org.jboss.portal.core.model.instance.command.render.RenderPortletInstanceCommand;
import org.jboss.portal.core.model.portal.Page;
-import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectId;
@@ -66,10 +66,10 @@
import org.jboss.portal.theme.page.WindowContext;
import org.jboss.portal.theme.page.WindowResult;
+import java.security.Principal;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import java.security.Principal;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -227,6 +227,8 @@
rd.setAttribute("org.jboss.portal.header.LOGIN_URL", portalURL);
}
+ CustomizationManager cm = controller.getCustomizationManager();
+
// Edit dashboard page || Copy to dashboard link
boolean isDashboard = false;
if (cc instanceof RenderPageCommand)
@@ -247,12 +249,11 @@
}
else
{
- //
- CustomizationManager cm = controller.getCustomizationManager();
- if ((user != null) && (cm.hasDashboard(user)))
+ // Copy to dashboard link: only if page doesn't already exist in the dashboard
+ if ((user != null))
{
- Portal dashboard = cm.getDashboard(user);
- if (dashboard.getChild(pageName) == null)
+ // if the page exists in dashboard, its id will be dashboardId.getChildId(pageName)...
+ if (controller.getPortalObjectContainer().getObject(cm.getDashboardIdFor(user).getChildId(pageName)) == null)
{
ImportPageToDashboardCommand iptdc = new ImportPageToDashboardCommand(page.getId());
rd.setAttribute("org.jboss.portal.header.COPY_TO_DASHBOARD_URL", new PortalURLImpl(iptdc, controllerCtx, null, null));
@@ -265,13 +266,9 @@
//
if (!isDashboard && user != null)
{
- Portal dashboard = controller.getCustomizationManager().getDashboard(user);
- if (dashboard != null)
- {
- ViewPortalCommand vdc = new ViewPortalCommand(dashboard.getId());
- rd.setAttribute("org.jboss.portal.header.DASHBOARD_URL", new PortalURLImpl(vdc, controllerCtx, null, null));
- }
-
+ PortalObjectId dashboardId = cm.getDashboardIdFor(user);
+ ViewPortalCommand vdc = new ViewPortalCommand(dashboardId);
+ rd.setAttribute("org.jboss.portal.header.DASHBOARD_URL", new PortalURLImpl(vdc, controllerCtx, null, null));
}
//
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2009-05-05 13:00:39 UTC (rev 13293)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2009-05-05 14:10:01 UTC (rev 13294)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -20,6 +20,7 @@
* 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.portal.core.impl.model;
import org.jboss.logging.Logger;
@@ -266,17 +267,17 @@
public boolean hasDashboard(User user)
{
- Context dashboardContext = portalObjectContainer.getContext(dashboardContextId);
+ Context dashboardContext = portalObjectContainer.getContext(dashboardContextId);
- //
- String userId = getUserId(user);
+ //
+ String userId = getUserId(user);
- //
- Portal dashboardPortal = dashboardContext.getPortal(userId);
-
- return dashboardPortal != null;
+ //
+ Portal dashboardPortal = dashboardContext.getPortal(userId);
+
+ return dashboardPortal != null;
}
-
+
public Portal getDashboard(User user) throws IllegalArgumentException
{
//
@@ -363,6 +364,20 @@
}
}
+ public PortalObjectId getDashboardIdFor(User user)
+ {
+ if (user != null)
+ {
+ String userId = getUserId(user);
+
+ Context dashboardContext = portalObjectContainer.getContext(dashboardContextId);
+
+ return dashboardContext.getId().getChildId(userId);
+ }
+
+ return null;
+ }
+
private String getUserId(User user)
{
return user.getUserName();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/CustomizationManager.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/CustomizationManager.java 2009-05-05 13:00:39 UTC (rev 13293)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/CustomizationManager.java 2009-05-05 14:10:01 UTC (rev 13294)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -20,11 +20,13 @@
* 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.portal.core.model;
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.identity.User;
@@ -73,15 +75,23 @@
*/
boolean isDashboard(PortalObject object, User user);
- /**
- * Returns true if a dashboard exists for the user
- */
+ /** Returns true if a dashboard exists for the user */
boolean hasDashboard(User user);
-
+
/**
* Destroys the dashboard of a specified user.
*
* @param userId
*/
void destroyDashboard(String userId);
+
+ /**
+ * Retrieves the identifier for the specified user's dashboard. Note that this doesn't imply that the dashboard
+ * actually exists. In particular, this allows for creation of URLs targeting the user's dashboard without having to
+ * actually create the associated dashboard until it is really needed.
+ *
+ * @param user the user whose dashboard we want to get the id
+ * @return the identifier for the specified user's dashboard (whether that dashboard exists or not)
+ */
+ PortalObjectId getDashboardIdFor(User user);
}
15 years
JBoss Portal SVN: r13293 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-05-05 09:00:39 -0400 (Tue, 05 May 2009)
New Revision: 13293
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java
Log:
JBPORTAL-2387: Same HTTP header property set multiple times if set by multiple portlets
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java 2009-05-05 12:58:29 UTC (rev 13292)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java 2009-05-05 13:00:39 UTC (rev 13293)
@@ -82,7 +82,7 @@
for (String key: unsr.getProperties().getTransportHeaders().keySet())
{
String value = unsr.getProperties().getTransportHeaders().getValue(key);
- ((AbstractServerContext) invocation.getServerContext()).getResponse().addHeader(key, value);
+ ((AbstractServerContext) invocation.getServerContext()).getResponse().setHeader(key, value);
}
}
}
@@ -98,7 +98,7 @@
for (String key: fr.getProperties().getTransportHeaders().keySet())
{
String value = fr.getProperties().getTransportHeaders().getValue(key);
- ((AbstractServerContext) invocation.getServerContext()).getResponse().addHeader(key, value);
+ ((AbstractServerContext) invocation.getServerContext()).getResponse().setHeader(key, value);
}
}
}
15 years