Hitachi

JP1 Version 12 JP1/Navigation Platform Development Guide


6.2.3 contains method

This method checks the presence of suspend information associated in Suspend/Resume Plugins. It checks whether the suspend information associated with the Operational Content ID specified by the parameter exists. This method returns true if the associated suspend information exists, and returns false if such information does not exist.

If this method throws the UCNPPluginException exception, Navigation Platform displays the message for the UCNPPluginException exception in the dialog box. A message ID is not appended to the message displayed in the dialog box.

Processing of this method must be implemented in the suspend/resume action controller class created by using the template plugin creation command.

Organization of this subsection

(1) Format

public boolean contains(String contentId, HttpSession session)
          throws UCNPPluginException;

(2) Arguments

(a) contentId

This argument indicates the Operational Content ID.

(b) session

This argument stores the current session. To execute the setAttribute() method for the HttpSession object acquired in a plugin, do not specify any of the following names for the name argument of the setAttribute() method:

  • Name beginning with "ucnp"

  • Name beginning with "java."

  • Name beginning with "javax."

  • Name beginning with "javax.portlet."

  • Name beginning with "hptl"

  • Name beginning with "com.cosminexus"

  • Name beginning with "jp.co.hitachi.soft.portal"

You can also acquire and use the URL request parameter. To use this parameter, you must acquire the ucnpOptions parameter by using the following key:

ucnp.request.options key

This key is used to acquire the value of the ucnpOptions parameter specified for the URL from the session. By specifying this key in the HttpSession.getAttribute() method, you can acquire the URL decoded value of the ucnpOptions parameter. If the ucnpOptions parameter is not specified for the URL, null is returned.

For details about a specification example of the ucnp.request.options key, see the specification example of the inputFromNode method in 5.2 IIoPluginController (server processing implementation interface).

(3) Return values

(4) Exception

UCNPPluginException - An error occurred while, for example, suspend information was being loaded.

Navigation Platform displays the detailed message for the UCNPPluginException exception thrown by this method in the dialog box in the Operational Content Execution Window. For the UCNPPluginException exception to be thrown, specify the message that helps users understand what kind of error occurred and what action to take. If the error message output by the Suspend/Resume Plugin contains many linefeeds, part of the message dialog box might not be displayed in the window because a JavaScript Alert is used to display the error message. Therefore, make sure that the error message size does not exceed the limit that can be displayed in the window.

(5) Invocation timing

Navigation Platform invokes this method if either of the following occurs: