It works! I must have missed it when I tried :S

Jim,

On Wednesday, October 28, 2015 at 10:47:13 AM UTC+1, Robert Sandell wrote:
>
> have you tried after JOB_LOADED?
>
> /B
>
> On Wed, Oct 28, 2015 at 10:02 AM, Jim SERRA <[email protected] 
> <javascript:>> wrote:
>
>> When I use the Initializer with after/before and whatever InitMilestone 
>> <http://javadoc.jenkins-ci.org/hudson/init/InitMilestone.html> when I 
>> try to get the list of view with:
>> jenkins.model.Jenkins.getInstance().getViews();
>>
>> the list is not initialize yet and doesn't return anything.
>> Some idea?
>>
>> Jim,
>>
>>
>> On Monday, October 19, 2015 at 11:17:44 AM UTC+2, Jim SERRA wrote:
>>>
>>> Ok,
>>> So if I want to do the apply thing (to update my json files). The best 
>>> way would be to do in the Initializer a foreach on views and do a 
>>> deleteView and addView.
>>> I will check that.
>>>
>>> On Friday, October 16, 2015 at 6:01:26 PM UTC+2, Robert Sandell wrote:
>>>>
>>>> Well what I was suggesting was to create your custom view in code and 
>>>> then add it to the ViewGroup (a.k. Jenkins)
>>>>
>>>> Jenkins.getActiveInstance().addView(new MyCustomView(...))
>>>>
>>>> /B
>>>>
>>>> On Fri, Oct 16, 2015 at 5:39 PM, Jim SERRA <[email protected]> wrote:
>>>>
>>>>> I don't want to bother you with details but my plugin is not really 
>>>>> well developped (I learned by myself), so in short there is some data 
>>>>> stored in  json files. 
>>>>> So I prefer to do this way like that I can add some security in 
>>>>> persistance.
>>>>>
>>>>> The Initializer is quite interesting !
>>>>> But I don't understand why you link the addView() method is it for the 
>>>>> submit purpose?
>>>>> I never succeeded to do a submit of the view configuration in java.
>>>>>
>>>>> On Friday, October 16, 2015 at 5:20:54 PM UTC+2, Robert Sandell wrote:
>>>>>>
>>>>>>
>>>>>> http://javadoc.jenkins-ci.org/jenkins/model/Jenkins.html#addView(hudson.model.View)
>>>>>> http://javadoc.jenkins-ci.org/hudson/init/Initializer.html
>>>>>>
>>>>>> But if you add them to Jenkins they should be persisted as well so a 
>>>>>> restart shouldn't remove them.
>>>>>>
>>>>>> /B
>>>>>>
>>>>>> On Fri, Oct 16, 2015 at 4:35 PM, Jim SERRA <[email protected]> 
>>>>>> wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>> I have a plugin which manage custom views and portlets.
>>>>>>> I don't if it's possible but I would like to submit automatically 
>>>>>>> all my customs views each time after my server Jenkins restart.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Jim.
>>>>>>>
>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "Jenkins Developers" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to [email protected].
>>>>>>> To view this discussion on the web visit 
>>>>>>> https://groups.google.com/d/msgid/jenkinsci-dev/b90bcf8f-3428-49ab-84ca-b329c7771964%40googlegroups.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/jenkinsci-dev/b90bcf8f-3428-49ab-84ca-b329c7771964%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Robert Sandell
>>>>>> *Software Engineer*
>>>>>> *CloudBees Inc.*
>>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Jenkins Developers" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/jenkinsci-dev/4302571b-6810-42b7-8052-d4d09bc33efb%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/jenkinsci-dev/4302571b-6810-42b7-8052-d4d09bc33efb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> Robert Sandell
>>>> *Software Engineer*
>>>> *CloudBees Inc.*
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-dev/24c23d12-cf9f-4310-b880-43665281db47%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-dev/24c23d12-cf9f-4310-b880-43665281db47%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Robert Sandell
> *Software Engineer*
> *CloudBees Inc.*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/a704bfed-5bbc-46b4-bc3e-e9462721262e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to