@@ -149,15 +149,25 @@ public PromotionValidationTools( final ContentManager manager, final StoreDataMa
149149 this .promoteConfig = config ;
150150 }
151151
152- public StoreKey [] getValidationStoreKeys ( final ValidationRequest request , final boolean includeSource )
152+ public StoreKey [] getValidationStoreKeys ( final ValidationRequest request )
153153 throws PromotionValidationException
154154 {
155- return getValidationStoreKeys ( request , includeSource , true );
155+ return getValidationStoreKeys ( request , false );
156156 }
157157
158+ /**
159+ * @deprecated This method now is only used for api backward compatible
160+ */
161+ @ Deprecated
158162 public StoreKey [] getValidationStoreKeys ( final ValidationRequest request , final boolean includeSource ,
159163 final boolean includeTarget )
160164 throws PromotionValidationException
165+ {
166+ return getValidationStoreKeys ( request , includeSource );
167+ }
168+
169+ public StoreKey [] getValidationStoreKeys ( final ValidationRequest request , final boolean includeSource )
170+ throws PromotionValidationException
161171 {
162172 String verifyStores = request .getValidationParameter ( PromotionValidationTools .AVAILABLE_IN_STORES );
163173 if ( verifyStores == null )
@@ -174,10 +184,7 @@ public StoreKey[] getValidationStoreKeys( final ValidationRequest request, final
174184 verifyStoreKeys .add ( request .getSourceRepository ().getKey () );
175185 }
176186
177- if ( includeTarget )
178- {
179- verifyStoreKeys .add ( request .getTarget () );
180- }
187+
181188 if ( verifyStores == null )
182189 {
183190 logger .warn (
@@ -202,6 +209,11 @@ public StoreKey[] getValidationStoreKeys( final ValidationRequest request, final
202209 }
203210 }
204211
212+ if ( verifyStoreKeys .isEmpty () )
213+ {
214+ verifyStoreKeys .add ( request .getTarget () );
215+ }
216+
205217 logger .debug ( "Using validation StoreKeys: {}" , verifyStoreKeys );
206218
207219 return verifyStoreKeys .toArray ( new StoreKey [0 ] );
0 commit comments