本文整理汇总了Java中org.alfresco.service.cmr.dictionary.AssociationDefinition.isProtected方法的典型用法代码示例。如果您正苦于以下问题:Java AssociationDefinition.isProtected方法的具体用法?Java AssociationDefinition.isProtected怎么用?Java AssociationDefinition.isProtected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.dictionary.AssociationDefinition
的用法示例。
在下文中一共展示了AssociationDefinition.isProtected方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupAssociation
import org.alfresco.service.cmr.dictionary.AssociationDefinition; //导入方法依赖的package包/类
/**
* Sets up the association component i.e. setting the value binding
*
* @param context FacesContext
* @param propertySheet The property sheet
* @param item The parent component
* @param associationDef The association definition
* @param component The component representing the association
*/
@SuppressWarnings("unchecked")
protected void setupAssociation(FacesContext context, UIPropertySheet propertySheet,
PropertySheetItem item, AssociationDefinition associationDef, UIComponent component)
{
// create and set the value binding
ValueBinding vb = context.getApplication().createValueBinding(
"#{" + propertySheet.getVar() + "}");
component.setValueBinding("value", vb);
// set the association name and set to disabled if appropriate
((BaseAssociationEditor)component).setAssociationName(
associationDef.getName().toString());
// disable the component if it is read only or protected
// or if the property sheet is in view mode
if (propertySheet.inEditMode() == false || item.isReadOnly() ||
(associationDef != null && associationDef.isProtected()))
{
component.getAttributes().put("disabled", Boolean.TRUE);
}
}
示例2: handleAssociation
import org.alfresco.service.cmr.dictionary.AssociationDefinition; //导入方法依赖的package包/类
/**
* @param value Serializable
* @param assocDef AssociationDefinition
*/
protected Object handleAssociation(Serializable value, AssociationDefinition assocDef)
{
if (assocDef.isProtected())
{
return DO_NOT_ADD;
}
// Convert association to ActivitiScriptNode / List
return convertAssociationValue(assocDef, value);
}