Class CCUtils

java.lang.Object
com.portal.app.cc.utils.CCUtils

public final class CCUtils extends Object
This is the utility class class used to SparseArray from given FList, to get Poid from given FList and to display a screen in center
  • Field Details

  • Constructor Details

    • CCUtils

      public CCUtils()
  • Method Details

    • getArrayFromFlist

      public static SparseArray getArrayFromFlist(FList src, ArrayField field)
      If the flist contains a value for the specified field, return the value from the flist. Otherwise return null.
      Parameters:
      src - the flist that is checked for existence of field
      field - the field of interest
      Returns:
      the value from src if src contains field; otherwise null
    • getArrayFromFlist

      public static SparseArray getArrayFromFlist(FList src, ArrayField field, SparseArray defaultValue)
      If the flist contains a value for the specified field, return the value from the flist. Otherwise return the default value. Typical usage is to use com.portal.pricing.Constants.EMPTY_ARRAY as the default value. WARNING: Constants.EMPTY_ARRAY should not be modified. Do not modify the return value of this method (for example, by adding elements to it). Also, do not add the return value of this method to another flist as it may end up being modified.
      Parameters:
      src - the flist that is checked for existence of field
      field - the field of interest
      defaultValue - the value to return if src does not contain field
      Returns:
      the value from src if src contains field; otherwise defaultValue
    • getPoidFromFlist

      public static Poid getPoidFromFlist(FList src, PoidField field)
      If the flist contains a value for the specified field, return the value from the flist. Otherwise return null.
      Parameters:
      src - the flist that is checked for existence of field
      field - the field of interest
      Returns:
      the value from src if src contains field; otherwise null
    • centerTheScreen

      public static final void centerTheScreen(Window parent, Window child)
      Method to display window on center of the screen
      Parameters:
      Window - parent
      Window - child
    • buildPlanName

      public static String buildPlanName(String name, int count)
      Appends the instance count and prefixes the string to the plan
      Parameters:
      name -
      count -
      Returns:
      planName
    • isCorrectiveInvoicingEnabled

      public static boolean isCorrectiveInvoicingEnabled()
      Utility method to look at /config/business_params and find out whether Corrective Invoicing feature is enabled or not. if "enable_corrective_invoices" is 0 then disabled(default). if "enable_corrective_invoices" is 1 then feature is enabled.
      Returns:
    • enableActions

      public static void enableActions(boolean enableActions)
      This method is used to enable/disable certain A/R actions which shouldn't be allowed when there are further corrective bills available for the selected bill. Intention is all the A/R actions should be allowed only from the latest corrective bill.
      Parameters:
      enableActions -
    • isEnableActions

      public static boolean isEnableActions()
      This method returns true if there are no further corrective bills for the selected bill. False otherwise.
      Returns:
      boolEnableActions
    • getServiceAliasValue

      public static final String getServiceAliasValue(SparseArray spAlias, String serviceType, String UNKNOWN) throws EBufException
      This method reads the index property from customized.properties to get the number for the service alias index and returns the Service Alias value at that index Ex: service.telco.gsm.sms.alias = 1 0 PIN_FLD_ALIAS_LIST ARRAY [0] allocated 20, used 1 1 PIN_FLD_NAME STR [0] "11000965571" 0 PIN_FLD_ALIAS_LIST ARRAY [1] allocated 20, used 1 1 PIN_FLD_NAME STR [0] "4033901245" 0 PIN_FLD_ALIAS_LIST ARRAY [2] allocated 20, used 1 1 PIN_FLD_NAME STR [0] "403390124500000" for the above index property alias name should be '4033901245' If the alias property is not found or if the alias index value is not a numeric value or the index value exceeds the actual indexes found,it returns the last alias value
      Parameters:
      spAlias - Service Alias Array
      serviceType - Service Type
      UNKNOWN - Constant to be appended for the service alias value
      Returns:
      Service Alias value
      Throws:
      EBufException
    • setBusyCursor

      public static void setBusyCursor(boolean isBusy, Component comp)
      Sets the cursor. If true passed then WAIT_CURSOR will be shown. If false then DEFAULT cursor will be displayed.
      Parameters:
      isBusy - , boolean
    • getSubsPrefsPermission

      public static String getSubsPrefsPermission()
      Returns the permission associated with PERM_SUBS_PREFERENCE.
      Returns:
      subsPrefsPerm
    • setCofigSubsPrefsExists

      public static void setCofigSubsPrefsExists(boolean isSubsPrefsExists)
      Setter method to set isCofigSubsPrefsExists
      Parameters:
      isSubsPrefsExists -
    • getCofigSubsPrefsExists

      public static boolean getCofigSubsPrefsExists()
      Getter method to get isCofigSubsPrefsExists
      Returns:
      isCofigSubsPrefsExists
    • setServiceLifeCycleTypeMap

      public static void setServiceLifeCycleTypeMap(String serviceType, LifeCycleStates lc)
      set the life cycle state object for the given service type so that all the services of the same type will use this life cycle object to get all the string state names to display on the GUI
      Parameters:
      serviceType -
      lc -
    • getServiceLifeCycleTypeMap

      public static LifeCycleStates getServiceLifeCycleTypeMap(String serviceType)
      get the life cycle object for the given service type.
      Parameters:
      serviceType -
      Returns:
    • getEnglishEquiv

      public static String getEnglishEquiv(String localeStr)
      Returns the english equivalent of the locale string, needed for Set subscriber preferences opcode
      Parameters:
      localeStr -
      Returns:
    • getStringTableEntryFor

      public static LocalizedStringTable.Entry getStringTableEntryFor(PortalContext ctx, String domain, Integer version, Integer id, String engEquiv)
      Returns the first entry associated string version
      Parameters:
      ctx -
      domain -
      version -
      id -
      Returns:
    • getStringTableEntriesFor

      public static LocalizedStringTable.Entry[] getStringTableEntriesFor(PortalContext ctx, String domain, Integer version, Integer id)
      Returns the locale entries for the domain version string_id
      Parameters:
      ctx -
      domain -
      version -
      id -
      Returns: