Aspects

cancel
Showing results for 
Search instead for 
Did you mean: 
riadhazzouz
Active Member

Aspects

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

7 Replies
sercama
Active Member II

Re: Aspects

Hi Riadh Azzouz

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

riadhazzouz
Active Member

Re: Aspects

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.

sercama
Active Member II

Re: Aspects

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.

sanjaybandhniya
Intermediate

Re: Aspects

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

riadhazzouz
Active Member

Re: Aspects

Thanks

riadhazzouz
Active Member

Re: Aspects

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

sanjaybandhniya
Intermediate

Re: Aspects

Hi,

You can get aspect property in java using nodeService.

Ex. 

nodeService.hasAspect(nodeRef, model.aspect);

nodeService.getProperties(nodeRef);