# com.bea.p13n.placeholder
PlaceholderService Interface

public interface PlaceholderService
extends `EJBObject`

The remote bean interface for the PlaceholderService.

A placeholder is a named location in some page and is represented by the PlaceholderTag. The primary function of the placeholder service is to return content to the PlaceholderTag when it is viewed. This content is based upon the type of the placeholder, and user information.

All Superinterfaces
  `EJBObject`, `Remote`

## Method Summary

`public `String`` | `getContent`(`String` name, `String` userId, `String` servletBase, `Request` request, int height, int width) Return the content for the requested placeholder.
`public `Collection`` | `getDeployedPlaceholderURIs`() Get the list of placeholder uris currently deployed in this service.
`public `String`` | `getPreviewSlot`(long previewId) Get a preview slot's XML query.
`public `String`` | `getPreviewSlotQuery`(long previewId, `String` userId) Get a preview slot's XML query as a content query, with any property references filled out.
`public `Collection`` | `previewContent`(`String` query, `String` servletBase, `String` phType, boolean renderContent) Return a collection of PreviewInfo structures which match all of the content for the query.
`public `Collection`` | `previewContent`(long previewId, `String` userId, `String` servletBase, `String` phType) Return a collection of PreviewInfo structures which match all of the content for the query.
`public void` | `removePreviewSlot`(long previewId) Remove a preview slot
`public long` | `setPreviewSlot`(`String` xmlQuery) Create a preview slot.

Methods from interface `javax.ejb.`EJBObject``
`getEJBHome, getHandle, getPrimaryKey, isIdentical, remove`

## Method Detail

### getContent(String, String, String, Request, int, int) Method

    public String getContent(String name,
                             String userId,
                             String servletBase,
                             Request request,
                             int height,
                             int width)
         throws RemoteException, ContentException

Return the content for the requested placeholder.

#### Parameters

name
  The name of the placeholder

userId
  The user id

servletBase
  A URL base that is used to find the ClickThru and ShowDocServlet

request
  The http request

height
  The requested height of the content

width
  The requested width of the content

#### Returns

an XML String representing the content.

#### Exceptions

``RemoteException``
``ContentException``
  thrown when there is a failure to obtain the content

### getDeployedPlaceholderURIs() Method

    public Collection getDeployedPlaceholderURIs()
         throws RemoteException, ContentException

Get the list of placeholder uris currently deployed in this service.

#### Exceptions

``RemoteException``
``ContentException``

### getPreviewSlot(long) Method

DEPRECATED No longer used.

    public String getPreviewSlot(long previewId)
         throws RemoteException, ContentException

Get a preview slot's XML query.

#### Exceptions

``RemoteException``
``ContentException``

### getPreviewSlotQuery(long, String) Method

DEPRECATED No longer used.

    public String getPreviewSlotQuery(long previewId,
                                      String userId)
         throws RemoteException, ContentException, ProfileNotFoundException, IllegalArgumentException

Get a preview slot's XML query as a content query, with any property references filled out.

#### Returns

the content query on success, null on invalid information.

#### Exceptions

``RemoteException``
``ContentException``
``ProfileNotFoundException``
``IllegalArgumentException``

### previewContent(String, String, String, boolean) Method

    public Collection previewContent(String query,
                                     String servletBase,
                                     String phType,
                                     boolean renderContent)
         throws RemoteException, ContentException

Return a collection of PreviewInfo structures which match all of the content for the query.

#### Parameters

query
  the content query to preview

servletBase
  the base URI of the webapp to preview in

phType
  the placeholder type (Ad, ContentSelector)

renderContent
  true to include the rendering content in the preview, false to not.

#### Exceptions

``RemoteException``
``ContentException``

### previewContent(long, String, String, String) Method

DEPRECATED No longer used.

    public Collection previewContent(long previewId,
                                     String userId,
                                     String servletBase,
                                     String phType)
         throws RemoteException, ContentException

Return a collection of PreviewInfo structures which match all of the content for the query.

#### Parameters

previewId
  the id of the preview slot containing the query

userId
  the id of the user to preview as

servletBase
  the base URI of the webapp to preview in

phType
  the placeholder type (Ad, ContentSelector)

#### Exceptions

``RemoteException``
``ContentException``

Related Topics

``PlaceholderService.getPreviewSlot(long)``

### removePreviewSlot(long) Method

DEPRECATED No longer used.

    public void removePreviewSlot(long previewId)
         throws RemoteException, ContentException

Remove a preview slot

#### Exceptions

``RemoteException``
``ContentException``

### setPreviewSlot(String) Method

DEPRECATED No longer used.

    public long setPreviewSlot(String xmlQuery)
         throws RemoteException, ContentException

Create a preview slot.

#### Exceptions

``RemoteException``
``ContentException``