mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Initial tidy up of existing data dictionary REST API implementation.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18512 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
<webscript>
|
|
||||||
<shortname>Get Child Association Definitions</shortname>
|
|
||||||
<description>Get the collection of child association definitions</description>
|
|
||||||
<url>/api/classes/{classname}/childassociation/{assocname}</url>
|
|
||||||
<format default="json">argument</format>
|
|
||||||
<authentication>user</authentication>
|
|
||||||
<transaction allow="readonly">required</transaction>
|
|
||||||
</webscript>
|
|
@@ -1,3 +0,0 @@
|
|||||||
<#import "assocdefinition.lib.ftl" as assocDefLib/>
|
|
||||||
|
|
||||||
<@assocDefLib.assocDefJSON assocdefs=assocdefs/>
|
|
@@ -1,8 +0,0 @@
|
|||||||
<webscript>
|
|
||||||
<shortname>Get Child Assocation Definitions</shortname>
|
|
||||||
<description>Get the collection of child association definitions for a given classname</description>
|
|
||||||
<url>/api/classes/{classname}/childassociations</url>
|
|
||||||
<format default="json">argument</format>
|
|
||||||
<authentication>user</authentication>
|
|
||||||
<transaction>required</transaction>
|
|
||||||
</webscript>
|
|
@@ -1,9 +0,0 @@
|
|||||||
<#import "assocdefinition.lib.ftl" as assocDefLib/>
|
|
||||||
[
|
|
||||||
<#list assocdefs as assocdefs>
|
|
||||||
<#if assocdefs.isChild() == true>
|
|
||||||
<@assocDefLib.assocDefJSON assocdefs=assocdefs/>
|
|
||||||
<#if assocdefs_has_next>,</#if>
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
]
|
|
@@ -544,47 +544,18 @@
|
|||||||
<!-- DICTIONARY Service REST API -->
|
<!-- DICTIONARY Service REST API -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
|
||||||
<!-- GET CLASS DETAILS -->
|
<bean id="webscript.dictionary" abstract="true" parent="webscript">
|
||||||
<bean id="webscript.org.alfresco.repository.dictionary.getclassdetails.get" class="org.alfresco.repo.web.scripts.dictionary.GetClassDetails" parent="webscript">
|
|
||||||
<property name="dictionaryService" ref="DictionaryService"/>
|
<property name="dictionaryService" ref="DictionaryService"/>
|
||||||
<property name="dictionaryHelper" ref="dictionaryWebScriptHelper"/>
|
<property name="dictionaryHelper" ref="dictionaryWebScriptHelper"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- GET CLASS DETAIL -->
|
<bean id="webscript.org.alfresco.repository.dictionary.classes.get" class="org.alfresco.repo.web.scripts.dictionary.ClassesGet" parent="webscript.dictionary"/>
|
||||||
<bean id="webscript.org.alfresco.repository.dictionary.getclassdetail.get" class="org.alfresco.repo.web.scripts.dictionary.GetClassDetail" parent="webscript">
|
<bean id="webscript.org.alfresco.repository.dictionary.class.get" class="org.alfresco.repo.web.scripts.dictionary.ClassGet" parent="webscript.dictionary"/>
|
||||||
<property name="dictionaryService" ref="DictionaryService"/>
|
<bean id="webscript.org.alfresco.repository.dictionary.subclasses.get" class="org.alfresco.repo.web.scripts.dictionary.SubClassesGet" parent="webscript.dictionary"/>
|
||||||
<property name="dictionaryHelper" ref="dictionaryWebScriptHelper"/>
|
<bean id="webscript.org.alfresco.repository.dictionary.property.get" class="org.alfresco.repo.web.scripts.dictionary.PropertyGet" parent="webscript.dictionary"/>
|
||||||
</bean>
|
<bean id="webscript.org.alfresco.repository.dictionary.properties.get" class="org.alfresco.repo.web.scripts.dictionary.PropertiesGet" parent="webscript.dictionary"/>
|
||||||
|
<bean id="webscript.org.alfresco.repository.dictionary.association.get" class="org.alfresco.repo.web.scripts.dictionary.AssociationGet" parent="webscript.dictionary"/>
|
||||||
<!-- GET SUBCLASSES DEFINITION's -->
|
<bean id="webscript.org.alfresco.repository.dictionary.associations.get" class="org.alfresco.repo.web.scripts.dictionary.AssociationsGet" parent="webscript.dictionary"/>
|
||||||
<bean id="webscript.org.alfresco.repository.dictionary.getsubclassesdef.get" class="org.alfresco.repo.web.scripts.dictionary.GetSubClassesDef" parent="webscript">
|
|
||||||
<property name="dictionaryService" ref="DictionaryService"/>
|
|
||||||
<property name="dictionaryHelper" ref="dictionaryWebScriptHelper"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- GET PROPERTY DEFINITION -->
|
|
||||||
<bean id="webscript.org.alfresco.repository.dictionary.getproperty.get" class="org.alfresco.repo.web.scripts.dictionary.GetPropertyDef" parent="webscript">
|
|
||||||
<property name="dictionaryService" ref="DictionaryService"/>
|
|
||||||
<property name="dictionaryHelper" ref="dictionaryWebScriptHelper"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- GET PROPERTY DEFINITION's -->
|
|
||||||
<bean id="webscript.org.alfresco.repository.dictionary.getproperties.get" class="org.alfresco.repo.web.scripts.dictionary.GetPropertyDefs" parent="webscript">
|
|
||||||
<property name="dictionaryService" ref="DictionaryService"/>
|
|
||||||
<property name="dictionaryHelper" ref="dictionaryWebScriptHelper"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- GET ASSOCIATION DEFINITION -->
|
|
||||||
<bean id="webscript.org.alfresco.repository.dictionary.getassociationdef.get" class="org.alfresco.repo.web.scripts.dictionary.GetAssociationDef" parent="webscript">
|
|
||||||
<property name="dictionaryService" ref="DictionaryService"/>
|
|
||||||
<property name="dictionaryHelper" ref="dictionaryWebScriptHelper"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- GET ASSOCIATION DEFINITION's -->
|
|
||||||
<bean id="webscript.org.alfresco.repository.dictionary.getassociationdefs.get" class="org.alfresco.repo.web.scripts.dictionary.GetAssociationDefs" parent="webscript">
|
|
||||||
<property name="dictionaryService" ref="DictionaryService"/>
|
|
||||||
<property name="dictionaryHelper" ref="dictionaryWebScriptHelper"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Dictionary Service Web Script Helper Class -->
|
<!-- Dictionary Service Web Script Helper Class -->
|
||||||
<bean id="dictionaryWebScriptHelper" class="org.alfresco.repo.web.scripts.dictionary.DictionaryHelper" init-method="init">
|
<bean id="dictionaryWebScriptHelper" class="org.alfresco.repo.web.scripts.dictionary.DictionaryHelper" init-method="init">
|
||||||
|
@@ -40,7 +40,7 @@ import java.util.Map;
|
|||||||
* @author Saravanan Sellathurai
|
* @author Saravanan Sellathurai
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetAssociationDef extends DeclarativeWebScript
|
public class AssociationGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
private DictionaryService dictionaryservice;
|
private DictionaryService dictionaryservice;
|
||||||
private DictionaryHelper dictionaryhelper;
|
private DictionaryHelper dictionaryhelper;
|
@@ -41,7 +41,7 @@ import java.util.Map;
|
|||||||
* @author Saravanan Sellathurai
|
* @author Saravanan Sellathurai
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetAssociationDefs extends DeclarativeWebScript
|
public class AssociationsGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
private DictionaryService dictionaryservice;
|
private DictionaryService dictionaryservice;
|
||||||
private DictionaryHelper dictionaryhelper;
|
private DictionaryHelper dictionaryhelper;
|
@@ -43,7 +43,7 @@ import java.util.Map;
|
|||||||
* @author Saravanan Sellathurai
|
* @author Saravanan Sellathurai
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetClassDetails extends DeclarativeWebScript
|
public class ClassGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
|
|
||||||
private DictionaryService dictionaryservice;
|
private DictionaryService dictionaryservice;
|
@@ -45,7 +45,7 @@ import java.util.List;
|
|||||||
* @author Saravanan Sellathurai
|
* @author Saravanan Sellathurai
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetClassDetail extends DeclarativeWebScript
|
public class ClassesGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
private DictionaryService dictionaryservice;
|
private DictionaryService dictionaryservice;
|
||||||
private DictionaryHelper dictionaryhelper;
|
private DictionaryHelper dictionaryhelper;
|
@@ -34,11 +34,11 @@ import org.json.JSONObject;
|
|||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit Test for Dictionaryervice REST API
|
* Unit test for Dictionary REST API
|
||||||
* @author Saravanan Sellathurai
|
* @author Saravanan Sellathurai
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class DictionaryServiceTest extends BaseWebScriptTest
|
public class DictionaryRestApiTest extends BaseWebScriptTest
|
||||||
{
|
{
|
||||||
private static final String URL_SITES = "/api/classes";
|
private static final String URL_SITES = "/api/classes";
|
||||||
|
|
@@ -42,7 +42,7 @@ import java.util.Map;
|
|||||||
* @author Saravanan Sellathurai
|
* @author Saravanan Sellathurai
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetPropertyDefs extends DeclarativeWebScript
|
public class PropertiesGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
private DictionaryService dictionaryservice;
|
private DictionaryService dictionaryservice;
|
||||||
private DictionaryHelper dictionaryhelper;
|
private DictionaryHelper dictionaryhelper;
|
@@ -41,7 +41,7 @@ import java.util.Map;
|
|||||||
* @author Saravanan Sellathurai
|
* @author Saravanan Sellathurai
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetPropertyDef extends DeclarativeWebScript
|
public class PropertyGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
private DictionaryService dictionaryservice;
|
private DictionaryService dictionaryservice;
|
||||||
private DictionaryHelper dictionaryhelper;
|
private DictionaryHelper dictionaryhelper;
|
@@ -39,12 +39,12 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Webscript to get the Sub-Classdefinitions using classfilter , namespacePrefix and name
|
* Webscript to get the Sub-Classdefinitions using classfilter , namespacePrefix and name
|
||||||
|
*
|
||||||
* @author Saravanan Sellathurai
|
* @author Saravanan Sellathurai
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GetSubClassesDef extends DeclarativeWebScript
|
public class SubClassesGet extends DeclarativeWebScript
|
||||||
{
|
{
|
||||||
private DictionaryService dictionaryservice;
|
private DictionaryService dictionaryservice;
|
||||||
private DictionaryHelper dictionaryhelper;
|
private DictionaryHelper dictionaryhelper;
|
Reference in New Issue
Block a user