Class EnumToString

java.lang.Object
com.portal.web.comp.EnumToString

public class EnumToString extends Object
Converts com.portal.pcm.PortalEnums values to the equivalent String keys defined in the WebKitResources.properties file. You can use the ResourceBundle.getString() method to retrieve the values associated with the the defined keys.

See the API Reference for "PCM Java" in the online documentation for information about the PortalEnums interfaces.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Converts the account status value from com.portal.pcm.PortalEnums.PinStatus to the proper key to be read from the WebKitResources.properties file.
    getBillTypeAsString(int bill_type)
    Converts the bill type value from com.portal.pcm.PortalEnums.PinBillType to the proper key to be read from the WebKitResources.properties file.
    Converts an SMS mobile event direction value from com.portal.pcm.PortalEnums.PinSmsDirection to the proper key to be read from the WebKitResources.properties file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EnumToString

      public EnumToString()
  • Method Details

    • getAccountStatusAsString

      public String getAccountStatusAsString(int status)
      Converts the account status value from com.portal.pcm.PortalEnums.PinStatus to the proper key to be read from the WebKitResources.properties file. You can use the ResourceBundle.getString() method to retrieve the value associated with the key in the properties file.

      For example, if the account status value is com.portal.pcm.PortalEnums.PinStatus.ACTIVE, this method returns "account.status.active". In the WebKitResources.properties file, the defined value for this key is account.status.active = ACTIVE.

      See the Database Reference for "Storable Class Definitions" for information about the /account storable class.

      Parameters:
      status - an integer that represents this account's status (PIN_FLD_STATUS)
      Returns:
      A String that represents the associated key in the properties file, one of:
      • "account.status.defunct"
      • "account.status.active"
      • "account.status.inactive"
      • "account.status.closed"
      If the integer value passed in doesn't map to one of these keys, "account.status.undefined" is returned.
    • getBillTypeAsString

      public String getBillTypeAsString(int bill_type)
      Converts the bill type value from com.portal.pcm.PortalEnums.PinBillType to the proper key to be read from the WebKitResources.properties file. You can use the ResourceBundle.getString() method to retrieve the value associated with the key in the properties file.

      See the Database Reference for "Storable Class Definitions" for information about the /account storable class.

      Parameters:
      bill_type - an integer that represents this account's bill type (PIN_FLD_BILL_TYPE)
      Returns:
      A String that represents the associated key in the properties file, one of:
      • "account.billtype.prepaid"
      • "account.billtype.invoice"
      • "account.billtype.debit"
      • "account.billtype.dd"
      • "account.billtype.cc"
      If the integer value passed in doesn't map to one of these keys, "account.billtype.undefined" is returned.

      Note: Because not all bill types are defined in this method, you may get a return value of "undefined". If you have a bill type not included here, update the list.

    • getSmsDirectionAsString

      public String getSmsDirectionAsString(int dir)
      Converts an SMS mobile event direction value from com.portal.pcm.PortalEnums.PinSmsDirection to the proper key to be read from the WebKitResources.properties file. You can use the ResourceBundle.getString() method to retrieve the value associated with the key in the properties file.

      The direction of the SMS mobile event indicates whether the customer originated or received the call. See the Database Reference for "Storable Class Definitions" for information about the /event/activity/sms storable class.

      Parameters:
      dir - an integer that represents this SMS mobile event's direction (PIN_FLD_SMS_DIRECTION)
      Returns:
      A String containing the equivalent direction value for this SMS event:
      • "usage.sms.direction.originated"
      • "usage.sms.direction.terminated"
      If the integer value passed in doesn't map to one of these keys, "usage.sms.direction.undefined" is returned.