Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRUNK-3644 Define which resources to load for module based on OpenMRS version #499

Merged
merged 1 commit into from Jan 22, 2014

Conversation

rkorytkowski
Copy link
Member

https://tickets.openmrs.org/browse/TRUNK-3644

This is work in progress. Do not merge yet.

* @return true if it should be included
* @should return true if file and openmrs version match
* @should return false if file matches but openmrs version does not
* @should return true if file and openmrs version do not match
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me but am a little confused, why should this be true? I though this should be excluded

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a file path doesn't match any file in omod then condition doesn't matter. Files that aren't conditional resources are included by default. We skip non existing conditional resources silently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the phrasing of all these @should lines to be very confusing.

@Documented
public @interface OpenmrsProfile {

public String openmrsVersion() default "";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add here modules as well.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should support the same constraints here as we do in the
conditional resource inclusion in config.xml.

On Thu, Jan 16, 2014 at 6:33 AM, Rafal Korytkowski <notifications@github.com

wrote:

In api/src/main/java/org/openmrs/annotation/OpenmrsProfile.java:

+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**

  • * Placed on beans which should be loaded conditionally based on OpenMRS version or started modules.
  • */
    +@target( { ElementType.TYPE })
    +@retention(RetentionPolicy.RUNTIME)
    +@inherited
    +@documented
    +public @interface OpenmrsProfile {
  • public String openmrsVersion() default "";

We could add here modules as well.


Reply to this email directly or view it on GitHubhttps://github.com//pull/499/files#r8932745
.

rkorytkowski added a commit that referenced this pull request Jan 22, 2014
TRUNK-3644 Define which resources to load for module based on OpenMRS version
@rkorytkowski rkorytkowski merged commit 64b539d into openmrs:1.10.x Jan 22, 2014
RandilaP pushed a commit to RandilaP/openmrs-core that referenced this pull request Jul 31, 2023
* Locking packages to 3.4.0

* babel/highlight

* more missing dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants