Package org.apache.sling.cms

## Interface PublishableResource

All Known Subinterfaces:
  `File`, `Page`

    public interface PublishableResource

A Model interface for adapting sling:File, sling:Page and sling:Config resources.

### Method Summary

All Methods Instance Methods Abstract Methods
`org.apache.sling.api.resource.Resource` `getContentResource()` Retrieves the content Resource of the content
`Calendar` `getCreated()` Gets the date the content was created
`String` `getCreatedBy()` Gets the name of the user whom created this file
`Calendar` `getLastModified()` Gets the last time this file was modified
`String` `getLastModifiedBy()` Gets the username of the user who last modified the content
`Calendar` `getLastPublication()` Gets the date of the last publication action
`String` `getLastPublicationBy()` Get the name of the user who last published the page.
`PublicationType` `getLastPublicationType()` The last publication action type
`String` `getName()` Gets the name of the Sling Resource backing the content
`org.apache.sling.api.resource.Resource` `getParent()` Gets the parent of the current page.
`String` `getPath()` Get the path this page resides within the repository
`org.apache.sling.api.resource.ValueMap` `getProperties()` Gets a ValueMap of the properties of the content resource for this page
`String` `getPublishedPath()` Gets the path of this page after it is published on the site's primary domain with the the html extension
`String` `getPublishedUrl()` Gets the full url (including domain) of this page after it is published on the site's primary domain with the the html extension
`org.apache.sling.api.resource.Resource` `getResource()` Gets the resource backing this file
`Site` `getSite()` Gets the site this file is contained within
`boolean` `isPublished()` Returns true if the content is published, false otherwise

### Method Detail

#### getPublishedPath

    String getPublishedPath()

Gets the path of this page after it is published on the site's primary domain with the the html extension

Returns:
  the published path of the content

#### getPublishedUrl

    String getPublishedUrl()

Gets the full url (including domain) of this page after it is published on the site's primary domain with the the html extension

Returns:
  the published url of the content

#### getSite

    Site getSite()

Gets the site this file is contained within

Returns:
  the site containing the content

#### getContentResource

    org.apache.sling.api.resource.Resource getContentResource()

Retrieves the content Resource of the content

Returns:
  the jcr:content child resource of the content

#### getCreated

    Calendar getCreated()

Gets the date the content was created

Returns:
  the date on which the content was created

#### getCreatedBy

    String getCreatedBy()

Gets the name of the user whom created this file

Returns:
  the name of the user whom created the content

#### getLastModified

    Calendar getLastModified()

Gets the last time this file was modified

Returns:
  the date the content was last modified

#### getLastModifiedBy

    String getLastModifiedBy()

Gets the username of the user who last modified the content

Returns:
  the name of the user who last modified the content

#### getLastPublicationType

    PublicationType getLastPublicationType()

The last publication action type

Returns:
  the last publication type

#### getName

    String getName()

Gets the name of the Sling Resource backing the content

Returns:
  the name of the content resource

#### getParent

    org.apache.sling.api.resource.Resource getParent()

Gets the parent of the current page. This will generally be another sling:Page or sling:Site

Returns:
  the parent of the content, may not be another page

#### getPath

    String getPath()

Get the path this page resides within the repository

Returns:
  the path of the content

#### getProperties

    org.apache.sling.api.resource.ValueMap getProperties()

Gets a ValueMap of the properties of the content resource for this page

Returns:
  the properties of the content resource

#### isPublished

    boolean isPublished()

Returns true if the content is published, false otherwise

Returns:
  whether or not the content is published

#### getResource

    org.apache.sling.api.resource.Resource getResource()

Gets the resource backing this file

Returns:
  the resource backing the content

#### getLastPublication

    Calendar getLastPublication()

Gets the date of the last publication action

Returns:
  the date of the publication action

#### getLastPublicationBy

    String getLastPublicationBy()

Get the name of the user who last published the page.

Returns:
  the user name or null