This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'integration/master' into rhbz981067
Conflicts: zanata-war/src/main/resources/db/changelogs/db.changelog-3.1.xml
- Loading branch information
Showing
66 changed files
with
2,295 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
zanata-model/src/main/java/org/zanata/model/HTextFlowTargetReviewComment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* | ||
* Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the | ||
* @author tags. See the copyright.txt file in the distribution for a full | ||
* listing of individual contributors. | ||
* | ||
* This is free software; you can redistribute it and/or modify it under the | ||
* terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 2.1 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this software; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF | ||
* site: http://www.fsf.org. | ||
*/ | ||
|
||
package org.zanata.model; | ||
|
||
import java.util.List; | ||
import javax.persistence.Access; | ||
import javax.persistence.AccessType; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.ManyToOne; | ||
import javax.persistence.Transient; | ||
import javax.validation.constraints.NotNull; | ||
|
||
import org.hibernate.annotations.BatchSize; | ||
import org.hibernate.annotations.Cache; | ||
import org.hibernate.annotations.CacheConcurrencyStrategy; | ||
import org.hibernate.annotations.Immutable; | ||
import org.hibernate.annotations.NaturalId; | ||
import org.hibernate.annotations.Type; | ||
import org.hibernate.search.annotations.IndexedEmbedded; | ||
import org.zanata.common.ContentState; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
/** | ||
* @author Patrick Huang <a | ||
* href="mailto:pahuang@redhat.com">pahuang@redhat.com</a> | ||
*/ | ||
@Entity | ||
@Immutable | ||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE) | ||
@BatchSize(size = 20) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Access(AccessType.FIELD) | ||
public class HTextFlowTargetReviewComment extends ModelEntityBase | ||
{ | ||
private static final long serialVersionUID = 1413384329431214946L; | ||
|
||
@Getter | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "commenter_id", nullable = false) | ||
private HPerson commenter; | ||
|
||
@NotNull | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "target_id") | ||
@IndexedEmbedded | ||
@Getter | ||
private HTextFlowTarget textFlowTarget; | ||
|
||
@NotNull | ||
@Type(type = "text") | ||
@Getter | ||
private String comment; | ||
|
||
@Setter(AccessLevel.PROTECTED) | ||
@Getter | ||
@NotNull | ||
private Integer targetVersion; | ||
|
||
private transient String commenterName; | ||
|
||
public HTextFlowTargetReviewComment(HTextFlowTarget target, String comment, HPerson commenter) | ||
{ | ||
this.textFlowTarget = target; | ||
this.comment = comment; | ||
this.commenter = commenter; | ||
commenterName = commenter.getName(); | ||
targetVersion = target.getVersionNum(); | ||
} | ||
|
||
@Transient | ||
public String getCommenterName() | ||
{ | ||
if (commenterName == null) | ||
{ | ||
commenterName = getCommenter().getName(); | ||
} | ||
return commenterName; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
zanata-war/src/main/java/org/zanata/dao/ApplicationConfigurationDAO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.