Skip to content

Commit

Permalink
Merge pull request #246 from micromata/Release-8.1-SNAPSHOT
Browse files Browse the repository at this point in the history
Release 8.1 snapshot Dealing with corrupted JCR repos (doc), json serialization and deserialization refactored. Jackson deserialization errors fixed.
  • Loading branch information
kreinhard authored Dec 30, 2024
2 parents 6306bd6 + 06a456e commit 77161d0
Show file tree
Hide file tree
Showing 76 changed files with 1,789 additions and 1,090 deletions.
2 changes: 1 addition & 1 deletion ToDo.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Aktuell:
- Scripting: Ergebnis Unresolved reference 'memo', 'todo'.: line 94 to 94 (add only activated plugins)

- JsonValidatorTest anpassen.
- Groovy-scripts: remove or fix.
- AG-Grid: setColumnStates wird nicht in den UserPrefs gespeichert.
- Wicket: Auftragsbuch: org.apache.wicket.core.request.mapper.StalePageException: A request to page '[Page class = org.projectforge.web.fibu.AuftragEditPage, id = 9, render count = 3]' has been made with stale 'renderCount'. The page will be re-rendered.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@

package org.projectforge.plugins.banking

import com.fasterxml.jackson.databind.annotation.JsonSerialize
import jakarta.persistence.*
import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.*
import org.projectforge.Constants
import org.projectforge.common.anots.PropertyInfo
import org.projectforge.common.props.PropertyType
import org.projectforge.framework.json.IdOnlySerializer
import org.projectforge.framework.persistence.entities.DefaultBaseDO
import java.math.BigDecimal
import java.time.LocalDate
Expand All @@ -53,6 +55,7 @@ open class BankAccountBalanceDO : DefaultBaseDO() {
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "banking_account_fk", nullable = false)
@JsonSerialize(using = IdOnlySerializer::class)
open var bankAccount: BankAccountDO? = null

