BugFixes
git-svn-id: https://svn.libreccm.org/ccm/trunk@1319 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
0ccb82699f
commit
16bb369677
|
|
@ -11,7 +11,11 @@ import com.arsdigita.cms.contenttypes.GenericPersonContactCollection;
|
||||||
import com.arsdigita.cms.contenttypes.SciProject;
|
import com.arsdigita.cms.contenttypes.SciProject;
|
||||||
import com.arsdigita.domain.DomainObject;
|
import com.arsdigita.domain.DomainObject;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
|
import com.arsdigita.globalization.GlobalizationHelper;
|
||||||
|
import com.arsdigita.kernel.Kernel;
|
||||||
import com.arsdigita.persistence.DataCollection;
|
import com.arsdigita.persistence.DataCollection;
|
||||||
|
import com.arsdigita.persistence.Filter;
|
||||||
|
import com.arsdigita.persistence.FilterFactory;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.xml.Element;
|
import com.arsdigita.xml.Element;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -40,17 +44,17 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
private final static String CURRENT_PROJECTS = "currentProjects";
|
private final static String CURRENT_PROJECTS = "currentProjects";
|
||||||
private final static String FINISHED_PROJECTS = "finishedProjects";
|
private final static String FINISHED_PROJECTS = "finishedProjects";
|
||||||
private final static PersonalProjectsConfig config =
|
private final static PersonalProjectsConfig config =
|
||||||
new PersonalProjectsConfig();
|
new PersonalProjectsConfig();
|
||||||
private final static Logger logger =
|
private final static Logger logger =
|
||||||
Logger.getLogger(PersonalProjects.class);
|
Logger.getLogger(PersonalProjects.class);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
config.load();
|
config.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void generateContent(final Element parent,
|
public void generateContent(final Element parent,
|
||||||
final GenericPerson person,
|
final GenericPerson person,
|
||||||
final PageState state) {
|
final PageState state) {
|
||||||
final List<SciProject> projects = collectProjects(person);
|
final List<SciProject> projects = collectProjects(person);
|
||||||
|
|
||||||
final Element personalProjectsElem = parent.newChildElement(
|
final Element personalProjectsElem = parent.newChildElement(
|
||||||
|
|
@ -63,14 +67,14 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
} else {
|
} else {
|
||||||
final List<SciProject> currentProjects = new ArrayList<SciProject>();
|
final List<SciProject> currentProjects = new ArrayList<SciProject>();
|
||||||
final List<SciProject> finishedProjects =
|
final List<SciProject> finishedProjects =
|
||||||
new ArrayList<SciProject>();
|
new ArrayList<SciProject>();
|
||||||
|
|
||||||
processProjects(projects, currentProjects, finishedProjects);
|
processProjects(projects, currentProjects, finishedProjects);
|
||||||
generateGroupsXml(personalProjectsElem, currentProjects, finishedProjects);
|
generateGroupsXml(personalProjectsElem, currentProjects, finishedProjects);
|
||||||
generateProjectsXml(personalProjectsElem,
|
generateProjectsXml(personalProjectsElem,
|
||||||
currentProjects,
|
currentProjects,
|
||||||
finishedProjects,
|
finishedProjects,
|
||||||
state);
|
state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -79,6 +83,17 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
|
|
||||||
final DataCollection collection = (DataCollection) person.get(
|
final DataCollection collection = (DataCollection) person.get(
|
||||||
"organizationalunit");
|
"organizationalunit");
|
||||||
|
if (Kernel.getConfig().languageIndependentItems()) {
|
||||||
|
FilterFactory ff = collection.getFilterFactory();
|
||||||
|
Filter filter = ff.or().
|
||||||
|
addFilter(ff.equals("language", com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale().getLanguage())).
|
||||||
|
addFilter(ff.and().
|
||||||
|
addFilter(ff.equals("language", GlobalizationHelper.LANG_INDEPENDENT)).
|
||||||
|
addFilter(ff.notIn("parent", "com.arsdigita.london.navigation.getParentIDsOfMatchedItems").set("language", com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale().getLanguage())));
|
||||||
|
collection.addFilter(filter);
|
||||||
|
} else {
|
||||||
|
collection.addEqualsFilter("language", com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale().getLanguage());
|
||||||
|
}
|
||||||
DomainObject obj;
|
DomainObject obj;
|
||||||
while (collection.next()) {
|
while (collection.next()) {
|
||||||
obj = DomainObjectFactory.newInstance(collection.getDataObject());
|
obj = DomainObjectFactory.newInstance(collection.getDataObject());
|
||||||
|
|
@ -97,7 +112,7 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void collectProjects(final GenericPerson alias,
|
private void collectProjects(final GenericPerson alias,
|
||||||
final List<SciProject> projects) {
|
final List<SciProject> projects) {
|
||||||
final DataCollection collection = (DataCollection) alias.get(
|
final DataCollection collection = (DataCollection) alias.get(
|
||||||
"organizationalunit");
|
"organizationalunit");
|
||||||
DomainObject obj;
|
DomainObject obj;
|
||||||
|
|
@ -115,13 +130,13 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processProjects(final List<SciProject> projects,
|
private void processProjects(final List<SciProject> projects,
|
||||||
final List<SciProject> currentProjects,
|
final List<SciProject> currentProjects,
|
||||||
final List<SciProject> finishedProjects) {
|
final List<SciProject> finishedProjects) {
|
||||||
final Calendar today = new GregorianCalendar();
|
final Calendar today = new GregorianCalendar();
|
||||||
final Date todayDate = today.getTime();
|
final Date todayDate = today.getTime();
|
||||||
for (SciProject project : projects) {
|
for (SciProject project : projects) {
|
||||||
if ((project.getEnd() != null)
|
if ((project.getEnd() != null)
|
||||||
&& project.getEnd().before(todayDate)) {
|
&& project.getEnd().before(todayDate)) {
|
||||||
finishedProjects.add(project);
|
finishedProjects.add(project);
|
||||||
} else {
|
} else {
|
||||||
currentProjects.add(project);
|
currentProjects.add(project);
|
||||||
|
|
@ -134,8 +149,8 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateGroupsXml(final Element parent,
|
private void generateGroupsXml(final Element parent,
|
||||||
final List<SciProject> currentProjects,
|
final List<SciProject> currentProjects,
|
||||||
final List<SciProject> finishedProjects) {
|
final List<SciProject> finishedProjects) {
|
||||||
final Element availableGroups = parent.newChildElement(
|
final Element availableGroups = parent.newChildElement(
|
||||||
"availableProjectGroups");
|
"availableProjectGroups");
|
||||||
|
|
||||||
|
|
@ -149,32 +164,32 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createAvailableProjectGroupXml(final Element parent,
|
private void createAvailableProjectGroupXml(final Element parent,
|
||||||
final String name) {
|
final String name) {
|
||||||
final Element group = parent.newChildElement("availableProjectGroup");
|
final Element group = parent.newChildElement("availableProjectGroup");
|
||||||
group.addAttribute("name", name);
|
group.addAttribute("name", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateProjectsXml(final Element parent,
|
private void generateProjectsXml(final Element parent,
|
||||||
final List<SciProject> currentProjects,
|
final List<SciProject> currentProjects,
|
||||||
final List<SciProject> finishedProjects,
|
final List<SciProject> finishedProjects,
|
||||||
final PageState state) {
|
final PageState state) {
|
||||||
final Element projectsElem = parent.newChildElement("projects");
|
final Element projectsElem = parent.newChildElement("projects");
|
||||||
|
|
||||||
final int numberOfProjects = currentProjects.size()
|
final int numberOfProjects = currentProjects.size()
|
||||||
+ finishedProjects.size();
|
+ finishedProjects.size();
|
||||||
final int groupSplit = config.getGroupSplit();
|
final int groupSplit = config.getGroupSplit();
|
||||||
|
|
||||||
if (numberOfProjects < groupSplit) {
|
if (numberOfProjects < groupSplit) {
|
||||||
projectsElem.addAttribute("all", "all");
|
projectsElem.addAttribute("all", "all");
|
||||||
|
|
||||||
generateProjectsGroupXml(projectsElem,
|
generateProjectsGroupXml(projectsElem,
|
||||||
CURRENT_PROJECTS,
|
CURRENT_PROJECTS,
|
||||||
currentProjects,
|
currentProjects,
|
||||||
state);
|
state);
|
||||||
generateProjectsGroupXml(projectsElem,
|
generateProjectsGroupXml(projectsElem,
|
||||||
FINISHED_PROJECTS,
|
FINISHED_PROJECTS,
|
||||||
finishedProjects,
|
finishedProjects,
|
||||||
state);
|
state);
|
||||||
} else {
|
} else {
|
||||||
final HttpServletRequest request = state.getRequest();
|
final HttpServletRequest request = state.getRequest();
|
||||||
|
|
||||||
|
|
@ -184,29 +199,29 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentProjects.isEmpty()
|
if (currentProjects.isEmpty()
|
||||||
&& CURRENT_PROJECTS.equals(groupToShow)) {
|
&& CURRENT_PROJECTS.equals(groupToShow)) {
|
||||||
groupToShow = FINISHED_PROJECTS;
|
groupToShow = FINISHED_PROJECTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CURRENT_PROJECTS.equals(groupToShow)) {
|
if (CURRENT_PROJECTS.equals(groupToShow)) {
|
||||||
generateProjectsGroupXml(projectsElem,
|
generateProjectsGroupXml(projectsElem,
|
||||||
CURRENT_PROJECTS,
|
CURRENT_PROJECTS,
|
||||||
currentProjects,
|
currentProjects,
|
||||||
state);
|
state);
|
||||||
} else if (FINISHED_PROJECTS.equals(groupToShow)) {
|
} else if (FINISHED_PROJECTS.equals(groupToShow)) {
|
||||||
generateProjectsGroupXml(projectsElem,
|
generateProjectsGroupXml(projectsElem,
|
||||||
FINISHED_PROJECTS,
|
FINISHED_PROJECTS,
|
||||||
finishedProjects,
|
finishedProjects,
|
||||||
state);
|
state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateProjectsGroupXml(final Element projectsElem,
|
private void generateProjectsGroupXml(final Element projectsElem,
|
||||||
final String groupName,
|
final String groupName,
|
||||||
final List<SciProject> projects,
|
final List<SciProject> projects,
|
||||||
final PageState state) {
|
final PageState state) {
|
||||||
if (projects == null) {
|
if (projects == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -220,8 +235,8 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void generateProjectXml(final Element projectGroupElem,
|
private void generateProjectXml(final Element projectGroupElem,
|
||||||
final SciProject project,
|
final SciProject project,
|
||||||
final PageState state) {
|
final PageState state) {
|
||||||
/*final PublicPersonalProfileXmlGenerator generator =
|
/*final PublicPersonalProfileXmlGenerator generator =
|
||||||
new PublicPersonalProfileXmlGenerator(
|
new PublicPersonalProfileXmlGenerator(
|
||||||
project);
|
project);
|
||||||
|
|
@ -235,13 +250,13 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
//Element beginElem = projectElem.newChildElement("projectbegin");
|
//Element beginElem = projectElem.newChildElement("projectbegin");
|
||||||
|
|
||||||
if ((project.getAddendum() != null)
|
if ((project.getAddendum() != null)
|
||||||
&& !(project.getAddendum().isEmpty())) {
|
&& !(project.getAddendum().isEmpty())) {
|
||||||
Element addendum = projectElem.newChildElement("addendum");
|
Element addendum = projectElem.newChildElement("addendum");
|
||||||
addendum.setText(project.getAddendum());
|
addendum.setText(project.getAddendum());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((project.getProjectShortDescription() != null)
|
if ((project.getProjectShortDescription() != null)
|
||||||
&& !(project.getProjectShortDescription().isEmpty())) {
|
&& !(project.getProjectShortDescription().isEmpty())) {
|
||||||
Element shortDesc = projectElem.newChildElement("shortDescription");
|
Element shortDesc = projectElem.newChildElement("shortDescription");
|
||||||
shortDesc.setText(project.getProjectShortDescription());
|
shortDesc.setText(project.getProjectShortDescription());
|
||||||
}
|
}
|
||||||
|
|
@ -255,18 +270,18 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
|
|
||||||
while (members.next()) {
|
while (members.next()) {
|
||||||
generateMemberXML(new MemberListItem(members.getOID(),
|
generateMemberXML(new MemberListItem(members.getOID(),
|
||||||
members.getSurname(),
|
members.getSurname(),
|
||||||
members.getGivenName(),
|
members.getGivenName(),
|
||||||
members.getTitlePre(),
|
members.getTitlePre(),
|
||||||
members.getTitlePost(),
|
members.getTitlePost(),
|
||||||
members.getBirthdate(),
|
members.getBirthdate(),
|
||||||
members.getGender(),
|
members.getGender(),
|
||||||
null, members.getRoleName(),
|
null, members.getRoleName(),
|
||||||
members.getStatus()),
|
members.getStatus()),
|
||||||
membersElem,
|
membersElem,
|
||||||
members.getRoleName(),
|
members.getRoleName(),
|
||||||
members.getStatus(),
|
members.getStatus(),
|
||||||
state);
|
state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -278,22 +293,22 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
|
|
||||||
while (contacts.next()) {
|
while (contacts.next()) {
|
||||||
generateContactXML(contacts.getContactType(),
|
generateContactXML(contacts.getContactType(),
|
||||||
contacts.getPerson(),
|
contacts.getPerson(),
|
||||||
contacts.getContactEntries(),
|
contacts.getContactEntries(),
|
||||||
contacts.getAddress(),
|
contacts.getAddress(),
|
||||||
contactsElem,
|
contactsElem,
|
||||||
state,
|
state,
|
||||||
Integer.toString(contacts.getContactOrder()),
|
Integer.toString(contacts.getContactOrder()),
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void generateMemberXML(final MemberListItem person,
|
protected void generateMemberXML(final MemberListItem person,
|
||||||
final Element parent,
|
final Element parent,
|
||||||
final String roleName,
|
final String roleName,
|
||||||
final String status,
|
final String status,
|
||||||
final PageState state) {
|
final PageState state) {
|
||||||
Element memberElem = parent.newChildElement("member");
|
Element memberElem = parent.newChildElement("member");
|
||||||
|
|
||||||
memberElem.addAttribute("role", roleName);
|
memberElem.addAttribute("role", roleName);
|
||||||
|
|
@ -304,7 +319,7 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
//title.setText(person.getTitle());
|
//title.setText(person.getTitle());
|
||||||
|
|
||||||
if ((person.getTitlePre() != null)
|
if ((person.getTitlePre() != null)
|
||||||
&& !person.getTitlePre().isEmpty()) {
|
&& !person.getTitlePre().isEmpty()) {
|
||||||
Element titlePre = memberElem.newChildElement("titlePre");
|
Element titlePre = memberElem.newChildElement("titlePre");
|
||||||
titlePre.setText(person.getTitlePre());
|
titlePre.setText(person.getTitlePre());
|
||||||
}
|
}
|
||||||
|
|
@ -316,13 +331,13 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
givenName.setText(person.getGivenName());
|
givenName.setText(person.getGivenName());
|
||||||
|
|
||||||
if ((person.getTitlePost() != null)
|
if ((person.getTitlePost() != null)
|
||||||
&& !person.getTitlePost().isEmpty()) {
|
&& !person.getTitlePost().isEmpty()) {
|
||||||
Element titlePost = memberElem.newChildElement("titlePost");
|
Element titlePost = memberElem.newChildElement("titlePost");
|
||||||
titlePost.setText(person.getTitlePost());
|
titlePost.setText(person.getTitlePost());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((person.getContacts() != null)
|
if ((person.getContacts() != null)
|
||||||
&& (person.getContacts().size() > 0)) {
|
&& (person.getContacts().size() > 0)) {
|
||||||
GenericPersonContactCollection contacts;
|
GenericPersonContactCollection contacts;
|
||||||
contacts = new GenericPersonContactCollection(person.getContacts());
|
contacts = new GenericPersonContactCollection(person.getContacts());
|
||||||
|
|
||||||
|
|
@ -378,7 +393,7 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
surname.setText(person.getSurname());
|
surname.setText(person.getSurname());
|
||||||
|
|
||||||
if ((person.getTitlePost() != null)
|
if ((person.getTitlePost() != null)
|
||||||
&& !person.getTitlePost().isEmpty()) {
|
&& !person.getTitlePost().isEmpty()) {
|
||||||
Element titlePost = contactElem.newChildElement(
|
Element titlePost = contactElem.newChildElement(
|
||||||
"titlePost");
|
"titlePost");
|
||||||
titlePost.setText(person.getTitlePost());
|
titlePost.setText(person.getTitlePost());
|
||||||
|
|
@ -387,23 +402,23 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((contactEntries != null)
|
if ((contactEntries != null)
|
||||||
&& (contactEntries.size() > 0)) {
|
&& (contactEntries.size() > 0)) {
|
||||||
Element contactEntriesElem =
|
Element contactEntriesElem =
|
||||||
contactElem.newChildElement("contactEntries");
|
contactElem.newChildElement("contactEntries");
|
||||||
while (contactEntries.next()) {
|
while (contactEntries.next()) {
|
||||||
GenericContactEntry contactEntry =
|
GenericContactEntry contactEntry =
|
||||||
contactEntries.getContactEntry();
|
contactEntries.getContactEntry();
|
||||||
Element contactEntryElem =
|
Element contactEntryElem =
|
||||||
contactEntriesElem.newChildElement(
|
contactEntriesElem.newChildElement(
|
||||||
"contactEntry");
|
"contactEntry");
|
||||||
contactEntryElem.addAttribute("key",
|
contactEntryElem.addAttribute("key",
|
||||||
contactEntry.getKey());
|
contactEntry.getKey());
|
||||||
Element valueElem = contactEntryElem.newChildElement(
|
Element valueElem = contactEntryElem.newChildElement(
|
||||||
"value");
|
"value");
|
||||||
valueElem.setText(contactEntry.getValue());
|
valueElem.setText(contactEntry.getValue());
|
||||||
|
|
||||||
if ((contactEntry.getDescription() != null)
|
if ((contactEntry.getDescription() != null)
|
||||||
&& !contactEntry.getDescription().isEmpty()) {
|
&& !contactEntry.getDescription().isEmpty()) {
|
||||||
Element descElem = contactEntryElem.newChildElement(
|
Element descElem = contactEntryElem.newChildElement(
|
||||||
"description");
|
"description");
|
||||||
descElem.setText(contactEntry.getDescription());
|
descElem.setText(contactEntry.getDescription());
|
||||||
|
|
@ -443,34 +458,34 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
public MemberListItem(final GenericPerson member,
|
public MemberListItem(final GenericPerson member,
|
||||||
final String role,
|
final String role,
|
||||||
final String status) {
|
final String status) {
|
||||||
/*this.member = member;
|
/*this.member = member;
|
||||||
this.role = role;
|
this.role = role;
|
||||||
this.status = status;*/
|
this.status = status;*/
|
||||||
this(member.getOID(),
|
this(member.getOID(),
|
||||||
member.getSurname(),
|
member.getSurname(),
|
||||||
member.getGivenName(),
|
member.getGivenName(),
|
||||||
member.getTitlePre(),
|
member.getTitlePre(),
|
||||||
member.getTitlePost(),
|
member.getTitlePost(),
|
||||||
member.getBirthdate(),
|
member.getBirthdate(),
|
||||||
member.getGender(),
|
member.getGender(),
|
||||||
null,
|
null,
|
||||||
role,
|
role,
|
||||||
status);
|
status);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MemberListItem(final OID oid,
|
public MemberListItem(final OID oid,
|
||||||
final String surname,
|
final String surname,
|
||||||
final String givenName,
|
final String givenName,
|
||||||
final String titlePre,
|
final String titlePre,
|
||||||
final String titlePost,
|
final String titlePost,
|
||||||
final Date birthdate,
|
final Date birthdate,
|
||||||
final String gender,
|
final String gender,
|
||||||
final DataCollection contacts,
|
final DataCollection contacts,
|
||||||
final String role,
|
final String role,
|
||||||
final String status) {
|
final String status) {
|
||||||
this.oid = oid;
|
this.oid = oid;
|
||||||
this.surname = surname;
|
this.surname = surname;
|
||||||
this.givenName = givenName;
|
this.givenName = givenName;
|
||||||
|
|
@ -546,36 +561,36 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
}
|
}
|
||||||
final MemberListItem other = (MemberListItem) obj;
|
final MemberListItem other = (MemberListItem) obj;
|
||||||
if ((this.surname == null) ? (other.surname != null)
|
if ((this.surname == null) ? (other.surname != null)
|
||||||
: !this.surname.equals(other.surname)) {
|
: !this.surname.equals(other.surname)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((this.givenName == null) ? (other.givenName != null)
|
if ((this.givenName == null) ? (other.givenName != null)
|
||||||
: !this.givenName.equals(other.givenName)) {
|
: !this.givenName.equals(other.givenName)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((this.titlePre == null) ? (other.titlePre != null)
|
if ((this.titlePre == null) ? (other.titlePre != null)
|
||||||
: !this.titlePre.equals(other.titlePre)) {
|
: !this.titlePre.equals(other.titlePre)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((this.titlePost == null) ? (other.titlePost != null)
|
if ((this.titlePost == null) ? (other.titlePost != null)
|
||||||
: !this.titlePost.equals(other.titlePost)) {
|
: !this.titlePost.equals(other.titlePost)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.birthdate != other.birthdate && (this.birthdate == null
|
if (this.birthdate != other.birthdate && (this.birthdate == null
|
||||||
|| !this.birthdate.equals(
|
|| !this.birthdate.equals(
|
||||||
other.birthdate))) {
|
other.birthdate))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((this.gender == null) ? (other.gender != null)
|
if ((this.gender == null) ? (other.gender != null)
|
||||||
: !this.gender.equals(other.gender)) {
|
: !this.gender.equals(other.gender)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((this.role == null) ? (other.role != null)
|
if ((this.role == null) ? (other.role != null)
|
||||||
: !this.role.equals(other.role)) {
|
: !this.role.equals(other.role)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((this.status == null) ? (other.status != null)
|
if ((this.status == null) ? (other.status != null)
|
||||||
: !this.status.equals(other.status)) {
|
: !this.status.equals(other.status)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -589,20 +604,20 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 3;
|
int hash = 3;
|
||||||
hash =
|
hash =
|
||||||
41 * hash + (this.surname != null ? this.surname.hashCode() : 0);
|
41 * hash + (this.surname != null ? this.surname.hashCode() : 0);
|
||||||
hash =
|
hash =
|
||||||
41 * hash + (this.givenName != null ? this.givenName.hashCode() : 0);
|
41 * hash + (this.givenName != null ? this.givenName.hashCode() : 0);
|
||||||
hash =
|
hash =
|
||||||
41 * hash + (this.titlePre != null ? this.titlePre.hashCode() : 0);
|
41 * hash + (this.titlePre != null ? this.titlePre.hashCode() : 0);
|
||||||
hash =
|
hash =
|
||||||
41 * hash + (this.titlePost != null ? this.titlePost.hashCode() : 0);
|
41 * hash + (this.titlePost != null ? this.titlePost.hashCode() : 0);
|
||||||
hash =
|
hash =
|
||||||
41 * hash + (this.birthdate != null ? this.birthdate.hashCode() : 0);
|
41 * hash + (this.birthdate != null ? this.birthdate.hashCode() : 0);
|
||||||
hash =
|
hash =
|
||||||
41 * hash + (this.gender != null ? this.gender.hashCode() : 0);
|
41 * hash + (this.gender != null ? this.gender.hashCode() : 0);
|
||||||
hash = 41 * hash + (this.role != null ? this.role.hashCode() : 0);
|
hash = 41 * hash + (this.role != null ? this.role.hashCode() : 0);
|
||||||
hash =
|
hash =
|
||||||
41 * hash + (this.status != null ? this.status.hashCode() : 0);
|
41 * hash + (this.status != null ? this.status.hashCode() : 0);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -610,7 +625,7 @@ public class PersonalProjects implements ContentGenerator {
|
||||||
private class ProjectComparator implements Comparator<SciProject> {
|
private class ProjectComparator implements Comparator<SciProject> {
|
||||||
|
|
||||||
public int compare(final SciProject project1,
|
public int compare(final SciProject project1,
|
||||||
final SciProject project2) {
|
final SciProject project2) {
|
||||||
return project1.getTitle().compareTo(project2.getTitle());
|
return project1.getTitle().compareTo(project2.getTitle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue