use of com.agiletec.aps.system.services.group.Group in project entando-core by entando.
the class ContentAction method removeGroup.
/**
* Esegue l'azione di rimozione di un gruppo dal contenuto in fase di
* redazione.
*
* @return Il codice del risultato dell'azione.
*/
public String removeGroup() {
this.updateContentOnSession();
try {
String extraGroupName = this.getExtraGroupName();
Group group = this.getGroupManager().getGroup(extraGroupName);
if (null != group) {
this.getContent().getGroups().remove(group.getName());
}
} catch (Throwable t) {
_logger.error("error in removeGroup", t);
return FAILURE;
}
return SUCCESS;
}
use of com.agiletec.aps.system.services.group.Group in project entando-core by entando.
the class ExtendedResourceAction method getGroupCodesForSearch.
protected List<String> getGroupCodesForSearch() {
List<Group> groups = this.getAllowedGroups();
List<String> codesForSearch = new ArrayList<String>();
for (int i = 0; i < groups.size(); i++) {
Group group = groups.get(i);
codesForSearch.add(group.getName());
}
return codesForSearch;
}
use of com.agiletec.aps.system.services.group.Group in project entando-core by entando.
the class GroupFinderAction method getGroups.
public List<Group> getGroups() {
List<Group> groups = this.getGroupManager().getGroups();
BeanComparator comparator = new BeanComparator("descr");
Collections.sort(groups, comparator);
return groups;
}
use of com.agiletec.aps.system.services.group.Group in project entando-core by entando.
the class PageFinderAction method getAllowedGroupCodes.
private List<String> getAllowedGroupCodes() {
List<String> allowedGroups = new ArrayList<String>();
UserDetails currentUser = this.getCurrentUser();
List<Group> userGroups = this.getAuthorizationManager().getUserGroups(currentUser);
Iterator<Group> iter = userGroups.iterator();
while (iter.hasNext()) {
Group group = iter.next();
allowedGroups.add(group.getName());
}
return allowedGroups;
}
use of com.agiletec.aps.system.services.group.Group in project entando-core by entando.
the class BaseAction method getActualAllowedGroupCodes.
protected List<String> getActualAllowedGroupCodes() {
List<String> codes = new ArrayList<String>();
List<Group> groups = this.getActualAllowedGroups();
for (int i = 0; i < groups.size(); i++) {
Group group = groups.get(i);
if (null != group && !codes.contains(group.getName())) {
codes.add(group.getName());
}
}
return codes;
}
Aggregations