Interface IParagraphService
- Namespace
- Dynamicweb.Content
- Assembly
- Dynamicweb.dll
The IParagraphService interface defines operation for working with the Paragraph Aggregate
[Obsolete("Use ParagraphService instead.")]
public interface IParagraphService
Methods
CopyTo(int, int)
Copies the paragraph with the specified source ID to the page with the specified ID.
Paragraph CopyTo(int pageID, int source)
Parameters
Returns
CopyTo(int, int, bool)
Copies the paragraph with the specified source ID to the page with the specified ID.
Paragraph CopyTo(int pageID, int source, bool isExperiment)
Parameters
pageID
int- The page ID to move the paragraph to.
source
int- The id of the paragraph to copy.
isExperiment
bool- Specifies whether the source paragraph is copied as a part of an IExperiment.
Returns
Delete(int)
Deletes the Paragraph with the specified id
void Delete(int paragraphId)
Parameters
paragraphId
int- The id of the paragraph to delete
DeleteAllPageParagraphs(Page)
Deletes all paragraphs associated with the specified page
ApplicationResponse DeleteAllPageParagraphs(Page page)
Parameters
page
Page- The page for which to delete all paragraphs
Returns
- ApplicationResponse
- An ApplicationResponse indicating the success or failure of the operation
DeleteAllParagraphs(Area)
Deletes all paragraphs associated with the specified area
ApplicationResponse DeleteAllParagraphs(Area area)
Parameters
area
Area- The area for which to delete all paragraphs
Returns
- ApplicationResponse
- An ApplicationResponse indicating the success or failure of the operation
DeleteParagraphItem(int)
Deletes the paragraph item
void DeleteParagraphItem(int paragraphId)
Parameters
paragraphId
int- The id of the paragraph to delete its item
ForceRefreshIndex(int)
Forces the specific item from the index to be force-refreshed from the repository.
bool ForceRefreshIndex(int paragraphId)
Parameters
paragraphId
int- Id of paragraph to be refreshed
Returns
- bool
- success
GetAvailableParagraphDefinitions(Page, string)
Gets the collection of available paragraph definitions for specified page.
IEnumerable<ParagraphDefinition> GetAvailableParagraphDefinitions(Page parent, string container)
Parameters
Returns
- IEnumerable<ParagraphDefinition>
- IEnumerable(Of ParagraphDefinition).
GetLanguageVersionsForParagraph(int)
Gets the language versions of the Paragraph with the specified id
IEnumerable<Paragraph> GetLanguageVersionsForParagraph(int paragraphId)
Parameters
paragraphId
int- The id of the Paragraph for which to get the language versions
Returns
- IEnumerable<Paragraph>
- A collection of Paragraph language versions
GetLatestModifiedParagraphs(int)
Gets latest modified paragraph
IEnumerable<Paragraph> GetLatestModifiedParagraphs(int count)
Parameters
count
int- Max count of paragraphs to returns
Returns
GetParagraph(int)
Gets the Paragraph with the specified id
Paragraph GetParagraph(int paragraphId)
Parameters
paragraphId
int- The id of the paragraph to get
Returns
- Paragraph
- The paragraph with the specified id
GetParagraphByParagraphOrPageIds(List<int>, List<int>)
Gets the paragraphs by paragraph or page ids.
IEnumerable<Paragraph> GetParagraphByParagraphOrPageIds(List<int> paragraphIds, List<int> pageIds)
Parameters
Returns
- IEnumerable<Paragraph>
- IEnumerable(Of Paragraph).
GetParagraphDraft(int)
Gets the draft version of the paragraph with the specified id if any.
Paragraph GetParagraphDraft(int paragraphId)
Parameters
paragraphId
int- Th id of the paragraph for which to get the draft version
Returns
- Paragraph
- The draft version of the paragraph with the specified id if any, otherwise null (Nothing)
GetParagraphDraft(int, DateTime)
Gets the draft version of the paragraph with the specified id if any.
Paragraph GetParagraphDraft(int paragraphId, DateTime previewDate)
Parameters
paragraphId
int- Th id of the paragraph for which to get the draft version
previewDate
DateTime- The preview date of the draft version
Returns
- Paragraph
- The draft version of the paragraph with the specified id if any, otherwise null (Nothing)
GetParagraphForItem(string, string)
Gets the paragraph for the item with the specified name and id
Paragraph GetParagraphForItem(string itemType, string itemId)
Parameters
Returns
- Paragraph
- The paragraph associated with the specified item
GetParagraphFromVersion(int, int)
Gets the paragraph with the specified id, but with its values populated from the version with the specified versionId
Paragraph GetParagraphFromVersion(int paragraphId, int versionId)
Parameters
paragraphId
int- The id of the paragraph to get
versionId
int- The id of the version from which the paragraph should have its data populated
Returns
- Paragraph
- A paragraph with data populated from the version with given versionId
GetParagraphs()
Gets all the paragraphs in the systen
IEnumerable<Paragraph> GetParagraphs()
Returns
- IEnumerable<Paragraph>
- A ParagraphCollection with all the paragraphs registred in the systen
GetParagraphsByAreaID(int)
Gets all the paragraphs associated with the specified area id
IEnumerable<Paragraph> GetParagraphsByAreaID(int areaID)
Parameters
areaID
int- The id of the area for which to get all associated Paragraphs
Returns
- IEnumerable<Paragraph>
- A collection of Paragraphs associated with the specified Area id
GetParagraphsByIds(IEnumerable<int>)
Gets the paragraphs matching the id's in the list
IEnumerable<Paragraph> GetParagraphsByIds(IEnumerable<int> ids)
Parameters
ids
IEnumerable<int>- A list of paragraph ids for which to get the matching Paragraphs
Returns
- IEnumerable<Paragraph>
- A collection of Paragraphs matching the ids in the specified list
GetParagraphsByItemTypes(IEnumerable<string>)
Gets the paragraphs that has one of the ItemTypes specified in the itemTypes list
IEnumerable<Paragraph> GetParagraphsByItemTypes(IEnumerable<string> itemTypes)
Parameters
itemTypes
IEnumerable<string>- A list of itemTypes for which to get Paragraphs
Returns
- IEnumerable<Paragraph>
- A collection of Paragraphs
GetParagraphsByModuleName(string)
Gets all the paragraphs that have the specified module name
IEnumerable<Paragraph> GetParagraphsByModuleName(string moduleName)
Parameters
moduleName
string- The module name for which to get all paragraphs
Returns
- IEnumerable<Paragraph>
- A ParagraphCollection with all paragraphs having the specified module name
GetParagraphsByPageId(int)
Gets all the paragraphs belonging to the page with the specified id
IEnumerable<Paragraph> GetParagraphsByPageId(int pageId)
Parameters
pageId
int- The id of the page for which to get all its paragraphs
Returns
- IEnumerable<Paragraph>
- A collection of Paragraphs
GetParagraphsByPageId(int, ParagraphSort)
Gets all the paragraphs belonging to the page with the specified id sorted by the specified sort value
IEnumerable<Paragraph> GetParagraphsByPageId(int pageId, ParagraphSort sortBy)
Parameters
pageId
int- The id of the page for which to get all its paragraphs
sortBy
ParagraphSort- A value indicating of the collection of Paragraphs should be sorted
Returns
- IEnumerable<Paragraph>
- A sorted collection of Paragraphs
GetTemplateParentPage(int)
Get paragraph template folder
Page GetTemplateParentPage(int areaId)
Parameters
areaId
int- The area id.
Returns
- Page
- The paragraph template folder
Move(int, int, int)
Moves the specified Paragrah from the source page to the target page
Paragraph Move(int paragraphId, int sourcePageId, int targetPageId)
Parameters
paragraphId
int- The id of the paragraph to move
sourcePageId
int- The id of the page from which to move the paragraph
targetPageId
int- The id of the page to which the paragraph should be moved
Returns
- Paragraph
- The newly moved Paragraph
SaveAsTemplate(Paragraph, string, string, string, string)
Saves the specified paragraph as a template
Paragraph SaveAsTemplate(Paragraph paragraph, string name, string description, string image, string category)
Parameters
paragraph
Paragraph- The paragraph to save as a template
name
string- The name of the new template
description
string- A description of the template
image
string- An image for the template
category
string- A category of the template
Returns
- Paragraph
- The paragraph template
SaveParagraph(Paragraph)
Saves the specified paragraph to persistance
Paragraph SaveParagraph(Paragraph paragraph)
Parameters
paragraph
Paragraph- The paragraph to save
Returns
- Paragraph
- The newly saved paragraph
ToggleActive(Paragraph, bool)
Include or exclude a paragraph in the layout of the webpage
void ToggleActive(Paragraph paragraph, bool active)
Parameters
paragraph
Paragraph- The paragraph to include or exclude
active
bool- Whether a paragraph is included or excluded
UpdateSortIndex(int, int, string)
Updates the paragraph sorting index and container in layout.
void UpdateSortIndex(int paragraphId, int sortIndex, string container)