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