public Candidate(User user, UserExtSource userExtSource) { if(user != null) { this.setFirstName(user.getFirstName()); this.setLastName(user.getLastName()); this.setMiddleName(user.getMiddleName()); this.setTitleAfter(user.getTitleAfter()); this.setTitleBefore(user.getTitleBefore()); this.setServiceUser(user.isServiceUser()); this.setSponsoredUser(user.isSponsoredUser()); } this.userExtSource = userExtSource; }
public RichGroup(Group group, List<Attribute> attrs) { super(group.getId(), group.getName(), group.getDescription(), group.getCreatedAt(), group.getCreatedBy(), group.getModifiedAt(), group.getModifiedBy(), group.getParentGroupId(), group.getCreatedByUid(), group.getModifiedByUid()); this.setVoId(group.getVoId()); this.groupAttributes = attrs; }
public RichMember(User user, Member member, List<UserExtSource> userExtSources) { super(member.getId(), member.getUserId(), member.getVoId(), member.getStatus(), member.getCreatedAt(), member.getCreatedBy(), member.getModifiedAt(), member.getModifiedBy(), member.getCreatedByUid(), member.getModifiedByUid()); setMembershipType(member.getMembershipType()); setSponsored(member.isSponsored()); this.setGroupsStatuses(member.getGroupStatuses()); this.user = user; this.userExtSources = userExtSources; this.userAttributes = null; this.memberAttributes = null; }
public RichDestination(Destination destination, Facility facility, Service service) { super(destination.getId(), destination.getDestination(), destination.getType(), destination.getCreatedAt(), destination.getCreatedBy(), destination.getModifiedAt(), destination.getModifiedBy(), destination.getCreatedByUid(), destination.getModifiedByUid()); setPropagationType(destination.getPropagationType()); this.service = service; this.facility = facility; }
@Override public String serializeToString() { StringBuilder str = new StringBuilder(); return str.append(this.getClass().getSimpleName()).append(":[").append( "id=<").append(getId()).append(">").append( ", destination=<").append(super.getDestination() == null ? "\\0" : BeansUtils.createEscaping(super.getDestination())).append(">").append( ", type=<").append(super.getType() == null ? "\\0" : BeansUtils.createEscaping(super.getType())).append(">").append( ", facility=<").append(getFacility() == null ? "\\0" : getFacility().serializeToString()).append(">").append( ", service=<").append(getService() == null ? "\\0" : getService().serializeToString()).append(">").append( ']').toString(); }
public Attribute(Attribute attribute, boolean copyValue) { super(attribute); if(copyValue) { this.value = attribute.getValue(); this.valueCreatedAt = attribute.getValueCreatedAt(); this.valueCreatedBy = attribute.getValueCreatedBy(); this.valueModifiedAt = attribute.getValueModifiedAt(); this.valueModifiedBy = attribute.getValueModifiedBy(); } }
protected void initPerunSession() throws InternalErrorException { if (perunSession == null) { perunSession = perun.getPerunSession(new PerunPrincipal( dispatcherProperties.getProperty("perun.principal.name"), dispatcherProperties.getProperty("perun.principal.extSourceName"), dispatcherProperties.getProperty("perun.principal.extSourceType")), new PerunClient()); } }
@Override public String toString() { StringBuilder str = new StringBuilder(); return str.append("ContactGroup:[facilityID='").append(getFacility().getId()).append("', name='").append(getName()).append("', groupsIDs='").append(BeansUtils.getIDsOfPerunBeans(getGroups())).append( "', ownersIDs='").append(BeansUtils.getIDsOfPerunBeans(getOwners())).append("', usersIDs='").append(BeansUtils.getIDsOfPerunBeans(users)).append("']").toString(); }
public AttributeHolders(AttributeDefinition attribute, SavedBy savedBy) { super(attribute); this.nameForSearch = attribute.getNamespace() + ":" + attribute.getFriendlyName(); this.namespaceForSearch = attribute.getNamespace(); this.friendlyNameForSearch = attribute.getFriendlyName(); this.typeForSearch = attribute.getType(); this.idForSearch = attribute.getId(); this.valueForSearch = null; this.savedBy = savedBy; }
@Override public String toString() { return "Member:[id='" + getId() + "', userId='" + userId + "', voId='" + voId + "', status='" + status + "', type='" + membershipType + "', sourceGroupId='" + sourceGroupId + "', sponsored='" + sponsored+ "']"; } }
public static Integer getSingleId(Set<Pair<Integer, Integer>> pairs) { if(pairs==null) return null; //noinspection LoopStatementThatDoesntLoop for (Pair<Integer, Integer> pair : pairs) { return pair.getLeft(); } return null; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MemberCandidate that = (MemberCandidate) o; if (candidate != null ? !candidate.equals(that.candidate) : that.candidate != null) return false; if (member != null ? !member.equals(that.member) : that.member != null) return false; return richUser != null ? richUser.equals(that.richUser) : that.richUser == null; }
public WrongAttributeValueException(Attribute attribute, Object attributeHolder, Object attributeHolderSecondary, String message) { super(attribute.toString() + " Set for: " + attributeHolder + " and " + attributeHolderSecondary + " - " + message); this.attribute = attribute; this.attributeHolder = attributeHolder; this.attributeHolderSecondary = attributeHolderSecondary; }
/** * True if DB initializator is enabled, false if not * Default is false * * @return true if enabled, false if disabled */ public static boolean initializatorEnabled() { return coreConfig.isDbInitializatorEnabled(); }
public AlreadyAdminException(User user, Vo vo) { super(user.toString()); this.user = user; this.vo = vo; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((facility == null) ? 0 : facility.hashCode()); return result; }