Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.portal.tools.im.controls.segments
Interface SegmentManagerControl

    @ControlInterface
    public interface SegmentManagerControl

A custom Java Control used to manage user segments.

Method Summary
`RuleModel` | `getSegment(String segmentUri, ResourceContext context)` Returns a `RuleModel` obect representing the user segment at the specified URI.
`SortableFilterablePagedResult<String>` | `getSegmentNames(int pageSize, ResourceContext context)` Returns a `PagedResult` of `String`s representing the names of all the user segments within the system, in arbitrary order.
`SortableFilterablePagedResult<RuleModel>` | `getSegments(int pageSize, ResourceContext context)` Returns a `PagedResult` of all the `RuleModel` objects within the system representing user segments, in arbitrary order.
`void` | `setSegment(RuleModel model, ResourceContext context)` Persists the given `RuleModel` representing a user segment.
`void` | `setSegment(String segmentUri, RuleModel model, boolean create, ResourceContext context)` Persists the given `RuleModel` representing a user segment.

Method Detail

### getSegments

    SortableFilterablePagedResult<RuleModel> getSegments(int pageSize,
                                                         ResourceContext context)
                                                         throws com.bea.p13n.management.data.repository.PersistenceException,
                                                                org.apache.xmlbeans.XmlException

  Returns a `PagedResult` of all the `RuleModel` objects within the system representing user segments, in arbitrary order. Returns an empty list if no user segments are defined.

  Parameters
    `pageSize` - the int page size for the `PagedResult`
    `context` - the resource context
  Returns
    a `PagedResult` of `RuleModel` objects
  Throws
    `com.bea.p13n.management.data.repository.PersistenceException` - if an error occurs while trying to query for the model data
    `org.apache.xmlbeans.XmlException` - if an error occurs while parsing the model data
  See Also
    `PagedResult`, `RuleModel`

### getSegmentNames

    SortableFilterablePagedResult<String> getSegmentNames(int pageSize,
                                                          ResourceContext context)
                                                          throws com.bea.p13n.management.data.repository.PersistenceException,
                                                                 org.apache.xmlbeans.XmlException

  Returns a `PagedResult` of `String`s representing the names of all the user segments within the system, in arbitrary order. Returns an empty list if no user segments are defined.

  Parameters
    `pageSize` - the int page size for the `PagedResult`
    `context` - the resource context
  Returns
    a `PagedResult` of `RuleModel` objects
  Throws
    `com.bea.p13n.management.data.repository.PersistenceException` - if an error occurs while trying to query for the model data
    `org.apache.xmlbeans.XmlException` - if an error occurs while parsing the model data
  See Also
    `PagedResult`

### getSegment

    RuleModel getSegment(String segmentUri,
                         ResourceContext context)
                         throws com.bea.p13n.management.data.repository.PersistenceException,
                                org.apache.xmlbeans.XmlException

  Returns a `RuleModel` obect representing the user segment at the specified URI. Returns null if the user segment is not defined.

  Parameters
    `segmentUri` - the string URI for the desired user segment
    `context` - the resource context
  Returns
    a `RuleModel` representing the desired user segment
  Throws
    `com.bea.p13n.management.data.repository.PersistenceException` - if an error occurs while trying to query for the model data
    `org.apache.xmlbeans.XmlException` - if an error occurs while parsing the model data
  See Also
    `RuleModel`

### setSegment

    void setSegment(RuleModel model,
                    ResourceContext context)
                    throws IllegalArgumentException,
                           com.bea.p13n.management.data.repository.MessageException,
                           com.bea.p13n.management.data.repository.PersistenceException,
                           org.apache.xmlbeans.XmlException

  Persists the given `RuleModel` representing a user segment. Any existing rule at the given segmentUri will be replaced by the new one.

  Parameters
    `model` - a `RuleModel` representing the user segment
    `context` - the resource context
  Throws
    `IllegalArgumentException` - if create=false and the user segment you are trying to replace does not exist at the given segmentUri.
    `com.bea.p13n.management.data.repository.MessageException` - if an error occurs while persisting model data
    `com.bea.p13n.management.data.repository.PersistenceException` - if an error occurs while trying to query for model data or persist model data
    `org.apache.xmlbeans.XmlException` - if an error occurs while parsing the model data

### setSegment

    void setSegment(String segmentUri,
                    RuleModel model,
                    boolean create,
                    ResourceContext context)
                    throws IllegalArgumentException,
                           com.bea.p13n.management.data.repository.MessageException,
                           com.bea.p13n.management.data.repository.PersistenceException,
                           org.apache.xmlbeans.XmlException

  Persists the given `RuleModel` representing a user segment. Any existing rule at the given segmentUri will be replaced by the new one.

  Parameters
    `segmentUri` - segmentUri the string URI for the desired user segment. Cannot be null.
    `model` - a `RuleModel` representing the user segment
    `create` - if true then create the user segment if it does not exist. If false then do not create the user segment if it does not exist. In both cases, an existing user segment will be replaced with the new one.
    `context` - the resource context
  Throws
    `IllegalArgumentException` - if create=false and the user segment you are trying to replace does not exist at the given segmentUri.
    `com.bea.p13n.management.data.repository.MessageException` - if an error occurs while persisting model data
    `com.bea.p13n.management.data.repository.PersistenceException` - if an error occurs while trying to query for model data or persist model data
    `org.apache.xmlbeans.XmlException` - if an error occurs while parsing the model data

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.