summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-07-26 02:37:54 (EDT)
committer Stephan Born2013-09-23 04:55:54 (EDT)
commit6f503745fc0790ff0f19e5c7dbdbb22ad05412b3 (patch)
treedeec8b687bfd906b886b6a31c9db25c248174629
parent721bbb2cfd48e9d2cd6c06492716365f5f4d22c1 (diff)
downloadorg.eclipse.stardust.ui.web-6f503745fc0790ff0f19e5c7dbdbb22ad05412b3.zip
org.eclipse.stardust.ui.web-6f503745fc0790ff0f19e5c7dbdbb22ad05412b3.tar.gz
org.eclipse.stardust.ui.web-6f503745fc0790ff0f19e5c7dbdbb22ad05412b3.tar.bz2
Jira-ID: CRNT-29779
Made changes to PortalApplication.logout to call logout script Made changes to AuditTrailBean to call portalApplication.logout on cleanupATD() and cleanupATMD() git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@66282 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--admin-portal/src/main/java/org/eclipse/stardust/ui/web/admin/views/AuditTrailBean.java26
-rw-r--r--portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java13
2 files changed, 18 insertions, 21 deletions
diff --git a/admin-portal/src/main/java/org/eclipse/stardust/ui/web/admin/views/AuditTrailBean.java b/admin-portal/src/main/java/org/eclipse/stardust/ui/web/admin/views/AuditTrailBean.java
index 9dc39d0..ef7dc02 100644
--- a/admin-portal/src/main/java/org/eclipse/stardust/ui/web/admin/views/AuditTrailBean.java
+++ b/admin-portal/src/main/java/org/eclipse/stardust/ui/web/admin/views/AuditTrailBean.java
@@ -134,7 +134,7 @@ public class AuditTrailBean extends PopupUIComponentBean
* @param event
* @throws PortalException
*/
- public String cleanupATMD()
+ public boolean cleanupATMD()
{
try
@@ -146,7 +146,7 @@ public class AuditTrailBean extends PopupUIComponentBean
service.cleanupRuntimeAndModels();
ModelCache.findModelCache().reset();
SessionContext.findSessionContext().resetSession();
- return "ippPortalLogout";
+ return true;
}
}
// catch (AccessForbiddenException e)
@@ -154,7 +154,7 @@ public class AuditTrailBean extends PopupUIComponentBean
{
ExceptionHandler.handleException(e);
}
- return null;
+ return false;
}
/**
@@ -198,10 +198,10 @@ public class AuditTrailBean extends PopupUIComponentBean
public boolean accept()
{
auditTrailAndModelCleanUpDialog = null;
- String navigationRuleId = cleanupATMD();
- if (StringUtils.isNotEmpty(navigationRuleId))
+ boolean navigationStatus = cleanupATMD();
+ if (navigationStatus)
{
- FacesUtils.handleNavigation(navigationRuleId);
+ PortalApplication.getInstance().logout();
}
return true;
}
@@ -265,7 +265,7 @@ public class AuditTrailBean extends PopupUIComponentBean
*
* @param event
*/
- public String cleanupATD(boolean retainUsersAndDepts)
+ public boolean cleanupATD(boolean retainUsersAndDepts)
{
AdministrationService service = null;
try
@@ -275,15 +275,15 @@ public class AuditTrailBean extends PopupUIComponentBean
{
service.cleanupRuntime(retainUsersAndDepts);
SessionContext.findSessionContext().resetSession();
- return "ippPortalLogout";
+ return true;
}
- return null;
+ return false;
}
catch (PublicException e)
{
ExceptionHandler.handleException(e);
}
- return null;
+ return false;
}
@Override
@@ -367,10 +367,10 @@ public class AuditTrailBean extends PopupUIComponentBean
public boolean accept()
{
mappedConfirmationDialog = null;
- String navigationRuleId = cleanupATD(retainUsersAndDepts);
- if (StringUtils.isNotEmpty(navigationRuleId))
+ boolean navigationStatus = cleanupATD(retainUsersAndDepts);
+ if (navigationStatus)
{
- FacesUtils.handleNavigation(navigationRuleId);
+ PortalApplication.getInstance().logout();
}
return true;
}
diff --git a/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java b/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java
index b4bac7d..d61d19c 100644
--- a/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java
+++ b/portal-common/src/main/java/org/eclipse/stardust/ui/web/common/app/PortalApplication.java
@@ -942,28 +942,25 @@ public class PortalApplication
/**
* @return
*/
- public String logout()
+ public void logout()
{
+ String script=null;
// Close All Open Views
closeAllViews();
-
// If All Views are successfully closed, then fire logout
if (getOpenViewsSize() == 0)
{
// don't directly logout, but redirect main page towards logout
- String logoutScript = "InfinityBpm.Core.closeSession();";
+ String logoutScript = "parent.BridgeUtils.logout(true);";
//JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(), logoutScript);
addEventScript(logoutScript); // This is required since addJavascriptCall does not work if JSF Page refresh is involved
SessionRendererHelper.removeCurrentSession(SessionRendererHelper.getPortalSessionRendererId(getLoggedInUser()));
}
else
{
- if (trace.isDebugEnabled())
- {
- trace.debug("Not all Views got closed successully. Cannot logout...");
- }
+ script = "parent.BridgeUtils.showAlert('Not all Views got closed successully. Cannot logout...');";
}
- return null;
+ addEventScript(script);
}
/**