本文整理匯總了Java中org.alfresco.service.cmr.repository.NodeService.hasAspect方法的典型用法代碼示例。如果您正苦於以下問題:Java NodeService.hasAspect方法的具體用法?Java NodeService.hasAspect怎麽用?Java NodeService.hasAspect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.alfresco.service.cmr.repository.NodeService
的用法示例。
在下文中一共展示了NodeService.hasAspect方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setPersistedHeaders
import org.alfresco.service.cmr.repository.NodeService; //導入方法依賴的package包/類
private void setPersistedHeaders() throws MessagingException
{
NodeService nodeService = serviceRegistry.getNodeService();
if (nodeService.hasAspect(messageFileInfo.getNodeRef(), ImapModel.ASPECT_IMAP_MESSAGE_HEADERS))
{
@SuppressWarnings("unchecked")
List<String> messageHeaders = (List<String>)nodeService.getProperty(messageFileInfo.getNodeRef(), ImapModel.PROP_MESSAGE_HEADERS);
if (messageHeaders == null)
{
return;
}
for (String header : messageHeaders)
{
String headerValue = header.substring(header.indexOf(ImapModel.MESSAGE_HEADER_TO_PERSIST_SPLITTER) + 1);
String headerName = header.substring(0, header.indexOf(ImapModel.MESSAGE_HEADER_TO_PERSIST_SPLITTER));
setHeader(headerName, headerValue);
}
}
}
示例2: createBlogDetails
import org.alfresco.service.cmr.repository.NodeService; //導入方法依賴的package包/類
/**
* 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);
}
示例3: isMSOfficeSpecialFile
import org.alfresco.service.cmr.repository.NodeService; //導入方法依賴的package包/類
/**
* Check if the file is an MS Office document type that needs special processing
*
* @param path String
* @param sess SrvSession
* @param nodeService NodeService
* @param nodeRef NodeRef
* @return boolean
*/
private static final boolean isMSOfficeSpecialFile( String path, SrvSession sess, NodeService nodeService, NodeRef nodeRef) {
// Check if the file extension indicates a problem MS Office format
path = path.toLowerCase();
if ( path.endsWith( ".xls") && sess instanceof SMBSrvSession) {
// Check if the file is versionable
if ( nodeService.hasAspect( nodeRef, ContentModel.ASPECT_VERSIONABLE))
return true;
}
return false;
}
示例4: isOpenOfficeSpecialFile
import org.alfresco.service.cmr.repository.NodeService; //導入方法依賴的package包/類
/**
* Check if the file is an OpenOffice document type that needs special processing
*
* @param path String
* @param sess SrvSession
* @param nodeService NodeService
* @param nodeRef NodeRef
* @return boolean
*/
private static final boolean isOpenOfficeSpecialFile( String path, SrvSession sess, NodeService nodeService, NodeRef nodeRef) {
// Check if the file extension indicates a problem OpenOffice format
path = path.toLowerCase();
if ( path.endsWith( ".odt") && sess instanceof SMBSrvSession) {
// Check if the file is versionable
if ( nodeService.hasAspect( nodeRef, ContentModel.ASPECT_VERSIONABLE))
return true;
}
return false;
}