Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7272 Enforce noninstantiability to all Utility classes
  3. OFBIZ-7913

Enforce noninstantiability to TemporalExpressionWorker class

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • 16.11.01
    • framework
    • None
    • Community Day 2 - 2016, OFBiz Community Day (May 2020)

    Description

      • Make class as final.
      • Add a private constructor.
      • Make the following public static variables as private
            // 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";
        
      • Add public static method getExpressionTypeList() and use it in the following classes;
            ExpressionUiHelper.java
        
      • Make following protected methods as private;
             protected static Set<TemporalExpression> getChildExpressions(Delegator delegator, String tempExprId) throws GenericEntityException
             protected static TemporalExpression setExpressionId(GenericValue value, TemporalExpression expression)
        

      Attachments

        1. OFBIZ-7913.patch
          5 kB
          Pratik Kulshreshth

        Activity

          People

            arunpati Arun Patidar
            rishisolankii Rishi Solanki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: