cancel
Showing results for 
Search instead for 
Did you mean: 

Aspects

riadhazzouz
Confirmed Champ
Confirmed Champ

Is it possible to create aspects without creating a custom content model ?

7 REPLIES 7

sercama
Confirmed Champ
Confirmed Champ

Hi Riadh Azzouz

You need to create your model where you must define your custom aspects, types, constraints,...

Hi
What I mean is, do I need to create the tag <types> and put under it a custom content ?
Or I can create aspects without creating a <type>. ?
Thanks.

Types and aspects are diferents elements in Alfresco world. If you want to create custom aspects, in you custom model you will have to declare you custom aspect into <aspects></aspects> tags. It isn’t necessary to create any <type> tag for creating aspects.

Thanks

sanjaybandhaniya
Elite Collaborator
Elite Collaborator

Hi,

You can directly create aspect without type.

Aspect and Type both are different thing.

Managing custom types, aspects, and properties | Alfresco Documentation 

You can create aspect and type 2 ways.

1)Using model manager - Content modeling with Model Manager | Alfresco Documentation 

2)Create xxx.xml file - Content Model Tutorials | Alfresco Documentation 

Thanks,

Sanjay

Hi,
Are there any examples about how to access these aspects in java ?
Thanks.

Hi,

You can get aspect property in java using nodeService.

Ex. 

nodeService.hasAspect(nodeRef, model.aspect);

nodeService.getProperties(nodeRef);