Package org.apache.sling.cms.publication

## Class PublicationEvent

- java.lang.Object
- - org.osgi.service.event.Event
  - - org.apache.sling.cms.publication.PublicationEvent

    public class PublicationEvent
    extends org.osgi.service.event.Event

Helper for generating OSGi Events for publication events

### Field Summary

Fields
`static String` `EVENT_PUBLISH`
`static String` `EVENT_UNPUBLISH`
`static String` `PN_DEEP`
`static String` `PN_PUBLICATION_TYPE`

### Method Summary

All Methods Static Methods Concrete Methods
`static PublicationEvent` `publish​(PublishableResource resource, boolean deep)` Creates an event to be fired when a publication occurs.
`static PublicationEvent` `unpublish​(PublishableResource resource, boolean deep)` Creates an event to be fired when a unpublish occurs.

### Methods inherited from class org.osgi.service.event.Event

`containsProperty, equals, getProperty, getPropertyNames, getTopic, hashCode, matches, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### EVENT_PUBLISH

    public static final String EVENT_PUBLISH

See Also:
  Constant Field Values

#### EVENT_UNPUBLISH

    public static final String EVENT_UNPUBLISH

See Also:
  Constant Field Values

#### PN_PUBLICATION_TYPE

    public static final String PN_PUBLICATION_TYPE

See Also:
  Constant Field Values

#### PN_DEEP

    public static final String PN_DEEP

See Also:
  Constant Field Values

### Method Detail

#### publish

    public static PublicationEvent publish​(PublishableResource resource,
                                           boolean deep)

Creates an event to be fired when a publication occurs.

Parameters:
  `resource` - the content published
  `deep` - if true publish the resource and all child resources
Returns:
  the publish event

#### unpublish

    public static PublicationEvent unpublish​(PublishableResource resource,
                                             boolean deep)

Creates an event to be fired when a unpublish occurs.

Parameters:
  `resource` - the content unpublish
  `deep` - if true unpublish the resource and all child resources
Returns:
  the unpublish event