[ 
https://issues.apache.org/jira/browse/OFBIZ-7913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pratik Kulshreshth updated OFBIZ-7913:
--------------------------------------
    Attachment: OFBIZ-7913.patch

Uploaded patch for this task.
Thanks [~rishisolankii] for detailed description and guidance.

> Enforce noninstantiability to TemporalExpressionWorker class
> ------------------------------------------------------------
>
>                 Key: OFBIZ-7913
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7913
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Rishi Solanki
>            Priority: Minor
>         Attachments: OFBIZ-7913.patch
>
>
> - Make class as final.
> - Add a private constructor.
> - Make the following public static variables as private
> {code}
>     // Temporal expression type constants
>     public final static String DateRange = "DATE_RANGE";
>     public final static String DayInMonth = "DAY_IN_MONTH";
>     public final static String DayOfMonthRange = "DAY_OF_MONTH_RANGE";
>     public final static String DayOfWeekRange = "DAY_OF_WEEK_RANGE";
>     public final static String Difference = "DIFFERENCE";
>     public final static String Frequency = "FREQUENCY";
>     public final static String HourRange = "HOUR_RANGE";
>     public final static String Intersection = "INTERSECTION";
>     public final static String MinuteRange = "MINUTE_RANGE";
>     public final static String MonthRange = "MONTH_RANGE";
>     public final static String Substitution = "SUBSTITUTION";
>     public final static String Union = "UNION";
>     public final static String ExpressionTypeList[] = {DateRange, DayInMonth, 
> DayOfMonthRange, DayOfWeekRange,
>         Difference, Frequency, HourRange, Intersection, MinuteRange, 
> MonthRange, Substitution, Union};
>     // Temporal expression assoc type constants
>     public final static String INCLUDE = "INCLUDE";
>     public final static String EXCLUDE = "EXCLUDE";
>     public final static String SUBSTITUTE = "SUBSTITUTE";
> {code}
> - Add public static method getExpressionTypeList() and use it in the 
> following classes;
> {code}
>     ExpressionUiHelper.java
> {code}
> - Make following protected methods as private;
> {code}
>      protected static Set<TemporalExpression> getChildExpressions(Delegator 
> delegator, String tempExprId) throws GenericEntityException
>      protected static TemporalExpression setExpressionId(GenericValue value, 
> TemporalExpression expression)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to