Package com.enonic.xp.content

## Interface ContentService

-     @PublicApi
      public interface ContentService

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ApplyContentPermissionsResult` | `applyPermissions​(ApplyContentPermissionsParams params)` |
    `ArchiveContentsResult` | `archive​(ArchiveContentParams params)` |
    `CompareContentResult` | `compare​(CompareContentParams params)` | Deprecated.
    `CompareContentResults` | `compare​(CompareContentsParams params)` |
    `boolean` | `contentExists​(ContentId contentId)` |
    `boolean` | `contentExists​(ContentPath contentPath)` |
    `Content` | `create​(CreateContentParams params)` |
    `Content` | `create​(CreateMediaParams params)` |
    `Site` | `create​(CreateSiteParams params)` |
    `DeleteContentsResult` | `deleteWithoutFetch​(DeleteContentParams params)` |
    `DuplicateContentsResult` | `duplicate​(DuplicateContentParams params)` |
    `FindContentIdsByQueryResult` | `find​(ContentQuery query)` |
    `FindContentByQueryResult` | `find​(FindContentByQueryParams params)` | Deprecated.
    `Contents` | `findByApplicationKey​(ApplicationKey key)` |
    `FindContentByParentResult` | `findByParent​(FindContentByParentParams params)` |
    `ContentPaths` | `findContentPaths​(ContentQuery query)` | Deprecated.
    `FindContentIdsByParentResult` | `findIdsByParent​(FindContentByParentParams params)` |
    `Site` | `findNearestSiteByPath​(ContentPath contentPath)` |
    `FindContentPathsByQueryResult` | `findPaths​(ContentQuery query)` |
    `ContentVersion` | `getActiveVersion​(GetActiveContentVersionParams params)` |
    `GetActiveContentVersionsResult` | `getActiveVersions​(GetActiveContentVersionsParams params)` |
    `ByteSource` | `getBinary​(ContentId contentId, ContentVersionId contentVersionId, BinaryReference binaryReference)` |
    `ByteSource` | `getBinary​(ContentId contentId, BinaryReference binaryReference)` |
    `InputStream` | `getBinaryInputStream​(ContentId contentId, BinaryReference binaryReference)` | Deprecated.
    `String` | `getBinaryKey​(ContentId contentId, BinaryReference binaryReference)` |
    `Content` | `getById​(ContentId contentId)` |
    `Content` | `getByIdAndVersionId​(ContentId contentId, ContentVersionId versionId)` |
    `Contents` | `getByIds​(GetContentByIdsParams params)` |
    `Content` | `getByPath​(ContentPath path)` |
    `Content` | `getByPathAndVersionId​(ContentPath contentPath, ContentVersionId versionId)` | Deprecated.
    `Contents` | `getByPaths​(ContentPaths paths)` |
    `ContentValidityResult` | `getContentValidity​(ContentValidityParams params)` |
    `ContentDependencies` | `getDependencies​(ContentId id)` |
    `ContentIds` | `getInvalidContent​(ContentIds contentIds)` | Deprecated.
    `Site` | `getNearestSite​(ContentId contentId)` |
    `ContentIds` | `getOutboundDependencies​(ContentId id)` |
    `AccessControlList` | `getPermissionsById​(ContentId contentId)` | Deprecated.
    `GetPublishStatusesResult` | `getPublishStatuses​(GetPublishStatusesParams params)` |
    `AccessControlList` | `getRootPermissions()` |
    `FindContentVersionsResult` | `getVersions​(FindContentVersionsParams params)` |
    `Boolean` | `hasUnpublishedChildren​(HasUnpublishedChildrenParams params)` |
    `ImportContentResult` | `importContent​(ImportContentParams params)` |
    `boolean` | `isValidContent​(ContentIds contentIds)` | Deprecated.
    `MoveContentsResult` | `move​(MoveContentParams params)` |
    `PublishContentResult` | `publish​(PushContentParams params)` |
    `Content` | `rename​(RenameContentParams params)` |
    `ReorderChildContentsResult` | `reorderChildren​(ReorderChildContentsParams params)` |
    `Content` | `reprocess​(ContentId contentId)` |
    `CompareContentResults` | `resolvePublishDependencies​(ResolvePublishDependenciesParams params)` |
    `ContentIds` | `resolveRequiredDependencies​(ResolveRequiredDependenciesParams params)` |
    `RestoreContentsResult` | `restore​(RestoreContentParams params)` |
    `SetActiveContentVersionResult` | `setActiveContentVersion​(ContentId contentId, ContentVersionId versionId)` | Deprecated.
    `Content` | `setChildOrder​(SetContentChildOrderParams params)` |
    `int` | `undoPendingDelete​(UndoPendingDeleteContentParams params)` | Deprecated.
    `UnpublishContentsResult` | `unpublishContent​(UnpublishContentParams params)` |
    `Content` | `update​(UpdateContentParams params)` |
    `Content` | `update​(UpdateMediaParams params)` |

- - ### Method Detail

    - #### create

          Site create​(CreateSiteParams params)

    - #### create

          Content create​(CreateContentParams params)

    - #### create

          Content create​(CreateMediaParams params)

    - #### update

          Content update​(UpdateContentParams params)

    - #### update

          Content update​(UpdateMediaParams params)

    - #### rename

          Content rename​(RenameContentParams params)

    - #### deleteWithoutFetch

          DeleteContentsResult deleteWithoutFetch​(DeleteContentParams params)

    - #### undoPendingDelete

          @Deprecated
          int undoPendingDelete​(UndoPendingDeleteContentParams params)

      Deprecated.

    - #### publish

          PublishContentResult publish​(PushContentParams params)

    - #### unpublishContent

          UnpublishContentsResult unpublishContent​(UnpublishContentParams params)

    - #### resolvePublishDependencies

          CompareContentResults resolvePublishDependencies​(ResolvePublishDependenciesParams params)

    - #### resolveRequiredDependencies

          ContentIds resolveRequiredDependencies​(ResolveRequiredDependenciesParams params)

    - #### isValidContent

          @Deprecated
          boolean isValidContent​(ContentIds contentIds)

      Deprecated.

    - #### getInvalidContent

          @Deprecated
          ContentIds getInvalidContent​(ContentIds contentIds)

      Deprecated.

    - #### getContentValidity

          ContentValidityResult getContentValidity​(ContentValidityParams params)

    - #### duplicate

          DuplicateContentsResult duplicate​(DuplicateContentParams params)

    - #### move

          MoveContentsResult move​(MoveContentParams params)

    - #### archive

          ArchiveContentsResult archive​(ArchiveContentParams params)

    - #### restore

          RestoreContentsResult restore​(RestoreContentParams params)

    - #### setChildOrder

          Content setChildOrder​(SetContentChildOrderParams params)

    - #### reorderChildren

          ReorderChildContentsResult reorderChildren​(ReorderChildContentsParams params)

    - #### hasUnpublishedChildren

          Boolean hasUnpublishedChildren​(HasUnpublishedChildrenParams params)

    - #### applyPermissions

          ApplyContentPermissionsResult applyPermissions​(ApplyContentPermissionsParams params)

    - #### getById

          Content getById​(ContentId contentId)

    - #### getNearestSite

          Site getNearestSite​(ContentId contentId)

    - #### findNearestSiteByPath

          Site findNearestSiteByPath​(ContentPath contentPath)

    - #### getByIds

          Contents getByIds​(GetContentByIdsParams params)

    - #### getByPath

          Content getByPath​(ContentPath path)

    - #### getPermissionsById

          @Deprecated
          AccessControlList getPermissionsById​(ContentId contentId)

      Deprecated.

    - #### getByPaths

          Contents getByPaths​(ContentPaths paths)

    - #### findByParent

          FindContentByParentResult findByParent​(FindContentByParentParams params)

    - #### findIdsByParent

          FindContentIdsByParentResult findIdsByParent​(FindContentByParentParams params)

    - #### find

          @Deprecated
          FindContentByQueryResult find​(FindContentByQueryParams params)

      Deprecated.

    - #### find

          FindContentIdsByQueryResult find​(ContentQuery query)

    - #### findByApplicationKey

          Contents findByApplicationKey​(ApplicationKey key)

    - #### findContentPaths

          @Deprecated
          ContentPaths findContentPaths​(ContentQuery query)

      Deprecated.

    - #### findPaths

          FindContentPathsByQueryResult findPaths​(ContentQuery query)

    - #### compare

          @Deprecated
          CompareContentResult compare​(CompareContentParams params)

      Deprecated.

    - #### compare

          CompareContentResults compare​(CompareContentsParams params)

    - #### getPublishStatuses

          GetPublishStatusesResult getPublishStatuses​(GetPublishStatusesParams params)

    - #### getVersions

          FindContentVersionsResult getVersions​(FindContentVersionsParams params)

    - #### getActiveVersions

          GetActiveContentVersionsResult getActiveVersions​(GetActiveContentVersionsParams params)

    - #### getActiveVersion

          ContentVersion getActiveVersion​(GetActiveContentVersionParams params)

    - #### setActiveContentVersion

          @Deprecated
          SetActiveContentVersionResult setActiveContentVersion​(ContentId contentId,
                                                                ContentVersionId versionId)

      Deprecated.

    - #### getBinary

          ByteSource getBinary​(ContentId contentId,
                               BinaryReference binaryReference)

    - #### getBinary

          ByteSource getBinary​(ContentId contentId,
                               ContentVersionId contentVersionId,
                               BinaryReference binaryReference)

    - #### getBinaryInputStream

          @Deprecated
          InputStream getBinaryInputStream​(ContentId contentId,
                                           BinaryReference binaryReference)

      Deprecated.

    - #### getBinaryKey

          String getBinaryKey​(ContentId contentId,
                              BinaryReference binaryReference)

    - #### getRootPermissions

          AccessControlList getRootPermissions()

    - #### getDependencies

          ContentDependencies getDependencies​(ContentId id)

    - #### getOutboundDependencies

          ContentIds getOutboundDependencies​(ContentId id)

    - #### contentExists

          boolean contentExists​(ContentId contentId)

    - #### contentExists

          boolean contentExists​(ContentPath contentPath)

    - #### reprocess

          Content reprocess​(ContentId contentId)

    - #### getByIdAndVersionId

          Content getByIdAndVersionId​(ContentId contentId,
                                      ContentVersionId versionId)

    - #### getByPathAndVersionId

          @Deprecated
          Content getByPathAndVersionId​(ContentPath contentPath,
                                        ContentVersionId versionId)

      Deprecated.

    - #### importContent

          ImportContentResult importContent​(ImportContentParams params)