View Javadoc
1   /*
2    * Copyright (c) 2002-2021, City of Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  package fr.paris.lutece.plugins.releaser.service;
35  
36  import java.util.List;
37  import java.util.Locale;
38  
39  import javax.servlet.http.HttpServletRequest;
40  
41  import fr.paris.lutece.plugins.releaser.business.WorkflowReleaseContext;
42  import fr.paris.lutece.portal.business.user.AdminUser;
43  
44  // TODO: Auto-generated Javadoc
45  /**
46   * The Interface IWorkflowReleaseContextService.
47   */
48  public interface IWorkflowReleaseContextService
49  {
50  
51      /**
52       * Start workflow release context.
53       *
54       * @param context
55       *            the context
56       * @param nIdWorkflow
57       *            the n id workflow
58       * @param locale
59       *            the locale
60       * @param request
61       *            the request
62       * @param user
63       *            the user
64       */
65      void startWorkflowReleaseContext( WorkflowReleaseContext context, int nIdWorkflow, Locale locale, HttpServletRequest request, AdminUser user );
66  
67      /**
68       * Adds the workflow release context.
69       *
70       * @param context
71       *            the context
72       * @return the int
73       */
74      int addWorkflowReleaseContext( WorkflowReleaseContext context );
75  
76      /**
77       * Save workflow release context.
78       *
79       * @param context
80       *            the context
81       */
82      void saveWorkflowReleaseContext( WorkflowReleaseContext context );
83  
84      /**
85       * Gets the workflow release context.
86       *
87       * @param nIdContext
88       *            the n id context
89       * @return the workflow release context
90       */
91      WorkflowReleaseContext getWorkflowReleaseContext( int nIdContext );
92  
93      /**
94       * Gets the list workflow release context history.
95       *
96       * @param strArtifactId
97       *            the str artifact id
98       * @return the list workflow release context history
99       */
100     List<WorkflowReleaseContext> getListWorkflowReleaseContextHistory( String strArtifactId );
101 
102     /**
103      * Gets the id workflow.
104      *
105      * @param context
106      *            the context
107      * @return the id workflow
108      */
109     int getIdWorkflow( WorkflowReleaseContext context );
110 
111     /**
112      * Checkout repository.
113      *
114      * @param context
115      *            the context
116      * @param locale
117      *            the locale
118      */
119     void checkoutRepository( WorkflowReleaseContext context, Locale locale );
120 
121     /**
122      * Merge develop master.
123      *
124      * @param context
125      *            the context
126      * @param locale
127      *            the locale
128      */
129     void mergeDevelopMaster( WorkflowReleaseContext context, Locale locale );
130 
131     /**
132      * Release prepare component.
133      *
134      * @param context
135      *            the context
136      * @param locale
137      *            the locale
138      */
139     void releasePrepareComponent( WorkflowReleaseContext context, Locale locale );
140 
141     /**
142      * Release prepare site.
143      *
144      * @param context
145      *            the context
146      * @param locale
147      *            the locale
148      */
149     void releasePrepareSite( WorkflowReleaseContext context, Locale locale );
150 
151     /**
152      * Release perform component.
153      *
154      * @param context
155      *            the context
156      * @param locale
157      *            the locale
158      */
159     void releasePerformComponent( WorkflowReleaseContext context, Locale locale );
160 
161     /**
162      * Release perform site.
163      *
164      * @param context
165      *            the context
166      * @param locale
167      *            the locale
168      */
169     void releasePerformSite( WorkflowReleaseContext context, Locale locale );
170 
171     /**
172      * Send tweet.
173      *
174      * @param context
175      *            the context
176      * @param locale
177      *            the locale
178      */
179     void sendTweet( WorkflowReleaseContext context, Locale locale );
180 
181     /**
182      * Update jira versions.
183      *
184      * @param context
185      *            the context
186      * @param locale
187      *            the locale
188      */
189     void updateJiraVersions( WorkflowReleaseContext context, Locale locale );
190 
191     /**
192      * Start release in progress.
193      *
194      * @param strArtifactId
195      *            the str artifact id
196      */
197     void startReleaseInProgress( String strArtifactId );
198 
199     /**
200      * Stop release in progress.
201      *
202      * @param strArtifactId
203      *            the str artifact id
204      */
205     void stopReleaseInProgress( String strArtifactId );
206 
207     /**
208      * Checks if is release in progress.
209      *
210      * @param strArtifactId
211      *            the str artifact id
212      * @return true, if is release in progress
213      */
214     boolean isReleaseInProgress( String strArtifactId );
215 
216     /**
217      * Inits the.
218      */
219     void init( );
220 
221 }