summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-07-30 09:52:38 (EDT)
committer Stephan Born2013-09-23 04:56:39 (EDT)
commit4fcbf0771ec7607dd80be455fefb347710c8ab8f (patch)
tree84f584a7b22a0cd4d444814c3d61b1c929826c52
parenta6039ace7d9dee33a91a5e7f9a59def66938c47d (diff)
downloadorg.eclipse.stardust.ui.web-4fcbf0771ec7607dd80be455fefb347710c8ab8f.zip
org.eclipse.stardust.ui.web-4fcbf0771ec7607dd80be455fefb347710c8ab8f.tar.gz
org.eclipse.stardust.ui.web-4fcbf0771ec7607dd80be455fefb347710c8ab8f.tar.bz2
Jira-ID: CRNT-29514
Added method to get modelLabel in AccessControlBean.java using the ModelId. Added title to securityDialogColumns.xhtml Participant column Added field modelId in Participant.java which store the ModelId for currentParticipant. git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@66358 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java26
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/Participant.java11
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java2
-rw-r--r--views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml2
-rw-r--r--views-common/src/main/resources/views-common-messages_en.properties1
5 files changed, 36 insertions, 6 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java
index 8af8827..d7a39f0 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/AccessControlBean.java
@@ -12,15 +12,18 @@ package org.eclipse.stardust.ui.web.viewscommon.security;
import javax.faces.event.ActionEvent;
+import org.eclipse.stardust.engine.api.model.Model;
import org.eclipse.stardust.ui.web.common.table.DefaultRowModel;
-
+import org.eclipse.stardust.ui.web.common.util.StringUtils;
+import org.eclipse.stardust.ui.web.viewscommon.messages.MessagesViewsCommonBean;
+import org.eclipse.stardust.ui.web.viewscommon.utils.ModelCache;
public class AccessControlBean extends DefaultRowModel
{
private static final long serialVersionUID = 6611664925943574939L;
private Participant participant;
-
+
private boolean read;
private boolean modify;
@@ -48,6 +51,8 @@ public class AccessControlBean extends DefaultRowModel
private String readACLPolicyChangedValue;
private String modifyACLPolicyChangedValue;
+
+ private String modelLabel = null;
public static final String ALLOW = "Allow";
@@ -106,6 +111,7 @@ public class AccessControlBean extends DefaultRowModel
{
super();
this.participant = participant;
+ setModelLabel();
setRead(false);
setModify(false);
setCreate(false);
@@ -120,6 +126,7 @@ public class AccessControlBean extends DefaultRowModel
{
super();
this.participant = participant;
+ setModelLabel();
setRead(read);
setModify(modify);
setCreate(create);
@@ -129,6 +136,16 @@ public class AccessControlBean extends DefaultRowModel
setNewOrModified(true);
}
+ private void setModelLabel()
+ {
+ if (StringUtils.isNotEmpty(this.participant.getModelId()))
+ {
+ Model model = ModelCache.findModelCache().getActiveModel(this.participant.getModelId());
+ this.modelLabel = null != model ? MessagesViewsCommonBean.getInstance().getParamString(
+ "views.myDocumentsTreeView.securityDialog.modelName.label", model.getName()) : null;
+ }
+ }
+
public boolean isReadAcl()
{
return readAcl;
@@ -320,6 +337,11 @@ public class AccessControlBean extends DefaultRowModel
this.selectedRow = selectedRow;
}
+ public String getModelLabel()
+ {
+ return modelLabel;
+ }
+
public boolean equals(Object acb)
{
if (!(acb instanceof AccessControlBean))
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/Participant.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/Participant.java
index 151af1e..d4615fc 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/Participant.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/Participant.java
@@ -24,7 +24,6 @@ import org.eclipse.stardust.ui.web.viewscommon.messages.MessagesViewsCommonBean;
import org.eclipse.stardust.ui.web.viewscommon.utils.I18nUtils;
import org.eclipse.stardust.ui.web.viewscommon.utils.ModelUtils;
import org.eclipse.stardust.ui.web.viewscommon.utils.ParticipantUtils;
-import org.eclipse.stardust.ui.web.viewscommon.utils.ServiceFactoryUtils;
import org.eclipse.stardust.ui.web.viewscommon.utils.UserUtils;
public class Participant implements Comparable<Participant>
@@ -36,6 +35,7 @@ public class Participant implements Comparable<Participant>
private String id;
private String name;
private boolean selected;
+ private String modelId;
/**
* @param modelParticipantInfo
@@ -50,12 +50,13 @@ public class Participant implements Comparable<Participant>
*/
private void initialize(ModelParticipantInfo modelParticipantInfo)
{
- String modelId = ModelUtils.extractModelId(modelParticipantInfo.getQualifiedId());
+ modelId = ModelUtils.extractModelId(modelParticipantInfo.getQualifiedId());
principal = new DmsPrincipal(modelParticipantInfo, modelId);
id = principal.getName();
if (modelParticipantInfo instanceof org.eclipse.stardust.engine.api.model.Participant)
{
name = I18nUtils.getParticipantName((org.eclipse.stardust.engine.api.model.Participant) modelParticipantInfo);
+
}
else
// scoped roles / departments
@@ -177,6 +178,12 @@ public class Participant implements Comparable<Participant>
{
return name;
}
+
+ public String getModelId()
+ {
+ return modelId;
+ }
+
@Override
public int hashCode()
{
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java
index b1b8c86..65ae788 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/security/SecurityDialog.java
@@ -474,7 +474,7 @@ public class SecurityDialog extends PopupUIComponentBean
}
for (int i = 0; i < accessControlBean.size(); i++)
{
- if (accessControlBean.get(i).getParticipant().getName().equals(acb.getParticipant().getName()))
+ if (accessControlBean.get(i).getParticipant().getId().equals(acb.getParticipant().getId()))
{
accessControlBean.remove(i);
accessControlBean.add(i, acb);
diff --git a/views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml b/views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml
index cec7504..0fc45bc 100644
--- a/views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml
+++ b/views-common/src/main/resources/META-INF/xhtml/security/securityDialogColumns.xhtml
@@ -21,7 +21,7 @@
</ice:panelGroup>
<ice:panelGroup rendered="#{col.columnName == 'Participant'}"
style="text-align: left;">
- <ice:outputText value="#{row.participant.name}" />
+ <ice:outputText value="#{row.participant.name}" title="#{row.modelLabel}"/>
</ice:panelGroup>
<ice:panelGroup
diff --git a/views-common/src/main/resources/views-common-messages_en.properties b/views-common/src/main/resources/views-common-messages_en.properties
index c763542..94cbc8d 100644
--- a/views-common/src/main/resources/views-common-messages_en.properties
+++ b/views-common/src/main/resources/views-common-messages_en.properties
@@ -273,6 +273,7 @@ views.myDocumentsTreeView.securityDialog.configurationException=Document reposit
views.myDocumentsTreeView.securityDialog.configurationFolderException=Security cannot be configured on the selected node.
views.myDocumentsTreeView.securityDialog.everyone =Everyone
views.myDocumentsTreeView.securityDialog.administrators = Administrators
+views.myDocumentsTreeView.securityDialog.modelName.label = Model Name: {0}
views.notesView.label=New note