public abstract class DefaultBlogIntegrationImplementation extends BaseBlogIntegrationImplementation
Modifier and Type | Field and Description |
---|---|
protected static String |
ACTION_DELETE_POST |
protected static String |
ACTION_EDIT_POST |
protected static String |
ACTION_GET_POST |
protected static String |
ACTION_NEW_POST
Blog actions
|
Constructor and Description |
---|
DefaultBlogIntegrationImplementation() |
Modifier and Type | Method and Description |
---|---|
protected String |
checkForProtocol(String url)
Checks a url for a protocol and adds http if none present
|
protected String |
checkForTrainlingSlash(String url)
Checks the url for a trailing slash and adds one if none present
|
boolean |
deletePost(BlogDetails blogDetails,
String postId)
Delete an existing blog post
|
protected Object |
execute(String url,
String method,
List<Object> params)
Executes an XML RPC method
|
protected abstract String |
getEndpointURL(BlogDetails blogDetails)
Gets the XML RPC end point URL for the given blog details.
|
Map<String,Object> |
getPost(BlogDetails blogDetails,
String postId)
Get the details of an existing blog post
|
String |
newPost(BlogDetails blogDetails,
String title,
String body,
boolean publish)
Create a new post on the blog.
|
boolean |
updatePost(BlogDetails blogDetails,
String postId,
String title,
String body,
boolean publish)
Update an exisiting blog post
|
getDisplayName, getName, register, setBlogIntegrationService, setDisplayName, setName
protected static final String ACTION_NEW_POST
protected static final String ACTION_EDIT_POST
protected static final String ACTION_GET_POST
protected static final String ACTION_DELETE_POST
public DefaultBlogIntegrationImplementation()
protected abstract String getEndpointURL(BlogDetails blogDetails)
blogDetails
- blog detailspublic String newPost(BlogDetails blogDetails, String title, String body, boolean publish)
BlogIntegrationImplementation
blogDetails
- the blog detailstitle
- the title of the postbody
- the body of the postpublish
- indicates whether the post is published or notBlogIntegrationImplementation.newPost(org.alfresco.repo.blog.BlogDetails, java.lang.String, java.lang.String, boolean)
public boolean updatePost(BlogDetails blogDetails, String postId, String title, String body, boolean publish)
BlogIntegrationImplementation
blogDetails
- BlogDetailspostId
- Stringtitle
- Stringbody
- Stringpublish
- booleanBlogIntegrationImplementation.updatePost(org.alfresco.repo.blog.BlogDetails, java.lang.String, java.lang.String, java.lang.String, boolean)
public Map<String,Object> getPost(BlogDetails blogDetails, String postId)
BlogIntegrationImplementation
blogDetails
- BlogDetailspostId
- StringBlogIntegrationImplementation.getPost(org.alfresco.repo.blog.BlogDetails, java.lang.String)
public boolean deletePost(BlogDetails blogDetails, String postId)
BlogIntegrationImplementation
blogDetails
- BlogDetailspostId
- StringBlogIntegrationImplementation.deletePost(org.alfresco.repo.blog.BlogDetails, java.lang.String)
protected Object execute(String url, String method, List<Object> params)
url
- Stringmethod
- Stringprotected String checkForProtocol(String url)
url
- the urlCopyright © 2005–2017 Alfresco Software. All rights reserved.