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
Conversation
* @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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
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 ""; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
TRUNK-3644 Define which resources to load for module based on OpenMRS version
* Locking packages to 3.4.0 * babel/highlight * more missing dependencies
https://tickets.openmrs.org/browse/TRUNK-3644
This is work in progress. Do not merge yet.