[New] Implemented an EnumHandler and RESTful endpoint
This commit is contained in:
parent
5242424db7
commit
aac3f9e13f
|
@ -33,6 +33,7 @@ public class RestfulApplication extends Application {
|
|||
public Set<Class<?>> getClasses() {
|
||||
Set<Class<?>> classes = new HashSet<>();
|
||||
classes.addAll(StrolchRestfulClasses.getRestfulClasses());
|
||||
classes.addAll(StrolchRestfulClasses.getProviderClasses());
|
||||
return classes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,4 +42,33 @@
|
|||
<verbose>true</verbose>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component>
|
||||
<name>EnumHandler</name>
|
||||
<api>li.strolch.runtime.query.enums.EnumHandler</api>
|
||||
<impl>li.strolch.runtime.query.enums.DefaultEnumHandler</impl>
|
||||
<depends>ElementMapHandler</depends>
|
||||
<Properties>
|
||||
<realm>defaultRealm</realm>
|
||||
<salutations>Resource/Enumeration/salutations</salutations>
|
||||
<sex>Resource/Enumeration/sex</sex>
|
||||
<religions>Resource/Enumeration/religions</religions>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component>
|
||||
<name>RestfulHandler</name>
|
||||
<api>li.strolch.rest.RestfulStrolchComponent</api>
|
||||
<impl>li.strolch.rest.RestfulStrolchComponent</impl>
|
||||
<depends>SessionHandler</depends>
|
||||
<Properties>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component>
|
||||
<name>SessionHandler</name>
|
||||
<api>li.strolch.rest.StrolchSessionHandler</api>
|
||||
<impl>li.strolch.rest.DefaultStrolchSessionHandler</impl>
|
||||
<depends>PrivilegeHandler</depends>
|
||||
<Properties>
|
||||
<rememberUser>true</rememberUser>
|
||||
</Properties>
|
||||
</Component>
|
||||
</StrolchConfiguration>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<StrolchModel>
|
||||
|
||||
<Resource Id="salutations" Name="Salutations" Type="Enumeration">
|
||||
<ParameterBag Id="en" Name="Salutations" Type="Enumeration">
|
||||
<Parameter Id="mr" name="Mr" Type="String" Value="Mr" />
|
||||
<Parameter Id="mrs" name="Mrs" Type="String" Value="Mrs" />
|
||||
<Parameter Id="ms" name="Ms" Type="String" Value="Ms" />
|
||||
</ParameterBag>
|
||||
</Resource>
|
||||
|
||||
<Resource Id="sex" Name="Sex" Type="Enumeration">
|
||||
<ParameterBag Id="en" Name="Sex" Type="Enumeration">
|
||||
<Parameter Id="male" name="Male" Type="String" Value="male" />
|
||||
<Parameter Id="female" name="Female" Type="String" Value="female" />
|
||||
<Parameter Id="both" name="Both" Type="String" Value="both" />
|
||||
</ParameterBag>
|
||||
</Resource>
|
||||
|
||||
<Resource Id="religions" Name="Religions" Type="Enumeration">
|
||||
<ParameterBag Id="en" Name="Religions" Type="Enumeration">
|
||||
<Parameter Id="Roman Catholic" name="Roman Catholic" Type="String" Value="Roman Catholic" />
|
||||
<Parameter Id="Protestant" name="Protestant" Type="String" Value="Protestant" />
|
||||
<Parameter Id="Orthodox" name="Orthodox" Type="String" Value="Orthodox" />
|
||||
<Parameter Id="Christian" name="Anglican" Type="String" Value="Anglican" />
|
||||
<Parameter Id="Muslim" name="Muslim" Type="String" Value="Muslim" />
|
||||
<Parameter Id="Hindu" name="Hindu" Type="String" Value="Hindu" />
|
||||
<Parameter Id="Buddhist" name="Buddhist" Type="String" Value="Buddhist" />
|
||||
<Parameter Id="Jewish" name="Jewish" Type="String" Value="Jewish" />
|
||||
<Parameter Id="Atheist" name="Atheist" Type="String" Value="Atheist" />
|
||||
</ParameterBag>
|
||||
</Resource>
|
||||
|
||||
</StrolchModel>
|
|
@ -25,5 +25,6 @@
|
|||
|
||||
<IncludeFile file="Resources.xml" />
|
||||
<IncludeFile file="Orders.xml" />
|
||||
<IncludeFile file="Enums.xml" />
|
||||
|
||||
</StrolchModel>
|
Loading…
Reference in New Issue