Skip to content

Commit e9f3500

Browse files
Merge branch 'mmo-bug3897'
2 parents c42ce8a + c90c55c commit e9f3500

File tree

17 files changed

+1306
-1118
lines changed

17 files changed

+1306
-1118
lines changed

lib-core/src/main/java/com/stratelia/silverpeas/selection/SelectionUsersGroups.java

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import com.stratelia.webactiv.beans.admin.OrganizationController;
3030
import com.stratelia.webactiv.beans.admin.ProfileInst;
3131
import com.stratelia.webactiv.beans.admin.UserDetail;
32-
3332
import java.util.ArrayList;
3433
import java.util.Collections;
3534
import java.util.HashSet;
@@ -43,9 +42,11 @@ public class SelectionUsersGroups implements SelectionExtraParams {
4342

4443
String domainId = null;
4544
String componentId = null;
45+
String objectId = null;
4646
List<String> profileIds = null;
4747
List<String> profileNames = null;
4848

49+
@Deprecated
4950
public String[] getProfileIds() {
5051
if (profileIds != null) {
5152
return profileIds.toArray(new String[profileIds.size()]);
@@ -80,24 +81,66 @@ public void setProfileNames(List<String> profileNames) {
8081
}
8182
}
8283

84+
/**
85+
* Sets the identifier of the roles the users must play.
86+
* @param profileIds the unique identifier of the user roles.
87+
* @deprecated Use instead either both the setObjectId() and setProfileNames() methods to set the roles
88+
* for a given object in the component instance or the setProfileNames() method to set the roles
89+
* for the whole component instance.
90+
*/
91+
@Deprecated
8392
public void setProfileIds(List<String> profileIds) {
8493
this.profileIds = profileIds;
8594
}
8695

96+
/**
97+
* Add the identifier of the role the users must play.
98+
* @param profileId the unique identifier of a user role.
99+
* @deprecated Use instead either both the setObjectId() and setProfileNames() methods to set the roles
100+
* for a given object in the component instance or the setProfileNames() method to set the roles
101+
* for the whole component instance.
102+
*/
103+
@Deprecated
87104
public void addProfileId(String profileId) {
88105
if (profileIds == null) {
89106
profileIds = new ArrayList<String>();
90107
}
91108
profileIds.add(profileId);
92109
}
93110

111+
/**
112+
* Adds the identifiers of the roles the users must play.
113+
* @param profileIds the user role identifiers.
114+
* @deprecated Use instead either both the setObjectId() and setProfileNames() methods to set the roles
115+
* for a given object in the component instance or the setProfileNames() method to set the roles
116+
* for the whole component instance.
117+
*/
118+
@Deprecated
94119
public void addProfileIds(List<String> profileIds) {
95120
if (this.profileIds == null) {
96121
this.profileIds = new ArrayList<String>();
97122
}
98123
profileIds.addAll(profileIds);
99124
}
100125

126+
/**
127+
* Gets the identifier of the object in the component instance for which the users must have
128+
* enough right to access.
129+
* @return the unique identifier of the object, made up of its type followed by its identifier.
130+
*/
131+
public String getObjectId() {
132+
return objectId;
133+
}
134+
135+
/**
136+
* Sets the object in the component instance for which the users must have enough right to access.
137+
* @param objectId the unique identifier of the object in Silverpeas. It must be made up of its
138+
* type followed by its identifier.
139+
*/
140+
public void setObjectId(String objectId) {
141+
this.objectId = objectId;
142+
}
143+
101144
public String getComponentId() {
102145
return componentId;
103146
}
@@ -114,6 +157,7 @@ public void setDomainId(String domainId) {
114157
this.domainId = domainId;
115158
}
116159

160+
@Override
117161
public String getParameter(String name) {
118162
return null;
119163
}

0 commit comments

Comments
 (0)