本文整理匯總了Java中org.alfresco.service.namespace.QName.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java QName.equals方法的具體用法?Java QName.equals怎麽用?Java QName.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.alfresco.service.namespace.QName
的用法示例。
在下文中一共展示了QName.equals方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getAssociations
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
* Get associations
*
* @param classRef QName
*/
public List<AssociationRef> getAssociations(QName classRef)
{
List<AssociationRef> result = null;
if (classRef.equals(this.classRef) == true)
{
result = getAssociations();
}
else
{
AspectDetails aspectDetails = this.aspectCopyDetails.get(classRef);
if (aspectDetails != null)
{
result = aspectDetails.getAssociations();
}
}
return result;
}
示例2: addCustomAspects
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
public void addCustomAspects(NodeRef nodeRef, List<String> aspectNames, List<QName> excludedAspects)
{
if (aspectNames == null)
{
return;
}
// node aspects - set any additional aspects
Set<QName> aspectQNames = mapToNodeAspects(aspectNames);
for (QName aspectQName : aspectQNames)
{
if (excludedAspects.contains(aspectQName) || aspectQName.equals(ContentModel.ASPECT_AUDITABLE))
{
continue; // ignore
}
nodeService.addAspect(nodeRef, aspectQName, null);
}
}
示例3: getCopyProperties
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
* Don't copy certain auditable p
*/
@Override
public Map<QName, Serializable> getCopyProperties(
QName classQName, CopyDetails copyDetails, Map<QName, Serializable> properties)
{
if(classQName.equals(ContentModel.ASPECT_OWNABLE))
{
// The owner should become the user doing the copying
if(properties.containsKey(ContentModel.PROP_OWNER))
{
properties.put(ContentModel.PROP_OWNER, AuthenticationUtil.getFullyAuthenticatedUser());
}
}
else if(classQName.equals(ContentModel.ASPECT_AUDITABLE))
{
// Have the key properties reset by the aspect
properties.remove(ContentModel.PROP_CREATED);
properties.remove(ContentModel.PROP_CREATOR);
properties.remove(ContentModel.PROP_MODIFIED);
properties.remove(ContentModel.PROP_MODIFIER);
}
return properties;
}
示例4: isValidCmisRelationshipEndPoint
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
public boolean isValidCmisRelationshipEndPoint(QName typeQName)
{
if(dictionaryService.getClass(typeQName).isAspect())
{
return true;
}
if (typeQName.equals(FOLDER_QNAME))
{
return true;
}
if (typeQName.equals(DOCUMENT_QNAME))
{
return true;
}
if (dictionaryService.isSubClass(typeQName, ContentModel.TYPE_BASE))
{
return true;
}
return false;
}
示例5: isChildAssociationRefAlwaysTraversed
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
public boolean isChildAssociationRefAlwaysTraversed(QName classRef, ChildAssociationRef childAssocRef)
{
boolean result = false;
if (classRef.equals(this.classRef) == true)
{
result = isChildAssociationRefAlwaysTraversed(childAssocRef);
}
else
{
AspectDetails aspectDetails = this.aspectCopyDetails.get(classRef);
if (aspectDetails != null)
{
result = aspectDetails.isChildAssociationRefAlwaysTraversed(childAssocRef);
}
}
return result;
}
示例6: executeImpl
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
* @see org.alfresco.repo.action.executer.ActionExecuter#execute(Action, NodeRef)
*/
public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef)
{
if (this.nodeService.exists(actionedUponNodeRef) == true)
{
// Get the type of the node
QName currentType = this.nodeService.getType(actionedUponNodeRef);
QName destinationType = (QName)ruleAction.getParameterValue(PARAM_TYPE_NAME);
// Ensure that we are performing a specialise
if (currentType.equals(destinationType) == false &&
this.dictionaryService.isSubClass(destinationType, currentType) == true)
{
// Specialise the type of the node
this.nodeService.setType(actionedUponNodeRef, destinationType);
}
}
}
示例7: getLocalizedProperty
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
public static Serializable getLocalizedProperty(LocaleDAO localeDAO, Node node, QName qname)
{
if (qname.equals(ContentModel.PROP_LOCALE))
{
Long localeId = node.getLocaleId();
return localeDAO.getLocalePair(localeId).getSecond();
}
throw new IllegalArgumentException("Not sys:localized property: " + qname);
}
示例8: onRemoveAspect
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
public void onRemoveAspect(NodeRef nodeRef, QName aspect)
{
if (logger.isTraceEnabled())
{
logger.trace("onRemoveAspect: nodeRef="+nodeRef+ " ["+AlfrescoTransactionSupport.getTransactionId()+"]");
}
// undo/cancel checkout removes the "workingcopy" aspect prior to deleting the node - hence need to track here
if (aspect.equals(ContentModel.ASPECT_WORKING_COPY))
{
AlfrescoTransactionSupport.bindResource(KEY_WORKING_COPY, nodeRef);
}
}
示例9: deletePerson
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
public void deletePerson(NodeRef personRef)
{
QName typeQName = nodeService.getType(personRef);
if (typeQName.equals(ContentModel.TYPE_PERSON))
{
String userName = (String) this.nodeService.getProperty(personRef, ContentModel.PROP_USERNAME);
deletePersonAndAuthenticationImpl(userName, personRef);
}
else
{
throw new AlfrescoRuntimeException("deletePerson: invalid type of node "+personRef+" (actual="+typeQName+", expected="+ContentModel.TYPE_PERSON+")");
}
}
示例10: setProperty
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
* Gets the properties map, sets the value (null is allowed) and checks that the new set
* of properties is valid.
*
*/
@Extend(traitAPI=NodeServiceTrait.class,extensionAPI=NodeServiceExtension.class)
public void setProperty(NodeRef nodeRef, QName qname, Serializable value) throws InvalidNodeRefException
{
ParameterCheck.mandatory("nodeRef", nodeRef);
ParameterCheck.mandatory("qname", qname);
// The UUID cannot be explicitly changed
if (qname.equals(ContentModel.PROP_NODE_UUID))
{
throw new IllegalArgumentException("The node UUID cannot be changed.");
}
// get the node
Pair<Long, NodeRef> nodePair = getNodePairNotNull(nodeRef);
// Invoke policy behaviour
invokeBeforeUpdateNode(nodeRef);
// cm:name special handling
setPropertiesCommonWork(
nodePair,
Collections.singletonMap(qname, value));
// Add the property and all required defaults
boolean changed = addAspectsAndProperties(
nodePair, null,
null, null,
null, Collections.singletonMap(qname, value), false);
if (changed)
{
// Invoke policy behaviour
invokeOnUpdateNode(nodeRef);
// Index
nodeIndexer.indexUpdateNode(nodeRef);
}
}
示例11: getTranslations
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/** {@inheritDoc} */
public Map<Locale, NodeRef> getTranslations(NodeRef translationOfNodeRef)
{
NodeRef mlContainerNodeRef = null;
// Were we given the translation or the container
QName typeQName = nodeService.getType(translationOfNodeRef);
if (typeQName.equals(ContentModel.TYPE_MULTILINGUAL_CONTAINER))
{
// We have the container
mlContainerNodeRef = translationOfNodeRef;
}
else
{
// Get the container
mlContainerNodeRef = getOrCreateMLContainer(translationOfNodeRef, false);
}
// Get all the children
List<ChildAssociationRef> assocRefs = nodeService.getChildAssocs(
mlContainerNodeRef,
ContentModel.ASSOC_MULTILINGUAL_CHILD,
RegexQNamePattern.MATCH_ALL);
// Iterate over them and build the map
Map<Locale, NodeRef> nodeRefsByLocale = new HashMap<Locale, NodeRef>(13);
for (ChildAssociationRef assocRef : assocRefs)
{
NodeRef nodeRef = assocRef.getChildRef();
// Get the locale
Locale locale = (Locale) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE);
// Map it
nodeRefsByLocale.put(locale, nodeRef);
}
// Done
if (logger.isDebugEnabled())
{
logger.debug("Found all translations: \n" +
" Node: " + translationOfNodeRef + " (type " + typeQName + ")\n" +
" Map: " + nodeRefsByLocale);
}
return nodeRefsByLocale;
}
示例12: getMustCopy
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
* Don't copy the transferred aspect.
*
* @return Returns <tt>true</tt> always
*/
@Override
public boolean getMustCopy(QName classQName, CopyDetails copyDetails)
{
if(classQName.equals(TransferModel.ASPECT_TRANSFERRED))
{
return false;
}
else
{
return true;
}
}
示例13: deleteComment
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
public void deleteComment(NodeRef commentNodeRef)
{
QName nodeType = nodeService.getType(commentNodeRef);
if(!nodeType.equals(ForumModel.TYPE_POST))
{
throw new IllegalArgumentException("Node to delete is not a comment node.");
}
// determine the siteId and activity data of the comment NodeRef (do this before removing the comment NodeRef)
String siteId = getSiteId(commentNodeRef);
NodeRef discussableNodeRef = getDiscussableAncestor(commentNodeRef);
JSONObject activityData = null;
if(discussableNodeRef != null)
{
activityData = getActivityData(siteId, discussableNodeRef);
}
nodeService.deleteNode(commentNodeRef);
if(activityData != null)
{
postActivity(siteId, "org.alfresco.comments.comment-deleted", activityData);
}
else
{
logger.warn("Unable to determine discussable node for the comment with nodeRef " + commentNodeRef + ", not posting an activity");
}
}
示例14: isValidCmisSecondaryType
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
* Is this a valid CMIS secondary type?
*
* @param typeQName QName
* @return boolean
*/
public boolean isValidCmisSecondaryType(QName typeQName)
{
if(isExcluded(typeQName))
{
return false;
}
if (typeQName == null)
{
return false;
}
if (typeQName.equals(SECONDARY_TYPES_QNAME))
{
return true;
}
AspectDefinition aspectDef = dictionaryService.getAspect(typeQName);
if (aspectDef == null)
{
return false;
}
// Anything derived from the aspects here would at some point have to linked up with an invalid parent so exclude these aspects
// AND any that are derived from them.
if ( dictionaryService.isSubClass(aspectDef.getName(), ContentModel.ASPECT_VERSIONABLE)
|| dictionaryService.isSubClass(aspectDef.getName(), ContentModel.ASPECT_AUDITABLE)
|| dictionaryService.isSubClass(aspectDef.getName(), ContentModel.ASPECT_REFERENCEABLE))
{
return false;
}
return true;
}
示例15: isValidCmisDocument
import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
* Is this a valid CMIS document type?
*
* @param typeQName QName
* @return boolean
*/
public boolean isValidCmisDocument(QName typeQName)
{
if(isExcluded(typeQName))
{
return false;
}
if (typeQName == null)
{
return false;
}
if (typeQName.equals(DOCUMENT_QNAME))
{
return true;
}
if (dictionaryService.isSubClass(typeQName, ContentModel.TYPE_CONTENT))
{
if (typeQName.equals(ContentModel.TYPE_CONTENT))
{
return false;
} else
{
return true;
}
}
return false;
}