[midPoint] Mandatory fields

Petr Gašparík petr at gasparik.cz
Fri Aug 7 12:01:18 CEST 2015


Hi Katka,
I am using midPoint 3.1.1

There were no Object templates in repository, so I created new one. Is
there something else I need to do to turn it on? Becauase it is not making
hese fields mandatory.

Source:
<objectTemplate xmlns="
http://midpoint.evolveum.com/xml/ns/public/common/common-3"
                xmlns:icfs="
http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3
"
                xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
                xmlns:c="
http://midpoint.evolveum.com/xml/ns/public/common/common-3"
                xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
                xmlns:ri="
http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
                oid="10000000-0000-0000-0000-000000000223"
                version="0">
   <name>User Object Template for  Mandatory Fields</name>
   <metadata>
      <createTimestamp>2015-08-07T09:43:38.605Z</createTimestamp>
      <creatorRef oid="00000000-0000-0000-0000-000000000002"
type="c:UserType"><!-- administrator --></creatorRef>
      <createChannel>
http://midpoint.evolveum.com/xml/ns/public/model/channels-3#objectImport
</createChannel>
   </metadata>
   <item>
      <c:ref>c:givenName</c:ref>
      <limitations>
         <layer>presentation</layer>
         <minOccurs>1</minOccurs>
      </limitations>
   </item>
   <item>
      <c:ref>c:familyName</c:ref>
      <limitations>
         <layer>presentation</layer>
         <minOccurs>1</minOccurs>
      </limitations>
   </item>
   <item>
      <c:ref>c:fullName</c:ref>
      <limitations>
         <layer>presentation</layer>
         <minOccurs>1</minOccurs>
      </limitations>
   </item>
   <item>
      <c:ref>c:emailAddress</c:ref>
      <limitations>
         <layer>presentation</layer>
         <minOccurs>1</minOccurs>
      </limitations>
   </item>
   <mapping/>
</objectTemplate>


čt 6. 8. 2015 v 15:16 odesílatel Katarina Valalikova <
k.valalikova at evolveum.com> napsal:

> Hi Peter,
>
> which version of midPoint are you using? I'm asking because from the
> version 3.1.1 it is not necessary to modify midpoint's schemas dirrectly.
> You can do it in runtime environment using object template. In my opinion
> this is better way for customization as you can do it without rebuilding
> and redeploying midPoint with every other change. The example configuration
> is bellow:
>
> <objectTemplate xmlns=
> "http://midpoint.evolveum.com/xml/ns/public/common/common-3"
> <http://midpoint.evolveum.com/xml/ns/public/common/common-3>
>                 xmlns:c=
> "http://midpoint.evolveum.com/xml/ns/public/common/common-3"
> <http://midpoint.evolveum.com/xml/ns/public/common/common-3>
>                 oid="10000000-0000-0000-0000-000000000000">
>    <name>User Template</name>
>    <mapping>
>                 <!-- this is a section where you can have your mappings -->
>    </mapping>
>
> <!-- here start the section for 'schema override' -->
>  <item>
>         <ref>c:additionalName</ref>                    <!-- the name of
> the schema attribute you want to modify -->
>         <limitations>
>             *<layer>presentation</layer>                  * <!-- layer
> has to be set to presentation - this will provide checks on the GUI layer
> -->
> *            <ignore>true</ignore>*                             <!--
> completely hides this attribute in GUI -->
>         </limitations>
>    </item>
>
> <item>
>         <ref>c:name</ref>
>         <limitations>
>             *<layer>presentation</layer>*
> *            <minOccurs>1</minOccurs>*               <!-- this makes the
> field mandatory -->
>         </limitations>
>    </item>
>
> <!-- end of the 'schema override' section -->
>
>
> Hope this helps you.
>
> Best Regards,
> Katarina Valalikova
>
>
> Dňa 6. 8. 2015 o 14:43 Petr Gašparík napísal(a):
>
> Hi,
> I customized common-3.xsd - minOccurs="1" in scheme jar to make attributes
> mandatory.
>
> Now, input fields has red asterisk but midPoint is not taking care about
> that and allows empty values.
>
> What I am missing? Thanks!
> Any answer is appreciated, we run PoC right now..
>
> beste regards, Petr G.
> --
> --
> Petr G.
>
>
> _______________________________________________
> midPoint mailing listmidPoint at lists.evolveum.comhttp://lists.evolveum.com/mailman/listinfo/midpoint
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
-- 
--
Petr G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150807/ad8fe881/attachment.htm>


More information about the midPoint mailing list