seaside1 / jrule

openHAB Java Rules Engine
Eclipse Public License 2.0
29 stars 15 forks source link

Added the ability to configure the name of the package in jrule.conf #170

Closed kuimovvg closed 1 year ago

kuimovvg commented 1 year ago

Added the ability to configure the name of the package in jrule.conf which contains rule classes. The default package is org.openhab.automation.jrule.rules.user

seaside1 commented 1 year ago

Thank you. Will have a look shortly

seaside1 commented 1 year ago

So I made some changes. This PR worked well with jar-file but not with classes since those need to be located in package structure as well.

seaside1 commented 1 year ago

If you are happy with this, I'll merge it.

kuimovvg commented 1 year ago

There is no error in this line due to changes related to this pr?

public static String createUid(JRule jRule, Method method) {
        return jRule.getClass().getCanonicalName().replace("org.openhab.automation.jrule.rules.user.", "") + "."
                + method.getName();
}