Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
    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:
    short 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:
    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:
    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` - error code from previous page if `ValidationException` is thrown or null if no exception was thrown
    `pageInfo` - `NamedValueMap` of incoming page values. If this is from an existing set of pages (i.e. IAdminEditor has previously called finalize()), then the names in the `NamedValueMap` will be uppercased.
  Returns:
    content 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; e.g. validating a user name and password for a database. The errorCode in a thrown `ValidationException` is used as theerrorCode used in getContent for each error condition.

  Parameters:
    `pageInfo` - `NamedValueMap` of values from the page. If this is from an existing set of pages (i.e. 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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

For additional information on the IDK, including tutorials, blogs, code samples and more,see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.