[midPoint] need help creating new object type

Radovan Semancik Radovan.Semancik at evolveum.com
Thu Nov 12 15:00:00 CET 2015


Hi Roberto, 

You have several options to use a new type in midPoint: 

1) There is a GenericType XSD type already in midPoint schema. You can use that. It is almost empty type that has just the extension section. This was designed for run-time extensibility of object types (without the need to recompile midPoint). 

2) You can add your type definition to stock midPoint common-3.xsd schema and rebuild the project. But you will also have to change the implementation of repo-sql-impl component to be able to store objects into the database. 

3) The "Device" data type seems interesting and my colleagues are discussing midPoint extensions such as this so some time. So, maybe it is right time to add "DeviceType" object into starndard midPoint schema. We can cooperate on that. It is not a big task for the core midPoint team. The more demanding task would be to define the properties for this object type. Maybe we can cooperate on that? If you are interested in this option please drop me or Igor a private message and we can set up the call to discuss this. 

Just a couple of words of explanation: MidPoint data model is divided in two parts: fixed and dynamic. The fixed part is processed during compilation. Java source code is generated from that. This allow us to conveniently use it in midPoint logic, do efficient refactorings, optimize object storage in the database and so on. This gives us great maintanability and operation qualities. The drawback is that this part is not easily extensible. Therefore each object has also run-time extensible part (the <extension> part). This is easily extensible, but the capabilities are limited. So far we have been able to model all the use cases as an extension of basic object types that are in midPoint (User, Role, Org). But it is maybe the right time to look beyond that and add new object types. 

-- 
RS 

----- Original Message -----

From: "Roberto Casiano" <roberto.casiano at cogitogroup.com.au> 
To: midpoint at lists.evolveum.com 
Sent: Thursday, 12 November, 2015 4:28:35 AM 
Subject: [midPoint] need help creating new object type 



Hi, 



Is it possible to create a new object type? We have a requirement to have a separate Device object in midpoint that we could associate to Users. So we’re thinking of creating a new object type called Device. 



I tried to create an .xsd file, the contents of which are similar to that used when creating extensions, but extending FocusType instead. I placed it in midpoint.home/schema and restarted tomcat. I don’t see any errors when tomcat starts up, but I don’t know how to test if a new object type was indeed created. I have a hunch it did not create a new object type, but instead extended the definition of FocusType. 



Can you please explain how to create a new object type, and how to test and verify? 



Thanks, 

Rob 


This email, and any attachment, is confidential and also privileged. If you have received it in error, please notify me immediately and delete it from your system along with any attachments. You should not copy or use it for any purpose, nor disclose its contents to any other person. 
_______________________________________________ 
midPoint mailing list 
midPoint at lists.evolveum.com 
http://lists.evolveum.com/mailman/listinfo/midpoint 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20151112/1ee7feb7/attachment.htm>


More information about the midPoint mailing list