h1. Content Classification

h2. Overview

In a content management system, one of main benefits that it supports content classification framework (aka: content sorter)to allow automatically classifying your content(document, webcontent, video, audio...) into predefined location that you want and belong to some content's attributes like: author, type of content, datetime, name of content, etc.,

h2. Implementation
The implementation of this feature is in research and development. Here the some idea for that:
* Each type of classify is a component plugin.
* An classify service is created to manage the classify plugin.
* The classify plugin can be used by two ways: from configuration or as a DMS actions.

The NodeClassifyService look like following code snippet:

{code:language=java}
{@include org.exoplatform.services.jcr.ext.classify.NodeClassifyService}
{code}

The NodeClassifyPlugin look like following code snippet:

{code:language=java}
{@include org.exoplatform.services.jcr.ext.classify.NodeClassifyPlugin}
{code}

To configure the plugin:

{code}
<component>   
     <key>org.exoplatform.services.jcr.ext.classify.NodeClassifyService</key>
     <type>org.exoplatform.services.jcr.ext.classify.impl.NodeClassifyServiceImpl</type>
     <component-plugins>
	    <component-plugin>
	   		<name>AlphabetClassifyPlugin</name>
	   		<set-method>addClassifyPlugin</set-method>
	   		<type>org.exoplatform.services.jcr.ext.classify.impl.AlphabetClassifyPlugin</type>
	   	</component-plugin>	   		   	
	    <component-plugin>
	   		<name>DateTimeClassifyPlugin</name>
	   		<set-method>addClassifyPlugin</set-method>
	   		<type>org.exoplatform.services.jcr.ext.classify.impl.DateTimeClassifyPlugin</type>
	   		<init-params>
		        <properties-param>
		          <name>plugin-params</name>
		          <description>service-params</description>
		          <property name="DateTimeTemplate" value="YYYY-#{YYYY+4}/MM"/>
		          <property name="DateTimePropertyName" value=""/>		          
		          <property name="StartTime" value="2002-2"/>
		          <property name="EndTime" value="2020-9"/>
		        </properties-param>	   				   			
	   		</init-params>	   		
	   	</component-plugin>	  
	    <component-plugin>
	   		<name>TypeClassifyPlugin</name>
	   		<set-method>addClassifyPlugin</set-method>
	   		<type>org.exoplatform.services.jcr.ext.classify.impl.TypeClassifyPlugin</type>
	   	</component-plugin>	  	   		   	
   	 </component-plugins>   
   </component>
{code}

