Alfresco System Properties - Override

cancel
Showing results for 
Search instead for 
Did you mean: 
MJay
Customer

Alfresco System Properties - Override

Hi,

Could anyone advise if it is possible to custom define/override the system-audit attributes while inserting a new document/content into Alfresco using REST-API POST request end-point - e.g.: cm:created, cm:modified ??

 

Thanks,

 

1 Reply
abhinavmishra14
Advanced

Re: Alfresco System Properties - Override

As far as i know, you can not override the default auditable properties such as creator, created, modifier, modified etc by any means. These properties are protected and mandatory by design.

See the auditable aspect which is defined in default content model:

<aspect name="cm:auditable">
	<title>Auditable</title>
	<properties>
		<property name="cm:created">
			<title>Created</title>
			<type>d:datetime</type>
			<protected>true</protected>
			<mandatory enforced="true">true</mandatory>
			<index enabled="true">
				<atomic>true</atomic>
				<stored>false</stored> 
				<tokenised>both</tokenised>
				<facetable>true</facetable>
			</index>
		</property>
		<property name="cm:creator">
			<title>Creator</title>
			<type>d:text</type>
			<protected>true</protected>
			<mandatory enforced="true">true</mandatory>
			<index enabled="true">
				<atomic>true</atomic>
				<stored>false</stored> 
				<tokenised>true</tokenised>
				<facetable>true</facetable>
			</index>
		</property>
		<property name="cm:modified">
			<title>Modified</title>
			<type>d:datetime</type>
			<protected>true</protected>
			<mandatory enforced="true">true</mandatory>
			<index enabled="true">
				<atomic>true</atomic>
				<stored>false</stored> 
				<tokenised>both</tokenised>
				<facetable>true</facetable>
			</index>
		</property>
		<property name="cm:modifier">
			<title>Modifier</title>
			<type>d:text</type>
			<protected>true</protected>
			<mandatory enforced="true">true</mandatory>
			<index enabled="true">
				<atomic>true</atomic>
				<stored>false</stored> 
				<tokenised>true</tokenised>
				<facetable>true</facetable>
			</index>
		</property>
		<property name="cm:accessed">
			<title>Accessed</title>
			<type>d:datetime</type>
			<protected>true</protected>
			<index enabled="true">
				<atomic>true</atomic>
				<stored>false</stored> 
				<tokenised>both</tokenised>
			</index>
		</property>
	</properties>
</aspect>

However, if you have a very specific requirement then, you can create custom properties (to map created, modified info) in your custom content model and set the values as needed. 

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)