@PropertyInfo(i18nKey = "plugins.banking.account.record.amount", type = PropertyType.CURRENCY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

package org.projectforge.plugins.banking

import com.fasterxml.jackson.databind.annotation.JsonSerialize
import jakarta.persistence.*
import org.apache.commons.codec.digest.DigestUtils
import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate
Expand All @@ -31,6 +32,7 @@ import org.projectforge.Constants
import org.projectforge.common.StringHelper
import org.projectforge.common.anots.PropertyInfo
import org.projectforge.common.props.PropertyType
import org.projectforge.framework.json.IdOnlySerializer
import org.projectforge.framework.persistence.entities.DefaultBaseDO
import org.projectforge.framework.time.PFDay
import java.math.BigDecimal
Expand All @@ -56,6 +58,7 @@ open class BankAccountRecordDO : DefaultBaseDO() {
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "banking_account_fk", nullable = false)
@JsonSerialize(using = IdOnlySerializer::class)
open var bankAccount: BankAccountDO? = null

@PropertyInfo(i18nKey = "plugins.banking.account.record.amount", type = PropertyType.CURRENCY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
package org.projectforge.plugins.datatransfer

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed
import org.projectforge.Constants
import org.projectforge.framework.i18n.TimeAgo
Expand All @@ -32,6 +33,7 @@ import org.projectforge.framework.jcr.AttachmentsEventType
import org.projectforge.framework.persistence.user.entities.PFUserDO
import java.util.*
import jakarta.persistence.*
import org.projectforge.framework.json.IdOnlySerializer

/**
* @author Kai Reinhard ([email protected])
Expand Down Expand Up @@ -84,6 +86,7 @@ open class DataTransferAuditDO {

@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "by_user_fk")
@JsonSerialize(using = IdOnlySerializer::class)
open var byUser: PFUserDO? = null

@get:Column(name = "by_external_user", length = 4000)
Expand All @@ -109,6 +112,7 @@ open class DataTransferAuditDO {
*/
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "upload_by_user_fk")
@JsonSerialize(using = IdOnlySerializer::class)
open var uploadByUser: PFUserDO? = null

@get:Column(length = 1000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

package org.projectforge.plugins.marketing

import com.fasterxml.jackson.databind.annotation.JsonSerialize
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexedEmbedded
import org.projectforge.business.address.AddressDO
Expand All @@ -32,6 +33,7 @@ import org.projectforge.framework.persistence.entities.DefaultBaseDO
import jakarta.persistence.*
import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexingDependency
import org.projectforge.framework.json.IdOnlySerializer

/**
* A marketing campaign.
Expand Down Expand Up @@ -68,12 +70,14 @@ open class AddressCampaignValueDO : DefaultBaseDO() {
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "address_campaign_fk", nullable = false)
@JsonSerialize(using = IdOnlySerializer::class)
open var addressCampaign: AddressCampaignDO? = null

@IndexedEmbedded(includeDepth = 1)
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "address_fk", nullable = false)
@JsonSerialize(using = IdOnlySerializer::class)
open var address: AddressDO? = null

@PropertyInfo(i18nKey = "value")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@

package org.projectforge.plugins.memo

import com.fasterxml.jackson.databind.annotation.JsonSerialize
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed
import org.projectforge.common.anots.PropertyInfo
import org.projectforge.Constants
import org.projectforge.framework.persistence.entities.AbstractBaseDO
import org.projectforge.framework.persistence.user.entities.PFUserDO
import jakarta.persistence.*
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField
import org.projectforge.framework.json.IdOnlySerializer

/**
* This data object is the Java representation of a data-base entry of a memo.<br></br>
Expand Down Expand Up @@ -59,6 +61,7 @@ open class MemoDO : AbstractBaseDO<Long>() {
@PropertyInfo(i18nKey = "plugins.memo.owner")
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "owner_fk")
@JsonSerialize(using = IdOnlySerializer::class)
open var owner: PFUserDO? = null

@PropertyInfo(i18nKey = "plugins.memo.memo")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

package org.projectforge.plugins.skillmatrix

import com.fasterxml.jackson.databind.annotation.JsonSerialize
import org.projectforge.common.StringHelper
import org.projectforge.common.anots.PropertyInfo
import org.projectforge.Constants
Expand All @@ -31,6 +32,7 @@ import org.projectforge.framework.persistence.user.entities.PFUserDO
import jakarta.persistence.*
import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.*
import org.projectforge.framework.json.IdOnlySerializer

/**
* @author Kai Reinhard ([email protected])
Expand Down Expand Up @@ -77,6 +79,7 @@ open class SkillEntryDO : AbstractBaseDO<Long>() {
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "owner_fk")
@JsonSerialize(using = IdOnlySerializer::class)
open var owner: PFUserDO? = null

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

package org.projectforge.plugins.todo

import com.fasterxml.jackson.databind.annotation.JsonSerialize
import org.projectforge.business.task.TaskDO
import org.projectforge.common.anots.PropertyInfo
import org.projectforge.common.i18n.Priority
Expand All @@ -35,6 +36,7 @@ import java.time.LocalDate
import jakarta.persistence.*
import org.hibernate.search.mapper.pojo.automaticindexing.ReindexOnUpdate
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.*
import org.projectforge.framework.json.IdOnlySerializer
import org.projectforge.framework.persistence.history.NoHistory

/**
Expand All @@ -57,6 +59,7 @@ open class ToDoDO : DefaultBaseDO() {
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "reporter_fk")
@JsonSerialize(using = IdOnlySerializer::class)
open var reporter: PFUserDO? = null

/**
Expand All @@ -69,6 +72,7 @@ open class ToDoDO : DefaultBaseDO() {
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "assignee_fk")
@JsonSerialize(using = IdOnlySerializer::class)
open var assignee: PFUserDO? = null

@PropertyInfo(i18nKey = "task")
Expand All @@ -77,6 +81,7 @@ open class ToDoDO : DefaultBaseDO() {
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "task_id", nullable = true)
@JsonSerialize(using = IdOnlySerializer::class)
open var task: TaskDO? = null

/**
Expand All @@ -88,6 +93,7 @@ open class ToDoDO : DefaultBaseDO() {
@IndexingDependency(reindexOnUpdate = ReindexOnUpdate.SHALLOW)
@get:ManyToOne(fetch = FetchType.LAZY)
@get:JoinColumn(name = "group_id", nullable = true)
@JsonSerialize(using = IdOnlySerializer::class)
open var group: GroupDO? = null

@PropertyInfo(i18nKey = "description")
Expand Down
Loading

0 comments on commit 77161d0

Please sign in to comment.