Yes i need the script,
actually what i did is:
tomcat\webapps\alfresco\WEB-INF\classes\alfresco\model\contentmodel.xml
<type name=”cm:cmobject”>
<title>Object</title>
<parent>sys:base</parent>
<properties>
<property name=”cm:name”>
<title>Name</title>
<type>d:text</type>
<mandatory enforced=”true”>true</mandatory>
<constraints>
<constraint ref=”cm:filename” />
</constraints>
</property>
<!–temporary added properties to go around auditable –>
<property name=”cm:created”>
<title>Created</title>
<type>d:datetime</type>
</property>
<property name=”cm:creator”>
<title>Creator</title>
<type>d:text</type>
</property>
<property name=”cm:modified”>
<title>Modified</title>
<type>d:datetime</type>
</property>
<property name=”cm:modifier”>
<title>Modifier</title>
<type>d:text</type>
</property>
<property name=”cm:accessed”>
<title>Accessed</title>
<type>d:datetime</type>
</property>
</properties>
<!—- Disable Auditable Aspect
<mandatory-aspects>
<aspect>cm:auditable</aspect>
</mandatory-aspects>
–>
</type>
Additionally, for convenience, it’s a good idea to not make these protected, or enforce them as being mandatory, as they are on the original Auditable aspect. As you can see, we commented out cm:auditable as mandatory aspect on this type, which means the code that sets these properties automatically will not get triggered.
Step 2 – Show Properties in the User Interface
The next step is cosmetic – we need to make these properties visible in our UI so it’s easier to test. For that, you will need to edit CONFIGROOT\ web-client-config-properties.xml. Add the auditable properties to “content” evaluator:
<config evaluator=”node-type” condition=”content”>
<property-sheet>
<show-property name=”creator” />
<show-property name=”created” />
<show-property name=”modifier” />
<show-property name=”modified” />
This will allow you to see these in the UI.
Step 3 – Set Properties, Migrate Content, Perform Bulk Load, etc.
After a server restart, you have now disabled the automatic setting of properties. You can either set them programmatically (and your changes will no longer get intercepted), or manually through the UI.
Edit Auditable properties
Note: This is an all or nothing operation – you can’t have it automatically set some properties but not others (to do it you’d have to do metadata extraction or some kind of event handler). This is why this is usually a temporary step as you are loading or migrating content.
After you are done with the content load, the next step is re-enable original model to ensure consistency. You also have a bunch of nodes that don’t have Auditable Aspect applied, so we need to reapply it.
Step 4 – Apply Auditable Aspect to Migrated Content
First, you need to revert to the original content model. To apply auditable aspect to many nodes, you typically write a JavaScript script that walks through the nodes and adds Auditable Aspect.
For applying Auditable aspect manually, you’ll have to add some code to CONFIGROOT\web-client-config.xml so it shows u in Add Aspect action.
config evaluator=”string-compare” condition=”Action Wizards”>
…
<!– and the has-aspect condition –>
<aspects>
<aspect name=”generalclassifiable”/>
<aspect name=”complianceable”/>
<aspect name=”dublincore”/>
<aspect name=”auditable”/>
<aspect name=”effectivity”/>
<aspect name=”summarizable”/>
<aspect name=”versionable”/>
<aspect name=”templatable”/>
<aspect name=”emailed”/>
<aspect name=”emailserver:aliasable”/>
<aspect name=”taggable”/>
</aspects>
i got successfully the view page of creator,modifier,created date etc but when am trying to change the date its taking the current date,i need to change the date to old ones
Thanks in advance,
Rajshekar