Several bugfixes
parent
09ef7b90fa
commit
51d77b998a
|
|
@ -121,15 +121,19 @@ public class Expertise extends Publication {
|
||||||
@Override
|
@Override
|
||||||
public String toString(final String data) {
|
public String toString(final String data) {
|
||||||
|
|
||||||
return super.toString(String.format(", place = \"%s\", "
|
return super.toString(
|
||||||
+ "numberOfPages = %d, "
|
String.format(
|
||||||
+ "organization = %s, "
|
", place = \"%s\", "
|
||||||
+ "orderer = %s%s",
|
+ "numberOfPages = %d, "
|
||||||
place,
|
+ "organization = %s, "
|
||||||
Objects.toString(numberOfPages),
|
+ "orderer = %s%s",
|
||||||
Objects.toString(organization),
|
place,
|
||||||
Objects.toString(orderer),
|
numberOfPages,
|
||||||
data));
|
Objects.toString(organization),
|
||||||
|
Objects.toString(orderer),
|
||||||
|
data
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,13 @@ public class Monograph extends PublicationWithPublisher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(final String data) {
|
public String toString(final String data) {
|
||||||
return super.toString(String.format(", reviewed = %b%s",
|
return super.toString(
|
||||||
reviewed,
|
String.format(
|
||||||
data));
|
", reviewed = %b%s",
|
||||||
|
reviewed,
|
||||||
|
data
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -395,33 +395,34 @@ public class Publication implements Exportable, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString(final String data) {
|
public String toString(final String data) {
|
||||||
|
return String.format(
|
||||||
return String.format("%s{ "
|
"%s{ "
|
||||||
+ "publicationId = %d, "
|
+ "publicationId = %d, "
|
||||||
+ "uuid = \"%s\""
|
+ "uuid = \"%s\""
|
||||||
+ "yearOfPublication = %d, "
|
+ "yearOfPublication = %d, "
|
||||||
+ "authorships = %s, "
|
+ "authorships = %s, "
|
||||||
+ "title = %s, "
|
+ "title = %s, "
|
||||||
+ "shortDescription = %s, "
|
+ "shortDescription = %s, "
|
||||||
+ "publicationAbstract = %s, "
|
+ "publicationAbstract = %s, "
|
||||||
+ "misc = %s, "
|
+ "misc = %s, "
|
||||||
+ "peerReviewed = %b, "
|
+ "peerReviewed = %b, "
|
||||||
+ "yearFirstPublished = %d, "
|
+ "yearFirstPublished = %d, "
|
||||||
+ "languageOfPublication = \"%s\"%d"
|
+ "languageOfPublication = \"%s\"%s"
|
||||||
+ " }",
|
+ " }",
|
||||||
super.toString(),
|
super.toString(),
|
||||||
publicationId,
|
publicationId,
|
||||||
uuid,
|
uuid,
|
||||||
yearOfPublication,
|
yearOfPublication,
|
||||||
authorships,
|
Objects.toString(authorships),
|
||||||
Objects.toString(title),
|
Objects.toString(title),
|
||||||
Objects.toString(shortDescription),
|
Objects.toString(shortDescription),
|
||||||
Objects.toString(publicationAbstract),
|
Objects.toString(publicationAbstract),
|
||||||
Objects.toString(misc),
|
Objects.toString(misc),
|
||||||
peerReviewed,
|
peerReviewed,
|
||||||
yearFirstPublished,
|
yearFirstPublished,
|
||||||
Objects.toString(languageOfPublication),
|
Objects.toString(languageOfPublication),
|
||||||
data);
|
data
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ public class PublicationWithPublisher extends Publication {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final PublicationWithPublisher other
|
final PublicationWithPublisher other
|
||||||
= (PublicationWithPublisher) obj;
|
= (PublicationWithPublisher) obj;
|
||||||
if (!other.canEqual(this)) {
|
if (!other.canEqual(this)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -213,24 +213,25 @@ public class PublicationWithPublisher extends Publication {
|
||||||
@Override
|
@Override
|
||||||
public String toString(final String data) {
|
public String toString(final String data) {
|
||||||
|
|
||||||
return (String.format("%s{ "
|
return super.toString(
|
||||||
+ "publisher = %s, "
|
String.format(
|
||||||
+ "isbn10 = \"%s\", "
|
"publisher = %s, "
|
||||||
+ "isbn13 = \"%s\", "
|
+ "isbn10 = \"%s\", "
|
||||||
+ "volume = %d, "
|
+ "isbn13 = \"%s\", "
|
||||||
+ "numberOfVolumes = %d, "
|
+ "volume = %d, "
|
||||||
+ "numberOfPages = %d, "
|
+ "numberOfVolumes = %d, "
|
||||||
+ "edition = %s%s"
|
+ "numberOfPages = %d, "
|
||||||
+ "}",
|
+ "edition = %s%s",
|
||||||
super.toString(),
|
Objects.toString(publisher),
|
||||||
Objects.toString(publisher),
|
isbn10,
|
||||||
isbn10,
|
isbn13,
|
||||||
isbn13,
|
volume,
|
||||||
volume,
|
numberOfVolumes,
|
||||||
numberOfVolumes,
|
numberOfPages,
|
||||||
numberOfPages,
|
Objects.toString(edition),
|
||||||
Objects.toString(edition),
|
data
|
||||||
data));
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import org.libreccm.imexport.AbstractEntityImExporter;
|
||||||
import org.libreccm.imexport.Processes;
|
import org.libreccm.imexport.Processes;
|
||||||
import org.librecms.assets.Organization;
|
import org.librecms.assets.Organization;
|
||||||
import org.librecms.assets.Person;
|
import org.librecms.assets.Person;
|
||||||
|
import org.librecms.contentsection.ContentItemRepository;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -26,6 +27,9 @@ public class ContactImExporter
|
||||||
@Inject
|
@Inject
|
||||||
private ContactRepository contactRepo;
|
private ContactRepository contactRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ContentItemRepository itemRepo;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
|
|
@ -46,7 +50,10 @@ public class ContactImExporter
|
||||||
@Override
|
@Override
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected void saveImportedEntity(final Contact entity) {
|
protected void saveImportedEntity(final Contact entity) {
|
||||||
|
final SciProject project = entity.getProject();
|
||||||
|
project.addContact(entity);
|
||||||
contactRepo.save(entity);
|
contactRepo.save(entity);
|
||||||
|
itemRepo.save(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package org.scientificcms.contenttypes.sciproject;
|
||||||
import org.libreccm.imexport.AbstractEntityImExporter;
|
import org.libreccm.imexport.AbstractEntityImExporter;
|
||||||
import org.libreccm.imexport.Processes;
|
import org.libreccm.imexport.Processes;
|
||||||
import org.librecms.assets.Person;
|
import org.librecms.assets.Person;
|
||||||
|
import org.librecms.contentsection.ContentItemRepository;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -22,6 +23,9 @@ import javax.transaction.Transactional;
|
||||||
public class MembershipImExporter
|
public class MembershipImExporter
|
||||||
extends AbstractEntityImExporter<Membership> {
|
extends AbstractEntityImExporter<Membership> {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ContentItemRepository itemRepo;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private MembershipRepository membershipRepo;
|
private MembershipRepository membershipRepo;
|
||||||
|
|
||||||
|
|
@ -44,7 +48,10 @@ public class MembershipImExporter
|
||||||
@Override
|
@Override
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected void saveImportedEntity(final Membership entity) {
|
protected void saveImportedEntity(final Membership entity) {
|
||||||
|
final SciProject project = entity.getProject();
|
||||||
|
project.addMember(entity);
|
||||||
membershipRepo.save(entity);
|
membershipRepo.save(entity);
|
||||||
|
itemRepo.save(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@ public class SponsoringRepository
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isNew(final Sponsoring sponsoring) {
|
public boolean isNew(final Sponsoring sponsoring) {
|
||||||
return sponsoring.getSponsoringId() == 0;
|
return sponsoring.getSponsoringId() == 0
|
||||||
|
|| sponsoring.getUuid() == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,7 @@
|
||||||
<skip>false</skip>
|
<skip>false</skip>
|
||||||
<propertiesFile>${project.basedir}/wildfly.properties</propertiesFile>
|
<propertiesFile>${project.basedir}/wildfly.properties</propertiesFile>
|
||||||
<java-opts>
|
<java-opts>
|
||||||
<java-opt>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787 -Xmx24G</java-opt>
|
<java-opt>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787</java-opt>
|
||||||
</java-opts>
|
</java-opts>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
@ -344,6 +344,7 @@
|
||||||
</cliSessions>
|
</cliSessions>
|
||||||
<jvmArguments>
|
<jvmArguments>
|
||||||
<arg>-agentlib:jdwp=transport=dt_socket,server=y,suspend=${libreccm.debug.suspend},address=${libreccm.debug.port}</arg>
|
<arg>-agentlib:jdwp=transport=dt_socket,server=y,suspend=${libreccm.debug.suspend},address=${libreccm.debug.port}</arg>
|
||||||
|
<arg>-Xmx16G</arg>
|
||||||
</jvmArguments>
|
</jvmArguments>
|
||||||
<arguments>
|
<arguments>
|
||||||
-Dorg.wildfly.datasources.postgresql.database=${libreccm.database.name}
|
-Dorg.wildfly.datasources.postgresql.database=${libreccm.database.name}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue