@Override public String serializeToString() { StringBuilder str = new StringBuilder(); return str.append(this.getClass().getSimpleName()).append(":[").append( "id=<").append(getId()).append(">").append( ", name=<").append(getName() == null ? "\\0" : BeansUtils.createEscaping(getName())).append(">").append( ", shortName=<").append(getShortName() == null ? "\\0" : BeansUtils.createEscaping(getShortName())).append(">").append( ']').toString(); }
/** * Replace link for mail invitation not concerning authz type * * @param vo vo to get invite link for * @param group group if is for group application * @param text base of URL for invitation * @return full URL to application form */ private String buildInviteURL(Vo vo, Group group, String text) { if (text == null || text.isEmpty()) return ""; text += "?vo=" + getEncodedString(vo.getShortName()); if (group != null) { // application for group too text += "&group="+getEncodedString(group.getName()); } return text; }
if (!text.endsWith("/")) text += "/"; text += "registrar/"; text += "?vo=" + getEncodedString(vo.getShortName()) + "&page=apps"; if (!newValue.endsWith("/")) newValue += "/"; newValue += namespace + "/registrar/"; newValue += "?vo="+getEncodedString(vo.getShortName()); newValue += ((group != null) ? "&group="+getEncodedString(group.getName()) : ""); newValue += "&page=apps";
/** * This method creates groups used by VOOT, that are represented to end-user. They are created from groups by provider. * * @param groups groups from provider * @return array of groups, that are represented to end-user * @throws VOOTException if can not read groups by provider */ private VOOTGroup[] createVOOTGroups(List<Group> groups) throws VOOTException{ GroupsManagerBl groupManager = perun.getGroupsManagerBl(); VOOTGroup[] vootGroups = new VOOTGroup[groups.size()]; int i=0; for(Group group : groups){ String vootMembership; try{ if(groupManager.getAdmins(session, group).contains(user)){ vootMembership = "admin"; } else{ vootMembership = "member"; } vootGroups[i] = new VOOTGroup (group, groupManager.getVo(session, group).getShortName(), vootMembership); i++; }catch(InternalErrorException ex){ throw new VOOTException("internal_server_error"); } } return vootGroups; }
o+= vo.getShortName(); writer.write(o + '\n');
perunUniqueGroupName+= vo.getShortName() + ":" + group.getName();
public void createVo(Vo vo) throws InternalErrorException { // Create a set of attributes for vo Attributes voAttributes = new BasicAttributes(); // Create the objectclass to add Attribute voObjClasses = new BasicAttribute(EventProcessorImpl.ldapAttrObjectClass); voObjClasses.add(EventProcessorImpl.objectClassTop); voObjClasses.add(EventProcessorImpl.objectClassOrganization); voObjClasses.add(EventProcessorImpl.objectClassPerunVO); // Add attributes voAttributes.put(voObjClasses); voAttributes.put(EventProcessorImpl.ldapAttrOrganization, vo.getShortName()); voAttributes.put(EventProcessorImpl.ldapAttrDescription, vo.getName()); voAttributes.put(EventProcessorImpl.ldapAttrPerunVoId, String.valueOf(vo.getId())); // Create the entires try { ldapTemplate.bind(getVoDNByVoId(String.valueOf(vo.getId())), null, voAttributes); log.debug("New entry created in LDAP: Vo {}.", vo); } catch (NameNotFoundException e) { throw new InternalErrorException(e); } }
application.getVo().getShortName() + ((application.getGroup() != null) ? application.getGroup().getName() : "nogroup") + application.getCreatedBy()+application.getExtSourceName()+application.getExtSourceType();
if (!newValue.endsWith("/")) newValue += "/"; newValue += namespace + "/registrar/"; newValue += "?vo="+getEncodedString(app.getVo().getShortName()); newValue += ((app.getGroup() != null) ? "&group="+getEncodedString(app.getGroup().getName()) : ""); try { if (url != null && !url.isEmpty()) url = url + "?vo=" + getEncodedString(app.getVo().getShortName());
throw new RegistrarException("User to invite is already member of your VO:"+vo.getShortName());