mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
125605 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125498 slanglois: MNT-16155 Update source headers - remove svn:eol-style property on Java and JSP source files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125783 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,189 +1,189 @@
|
||||
package org.alfresco.repo.blog;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.BlogIntegrationModel;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Blog details. Contains the detail of a blog.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public class BlogDetails implements BlogIntegrationModel
|
||||
{
|
||||
/** Node that has the blog details aspect applied */
|
||||
private NodeRef nodeRef;
|
||||
|
||||
/** The blog implementation name (eg: wordpress, typepad, etc) */
|
||||
private String implementationName;
|
||||
|
||||
/** The blog id */
|
||||
private String blogId;
|
||||
|
||||
/** The blog URL */
|
||||
private String url;
|
||||
|
||||
/** The user name */
|
||||
private String userName;
|
||||
|
||||
/** The password */
|
||||
private String password;
|
||||
|
||||
/** The display name of the blog */
|
||||
private String name;
|
||||
|
||||
/** The description of the blog */
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* Create a BlogDetails object from a node that has the blogDetails aspect applied.
|
||||
*
|
||||
* @param nodeService the node service
|
||||
* @param nodeRef the node reference
|
||||
* @return BlogDetails the blog details
|
||||
*/
|
||||
public static BlogDetails createBlogDetails(NodeService nodeService, NodeRef nodeRef)
|
||||
{
|
||||
// Check for the blog details aspect
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_BLOG_DETAILS) == false)
|
||||
{
|
||||
throw new BlogIntegrationRuntimeException("Can not create blog details object since node does not have blogDetails aspect.");
|
||||
}
|
||||
|
||||
// Get the blog details
|
||||
Map<QName, Serializable> props = nodeService.getProperties(nodeRef);
|
||||
return new BlogDetails(
|
||||
(String)props.get(PROP_BLOG_IMPLEMENTATION),
|
||||
(String)props.get(PROP_ID),
|
||||
(String)props.get(PROP_URL),
|
||||
(String)props.get(PROP_USER_NAME),
|
||||
(String)props.get(PROP_PASSWORD),
|
||||
(String)props.get(PROP_NAME),
|
||||
(String)props.get(PROP_DESCRIPTION),
|
||||
nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param implementationName the implementation name
|
||||
* @param blogId the blog id
|
||||
* @param url the blog URL
|
||||
* @param userName the user name
|
||||
* @param password the password
|
||||
* @param name the name
|
||||
* @param description the description
|
||||
*/
|
||||
public BlogDetails(String implementationName, String blogId, String url, String userName, String password, String name, String description)
|
||||
{
|
||||
this(implementationName, blogId, url, userName, password, name, description, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param implementationName the implementation name
|
||||
* @param blogId the blog id
|
||||
* @param url the blog URL
|
||||
* @param userName the user name
|
||||
* @param password the password
|
||||
* @param name the name
|
||||
* @param description the description
|
||||
* @param nodeRef the node reference
|
||||
*/
|
||||
public BlogDetails(String implementationName, String blogId, String url, String userName, String password, String name, String description, NodeRef nodeRef)
|
||||
{
|
||||
this.implementationName = implementationName;
|
||||
this.blogId = blogId;
|
||||
this.url = url;
|
||||
this.userName = userName;
|
||||
this.password = password;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.nodeRef = nodeRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the node reference
|
||||
*
|
||||
* @return NodeRef the node reference
|
||||
*/
|
||||
public NodeRef getNodeRef()
|
||||
{
|
||||
return nodeRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the implementation name
|
||||
*
|
||||
* @return String the implementation name
|
||||
*/
|
||||
public String getImplementationName()
|
||||
{
|
||||
return this.implementationName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the blog id
|
||||
*
|
||||
* @return String the blog id
|
||||
*/
|
||||
public String getBlogId()
|
||||
{
|
||||
return this.blogId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the blog URL
|
||||
*
|
||||
* @return String the blog URL
|
||||
*/
|
||||
public String getUrl()
|
||||
{
|
||||
return this.url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user name
|
||||
*
|
||||
* @return String the user name
|
||||
*/
|
||||
public String getUserName()
|
||||
{
|
||||
return this.userName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the password
|
||||
*
|
||||
* @return String the password
|
||||
*/
|
||||
public String getPassword()
|
||||
{
|
||||
return this.password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name
|
||||
*
|
||||
* @return String the name
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the description
|
||||
*
|
||||
* @return String the description
|
||||
*/
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
}
|
||||
package org.alfresco.repo.blog;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.BlogIntegrationModel;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Blog details. Contains the detail of a blog.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public class BlogDetails implements BlogIntegrationModel
|
||||
{
|
||||
/** Node that has the blog details aspect applied */
|
||||
private NodeRef nodeRef;
|
||||
|
||||
/** The blog implementation name (eg: wordpress, typepad, etc) */
|
||||
private String implementationName;
|
||||
|
||||
/** The blog id */
|
||||
private String blogId;
|
||||
|
||||
/** The blog URL */
|
||||
private String url;
|
||||
|
||||
/** The user name */
|
||||
private String userName;
|
||||
|
||||
/** The password */
|
||||
private String password;
|
||||
|
||||
/** The display name of the blog */
|
||||
private String name;
|
||||
|
||||
/** The description of the blog */
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* Create a BlogDetails object from a node that has the blogDetails aspect applied.
|
||||
*
|
||||
* @param nodeService the node service
|
||||
* @param nodeRef the node reference
|
||||
* @return BlogDetails the blog details
|
||||
*/
|
||||
public static BlogDetails createBlogDetails(NodeService nodeService, NodeRef nodeRef)
|
||||
{
|
||||
// Check for the blog details aspect
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_BLOG_DETAILS) == false)
|
||||
{
|
||||
throw new BlogIntegrationRuntimeException("Can not create blog details object since node does not have blogDetails aspect.");
|
||||
}
|
||||
|
||||
// Get the blog details
|
||||
Map<QName, Serializable> props = nodeService.getProperties(nodeRef);
|
||||
return new BlogDetails(
|
||||
(String)props.get(PROP_BLOG_IMPLEMENTATION),
|
||||
(String)props.get(PROP_ID),
|
||||
(String)props.get(PROP_URL),
|
||||
(String)props.get(PROP_USER_NAME),
|
||||
(String)props.get(PROP_PASSWORD),
|
||||
(String)props.get(PROP_NAME),
|
||||
(String)props.get(PROP_DESCRIPTION),
|
||||
nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param implementationName the implementation name
|
||||
* @param blogId the blog id
|
||||
* @param url the blog URL
|
||||
* @param userName the user name
|
||||
* @param password the password
|
||||
* @param name the name
|
||||
* @param description the description
|
||||
*/
|
||||
public BlogDetails(String implementationName, String blogId, String url, String userName, String password, String name, String description)
|
||||
{
|
||||
this(implementationName, blogId, url, userName, password, name, description, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param implementationName the implementation name
|
||||
* @param blogId the blog id
|
||||
* @param url the blog URL
|
||||
* @param userName the user name
|
||||
* @param password the password
|
||||
* @param name the name
|
||||
* @param description the description
|
||||
* @param nodeRef the node reference
|
||||
*/
|
||||
public BlogDetails(String implementationName, String blogId, String url, String userName, String password, String name, String description, NodeRef nodeRef)
|
||||
{
|
||||
this.implementationName = implementationName;
|
||||
this.blogId = blogId;
|
||||
this.url = url;
|
||||
this.userName = userName;
|
||||
this.password = password;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.nodeRef = nodeRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the node reference
|
||||
*
|
||||
* @return NodeRef the node reference
|
||||
*/
|
||||
public NodeRef getNodeRef()
|
||||
{
|
||||
return nodeRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the implementation name
|
||||
*
|
||||
* @return String the implementation name
|
||||
*/
|
||||
public String getImplementationName()
|
||||
{
|
||||
return this.implementationName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the blog id
|
||||
*
|
||||
* @return String the blog id
|
||||
*/
|
||||
public String getBlogId()
|
||||
{
|
||||
return this.blogId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the blog URL
|
||||
*
|
||||
* @return String the blog URL
|
||||
*/
|
||||
public String getUrl()
|
||||
{
|
||||
return this.url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user name
|
||||
*
|
||||
* @return String the user name
|
||||
*/
|
||||
public String getUserName()
|
||||
{
|
||||
return this.userName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the password
|
||||
*
|
||||
* @return String the password
|
||||
*/
|
||||
public String getPassword()
|
||||
{
|
||||
return this.password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name
|
||||
*
|
||||
* @return String the name
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the description
|
||||
*
|
||||
* @return String the description
|
||||
*/
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user