com.plumtree.remote.sci
Interface IAdminPage


public interface IAdminPage

An interface for an individual SCI page.


Method Summary
 java.lang.String getContent(int errorCode, NamedValueMap pageInfo)
          Gets the content for this page in string form.
Example for selecting a filter for a newsgroup:
 java.lang.String getHelpURI()
          Gets the help page URI for the page.
 java.lang.String getImageURI()
          Gets the editor icon.
 java.lang.String getInstructions()
          Gets the editor instructions, displayed below the title in the editor page.
 java.lang.String getTitle()
          Gets the title for this page.
 void validatePage(NamedValueMap pageInfo)
          Validates the current page and throws a ValidationException to report an error.
 

Method Detail

getTitle

public java.lang.String getTitle()
                          throws ServiceException
Gets the title for this page.

Returns:
the page title
Throws:
ServiceException - if a SOAP error occurs

getInstructions

public java.lang.String getInstructions()
                                 throws ServiceException
Gets the editor instructions, displayed below the title in the editor page.

Returns:
the instructions for the SCI page
Throws:
ServiceException - if a SOAP error occurs

getImageURI

public java.lang.String getImageURI()
                             throws ServiceException
Gets the editor icon. (This setting is for backward compatibility; no icon is displayed in version 5.0.)

Returns:
the image URI
Throws:
ServiceException - if a SOAP error occurs

getHelpURI

public java.lang.String getHelpURI()
                            throws ServiceException
Gets the help page URI for the page.

Returns:
the help page URI
Throws:
ServiceException - if a SOAP error occurs

getContent

public java.lang.String getContent(int errorCode,
                                   NamedValueMap pageInfo)
                            throws ServiceException
Gets the content for this page in string form.
Example for selecting a filter for a newsgroup:
   SciPage sciPage = new SciPage();


   //deal with any validation exceptions- i.e. if errorCode != 0
   SciLabelElement errorElement = null;

   //the errorCode was defined when throwing the validation exception- 2 is for illustration only
   if (errorCode == 2)
   {
     //if we got an errorCode, we can assume that filter is not null as we have already filled in this page
     errorElement = new SciLabelElement(
         "No groups match filter " + filter + " select another filter",
         TypeStyle.STYLE_IMPORTANT);
   }

      //add a label element
      SciLabelElement labelElement = new SciLabelElement("Add a filter to restrict the list of groups, e.g. comp.lang.java.*. Only the first fifty matching groups will be listed.",
       TypeStyle.STYLE_NORMAL);

     // add a text box for the filter
     SciTextElement filterElement = new SciTextElement("Filter",
       "Enter a filter");
     filterElement.setMandatoryValidation("You must enter a filter");
     filterElement.setSize(40);

     //if we already have a filter, set the value of the text control
 		 String filter = pageInfo.get("Filter");
     if (null != filter)
     {
       filterElement.setValue(filter);
     }

     if (null != errorElement)
     {
       sciPage.add(errorElement);
     }

   sciPage.add(labelElement);
   sciPage.add(filterElement);

 return sciPage.toString();

Parameters:
errorCode - the error code from previous page if ValidationException is thrown, or null if no exception was thrown
pageInfo - the NamedValueMap of incoming page values. If this is from an existing set of pages (IAdminEditor has previously called finalize()), then the names in the NamedValueMap will be uppercased.
Returns:
the contents of the page as a String
Throws:
ServiceException - if a SOAP error occurs

validatePage

public void validatePage(NamedValueMap pageInfo)
                  throws ValidationException,
                         ServiceException
Validates the current page and throws a ValidationException to report an error. Used to provide validition that cannot be accomplished using regular expressions; for example, validating a user name and password for a database. The error code in a thrown ValidationException is used as theerrorCode used in getContent for each error condition.

Parameters:
pageInfo - the NamedValueMap of values from the page. If this is from an existing set of pages (IAdminEditor has previously called finalize()), then the names in the NamedValueMap will be uppercased.
Throws:
ValidationException - if any setting values are invalid
ServiceException - if a SOAP error occurs


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.