Skip to content

Commit aec293e

Browse files
authored
Merge branch 'master' into TRUNK-6469
2 parents aa101ef + 8730c7e commit aec293e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2919
-2633
lines changed

.github/workflows/build-2.x.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- 8
2929
runs-on: ${{ matrix.platform }}
3030
steps:
31-
- uses: actions/checkout@v5
31+
- uses: actions/checkout@v6
3232
- name: Setup JDK
3333
uses: actions/setup-java@v5
3434
with:

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
# java-version: 24
3232
runs-on: ${{ matrix.platform }}
3333
steps:
34-
- uses: actions/checkout@v5
34+
- uses: actions/checkout@v6
3535
- name: Setup JDK
3636
uses: actions/setup-java@v5
3737
with:

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v5
42+
uses: actions/checkout@v6
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: "Checkout code"
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131
with:
3232
persist-credentials: false
3333

.github/workflows/tx-pull.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
contents: write
1616
pull-requests: write
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1919
- name: 🌐 Push source file using transifex client
2020
uses: transifex/cli-action@v2
2121
with:
2222
token: ${{ secrets.TRANSIFEX_TOKEN }}
2323
args: pull --force --all
2424
- name: 🔄 Create PR if necessary
2525
id: cpr
26-
uses: peter-evans/[email protected].8
26+
uses: peter-evans/[email protected].9
2727
with:
2828
commit-message: "(chore) Update translations from Transifex"
2929
title: "(chore) Update translations from Transifex"

.github/workflows/tx-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
actions: read
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818
- name: 📥 Push source file using transifex client
1919
uses: transifex/cli-action@v2
2020
with:

api/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,18 @@
296296
<groupId>software.amazon.awssdk</groupId>
297297
<artifactId>s3</artifactId>
298298
</dependency>
299+
300+
<dependency>
301+
<groupId>org.graalvm.js</groupId>
302+
<artifactId>js</artifactId>
303+
<type>pom</type>
304+
</dependency>
305+
306+
<dependency>
307+
<groupId>org.graalvm.js</groupId>
308+
<artifactId>js-scriptengine</artifactId>
309+
<type>pom</type>
310+
</dependency>
299311
</dependencies>
300312
<build>
301313
<resources>

api/src/main/java/org/openmrs/ConceptDescription.java

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
*/
1010
package org.openmrs;
1111

12+
import jakarta.persistence.Column;
13+
import jakarta.persistence.Entity;
14+
import jakarta.persistence.GeneratedValue;
15+
import jakarta.persistence.GenerationType;
16+
import jakarta.persistence.Id;
17+
import jakarta.persistence.JoinColumn;
18+
import jakarta.persistence.ManyToOne;
19+
import jakarta.persistence.Table;
1220
import org.hibernate.envers.Audited;
1321

1422
import java.util.Date;
@@ -18,25 +26,40 @@
1826
* ConceptDescription is the localized description of a concept.
1927
*/
2028
@Audited
29+
@Entity
30+
@Table(name = "concept_description")
2131
public class ConceptDescription extends BaseOpenmrsObject implements Auditable, java.io.Serializable {
2232

2333
private static final long serialVersionUID = -7223075113369136584L;
2434

2535
// Fields
36+
@Id
37+
@GeneratedValue(strategy = GenerationType.IDENTITY)
38+
@Column(name = "concept_description_id", nullable = false)
2639
private Integer conceptDescriptionId;
27-
40+
41+
@ManyToOne(optional = false)
42+
@JoinColumn(name = "concept_id", nullable = false)
2843
private Concept concept;
29-
44+
45+
@Column(name = "description", nullable = false, length = 65535, columnDefinition = "text")
3046
private String description;
31-
47+
48+
@Column(name = "locale", nullable = false, length = 50)
3249
private Locale locale;
33-
50+
51+
@ManyToOne(optional = false)
52+
@JoinColumn(name = "creator", nullable = false)
3453
private User creator;
35-
54+
55+
@Column(name = "date_created", nullable = false)
3656
private Date dateCreated;
37-
57+
58+
@ManyToOne
59+
@JoinColumn(name = "changed_by")
3860
private User changedBy;
39-
61+
62+
@Column(name = "date_changed")
4063
private Date dateChanged;
4164

4265
// Constructors

api/src/main/java/org/openmrs/ProviderAttribute.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
*/
1010
package org.openmrs;
1111

12+
import jakarta.persistence.AssociationOverride;
13+
import jakarta.persistence.Entity;
14+
import jakarta.persistence.JoinColumn;
15+
import jakarta.persistence.Id;
16+
import jakarta.persistence.GeneratedValue;
17+
import jakarta.persistence.GenerationType;
18+
import jakarta.persistence.Column;
19+
import jakarta.persistence.Table;
1220
import org.hibernate.envers.Audited;
1321
import org.openmrs.attribute.Attribute;
1422
import org.openmrs.attribute.BaseAttribute;
@@ -20,8 +28,17 @@
2028
* @since 1.9
2129
*/
2230
@Audited
31+
@Entity
32+
@Table(name="provider_attribute")
33+
@AssociationOverride(
34+
name="owner",
35+
joinColumns = @JoinColumn(name="provider_id", nullable = false)
36+
)
2337
public class ProviderAttribute extends BaseAttribute<ProviderAttributeType, Provider> implements Attribute<ProviderAttributeType, Provider> {
2438

39+
@Id
40+
@GeneratedValue(strategy = GenerationType.IDENTITY)
41+
@Column(name = "provider_attribute_id")
2542
private Integer providerAttributeId;
2643

2744
public Integer getProviderAttributeId() {

api/src/main/java/org/openmrs/aop/AuthorizationAdvice.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import java.lang.reflect.Method;
1313
import java.util.Collection;
14+
import java.util.Locale;
1415

1516
import org.apache.commons.lang3.StringUtils;
1617
import org.openmrs.User;
@@ -122,7 +123,7 @@ public void before(Method method, Object[] args, Object target) throws Throwable
122123
private void throwUnauthorized(User user, Method method, Collection<String> attrs) {
123124
log.debug(USER_IS_NOT_AUTHORIZED_TO_ACCESS, user, method.getName());
124125
throw new APIAuthenticationException(Context.getMessageSourceService().getMessage("error.privilegesRequired",
125-
new Object[] { StringUtils.join(attrs, ",") }, null));
126+
new Object[] { StringUtils.join(attrs, ",") }, Locale.getDefault()));
126127
}
127128

128129
/**
@@ -135,7 +136,7 @@ private void throwUnauthorized(User user, Method method, Collection<String> attr
135136
private void throwUnauthorized(User user, Method method, String attr) {
136137
log.debug(USER_IS_NOT_AUTHORIZED_TO_ACCESS, user, method.getName());
137138
throw new APIAuthenticationException(Context.getMessageSourceService().getMessage("error.privilegesRequired",
138-
new Object[] { attr }, null));
139+
new Object[] { attr }, Locale.getDefault()));
139140
}
140141

141142
/**

0 commit comments

Comments
 (0)