<type name="x:a">
<title>A</title>
<parent>cm:content</parent>
<properties>
<property name="x:campo1">
<title>campo 1</title>
<description>Descripción campo 1</description>
<type>d:text</type>
<mandatory>false</mandatory>
<default></default>
</property>
</properties>
</type>
<type name="x:b">
<title>B</title>
<parent>cm:content</parent>
<properties>
<property name="x:campo2">
<title>campo 2</title>
<description>Descripción campo 2</description>
<type>d:text</type>
<mandatory>false</mandatory>
<default></default>
</property>
</properties>
<associations>
<child-association name="x:asocA">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>x:a</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
</child-association>
</associations>
</type>
nodoB.createAssociation(nodoA, "x:asocA"); //Crea asociación entre el nodo B y el nodo A
<config evaluator="node-type" condition="x:b">
<property-sheet>
<show-property name="x:campo2" display-label="Campo 2" />
<show-child-association name="x:asocA" display-label="Asociacion A"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="x:b">
<property-sheet>
<show-property name="x:campo2" display-label="Campo 2" />
<show-association name="x:asocA" display-label="Asociacion A"/>
</property-sheet>
</config>
private NodeService nodeService;
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ …Código que se ejecutará cuando definas la regla…}
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
// none required
}
public NodeService getNodeService(){
return nodeService;
}
<bean id="miClase" class="alfresco.org.custom.executer.MiClaseExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" /> <!– runtime nodeService –>
</property>
</bean>
miClase.title=Crear una asociación padre-hijo
miClase.description=Acción que crea una asociación padre e hijo
java.lang.Object
extended by org.alfresco.service.cmr.repository.ChildAssociationRef
ChildAssociationRef
public ChildAssociationRef(QName assocTypeQName,
NodeRef parentRef,
QName childQName,
NodeRef childRef,
boolean isPrimary,
int nthSibling)
Construct a representation of a parent — name —-> child relationship.
Parameters:
assocTypeQName - the type of the association
parentRef - the parent reference - may be null
childQName - the qualified name of the association - may be null
childRef - the child node reference. This must not be null.
isPrimary - true if this represents the primary parent-child relationship
nthSibling - the nth association with the same properties. Usually -1 to be ignored
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.