<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ParameterDefinitionImpl - with constraint in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309931#M263061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kayne Zhang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I implemented the same procedure which is suggested and Iam able to get the values.This is very useful article.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I noticed that&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;getAllowableValuesImpl()&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;method is called when I click on MangeRules,New Rule tab in alfresco share UI.&lt;/P&gt;&lt;P&gt;And I want that&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;getAllowableValuesImpl()&lt;/SPAN&gt;&amp;nbsp;should be called only when I click on New Rule Tab ,as I have the requirement to display a dialog box when I click on New Rule and that logic I had configured in&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;getAllowableValuesImpl()&lt;/SPAN&gt;&lt;SPAN style="color: #727174;"&gt;&amp;nbsp;&lt;/SPAN&gt;method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please suggest how to make&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;getAllowableValuesImpl()&lt;/SPAN&gt;&amp;nbsp;to call on New Rule tab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Sep 2017 10:02:46 GMT</pubDate>
    <dc:creator>sayeed</dc:creator>
    <dc:date>2017-09-19T10:02:46Z</dc:date>
    <item>
      <title>ParameterDefinitionImpl - with constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309928#M263058</link>
      <description>Hi,I'm using ParameterDefinitionImpl ctor that has takes a constraint as a String value. How do I specify the constraint if the constraint is defined in my model&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;aramList.add(new ParameterDefinitionImpl(PARAM_MY_PARAM, DataTypeDefinition.TEXT, false, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getParamDisplayLabel(PARAM_MY_PARAM), fa</description>
      <pubDate>Thu, 13 Mar 2014 20:14:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309928#M263058</guid>
      <dc:creator>mtw999</dc:creator>
      <dc:date>2014-03-13T20:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: ParameterDefinitionImpl - with constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309929#M263059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The constraint you defined in model is used to constraint property of a type,it is a property constraint ,it can't be used as a parameter constraint for action directly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to use property constraint to constraint the list of allowable values for a action parameter ,you can do it like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.Customize a class that inherit from org.alfresco.repo.action.constraint.BaseParameterConstraint, inject DictionaryService into your class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.Override method of getAllowableValuesImpl().in your getAllowableValuesImpl() do following&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; a.Get the definition of your property constraint by calling DictionaryService.getConstraint()&amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; b.Iterate the list of constrained values and construt&amp;nbsp; allowable parameter constraint values map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.Configure you class in spring configuration file and put it in extension classpath.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4.Pass the bean name your configured in spring as parameterConstraintName to ParameterDefinitionImpl constructor&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;new ParameterDefinitionImpl(PARAM_MY_PARAM, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_MY_PARAM), false, "bean name you configured in spring")&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 06:40:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309929#M263059</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-03-14T06:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: ParameterDefinitionImpl - with constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309930#M263060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you. I discovered how this works by looking at source code and the Test Cases for ParameterDefinitionImpl. I appreciate your response and hopefully it will save someone time in the future. Assuming ParameterDefinitionImpl is a public interface, it would be nice to see a little better documentation from Alfresco. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 12:45:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309930#M263060</guid>
      <dc:creator>mtw999</dc:creator>
      <dc:date>2014-03-14T12:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: ParameterDefinitionImpl - with constraint</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309931#M263061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kayne Zhang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I implemented the same procedure which is suggested and Iam able to get the values.This is very useful article.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I noticed that&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;getAllowableValuesImpl()&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;method is called when I click on MangeRules,New Rule tab in alfresco share UI.&lt;/P&gt;&lt;P&gt;And I want that&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;getAllowableValuesImpl()&lt;/SPAN&gt;&amp;nbsp;should be called only when I click on New Rule Tab ,as I have the requirement to display a dialog box when I click on New Rule and that logic I had configured in&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;getAllowableValuesImpl()&lt;/SPAN&gt;&lt;SPAN style="color: #727174;"&gt;&amp;nbsp;&lt;/SPAN&gt;method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please suggest how to make&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;getAllowableValuesImpl()&lt;/SPAN&gt;&amp;nbsp;to call on New Rule tab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2017 10:02:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/parameterdefinitionimpl-with-constraint/m-p/309931#M263061</guid>
      <dc:creator>sayeed</dc:creator>
      <dc:date>2017-09-19T10:02:46Z</dc:date>
    </item>
  </channel>
</rss>

