You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@archiva.apache.org by Brett Porter <br...@apache.org> on 2007/10/20 03:38:22 UTC
Re: svn commit: r586635 - in /maven/archiva/trunk/archiva-web/archiva-webapp/src: main/java/org/apache/maven/archiva/web/action/admin/repositories/ test/java/org/apache/maven/archiva/web/action/admin/repositories/
On 20/10/2007, at 8:48 AM, joakime@apache.org wrote:
> + // [MRM-520] Proxy Connectors are not deleted with the
> deletion of a Repository.
> + List<ProxyConnectorConfiguration> proxyConnectors =
> getProxyConnectors();
> + for ( ProxyConnectorConfiguration proxyConnector :
> proxyConnectors )
> + {
> + if ( StringUtils.equals( proxyConnector.getSourceRepoId
> (), cleanupRepository.getId() ) )
> + {
> + archivaConfiguration.getConfiguration
> ().removeProxyConnector( proxyConnector );
> + }
> + }
Shouldn't this duplication be in the common base class?
- Brett
--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/
Re: svn commit: r586635 - in /maven/archiva/trunk/archiva-web/archiva-webapp/src: main/java/org/apache/maven/archiva/web/action/admin/repositories/ test/java/org/apache/maven/archiva/web/action/admin/repositories/
Posted by Brett Porter <br...@apache.org>.
even better :)
On 21/10/2007, at 1:05 AM, Joakim Erdfelt wrote:
> Well, you do have a point there.
> If the passed in repoId matches on either a sourceId or a targetId,
> then the proxy connector should be deleted.
> wdyt?
>
> - Joakim
>
> Brett Porter wrote:
>> ugh, I obviously need new eyes. two times in a row I've read the
>> variables back to front :D
>>
>> On 20/10/2007, at 6:41 PM, Brett Porter wrote:
>>
>>> pass the repo id in as a parameter?
>>>
>>> It's not a lot of code, no big deal, it's just that I noticed the
>>> other was already factored into a method and these classes had
>>> recently been emphasised as needing to share more code :)
>>>
>>> - Brett
>>>
>>> On 20/10/2007, at 2:07 PM, Joakim Erdfelt wrote:
>>>
>>>> You'd think so, but the rule is different.
>>>> One removes based on connector.sourceId and the other removes
>>>> based on connector.targetId
>>>> Guess I could bring out the commons-collection's Predicates
>>>> again to make a common base method. ;-)
>>>>
>>>> - Joakim
>>>>
>>>> Brett Porter wrote:
>>>>>
>>>>> On 20/10/2007, at 8:48 AM, joakime@apache.org wrote:
>>>>>
>>>>>> + // [MRM-520] Proxy Connectors are not deleted with
>>>>>> the deletion of a Repository.
>>>>>> + List<ProxyConnectorConfiguration> proxyConnectors =
>>>>>> getProxyConnectors();
>>>>>> + for ( ProxyConnectorConfiguration proxyConnector :
>>>>>> proxyConnectors )
>>>>>> + {
>>>>>> + if ( StringUtils.equals
>>>>>> ( proxyConnector.getSourceRepoId(), cleanupRepository.getId() ) )
>>>>>> + {
>>>>>> + archivaConfiguration.getConfiguration
>>>>>> ().removeProxyConnector( proxyConnector );
>>>>>> + }
>>>>>> + }
>>>>>
>>>>> Shouldn't this duplication be in the common base class?
>>>>>
>>>>> - Brett
>>>>>
>>>>> --
>>>>> Brett Porter - brett@apache.org
>>>>> Blog: http://www.devzuz.org/blogs/bporter/
>>>>>
>>>>
>>>>
>>>> --
>>>> - Joakim Erdfelt
>>>> joakim@erdfelt.com
>>>> Open Source Software (OSS) Developer
>>>
>>> --
>>> Brett Porter - brett@apache.org
>>> Blog: http://www.devzuz.org/blogs/bporter/
>>
>> --
>> Brett Porter - brett@apache.org
>> Blog: http://www.devzuz.org/blogs/bporter/
>>
>
>
> --
> - Joakim Erdfelt
> joakim@erdfelt.com
> Open Source Software (OSS) Developer
--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/
Re: svn commit: r586635 - in /maven/archiva/trunk/archiva-web/archiva-webapp/src:
main/java/org/apache/maven/archiva/web/action/admin/repositories/ test/java/org/apache/maven/archiva/web/action/admin/repositories/
Posted by Joakim Erdfelt <jo...@erdfelt.com>.
Well, you do have a point there.
If the passed in repoId matches on either a sourceId or a targetId, then
the proxy connector should be deleted.
wdyt?
- Joakim
Brett Porter wrote:
> ugh, I obviously need new eyes. two times in a row I've read the
> variables back to front :D
>
> On 20/10/2007, at 6:41 PM, Brett Porter wrote:
>
>> pass the repo id in as a parameter?
>>
>> It's not a lot of code, no big deal, it's just that I noticed the
>> other was already factored into a method and these classes had
>> recently been emphasised as needing to share more code :)
>>
>> - Brett
>>
>> On 20/10/2007, at 2:07 PM, Joakim Erdfelt wrote:
>>
>>> You'd think so, but the rule is different.
>>> One removes based on connector.sourceId and the other removes based
>>> on connector.targetId
>>> Guess I could bring out the commons-collection's Predicates again to
>>> make a common base method. ;-)
>>>
>>> - Joakim
>>>
>>> Brett Porter wrote:
>>>>
>>>> On 20/10/2007, at 8:48 AM, joakime@apache.org wrote:
>>>>
>>>>> + // [MRM-520] Proxy Connectors are not deleted with the
>>>>> deletion of a Repository.
>>>>> + List<ProxyConnectorConfiguration> proxyConnectors =
>>>>> getProxyConnectors();
>>>>> + for ( ProxyConnectorConfiguration proxyConnector :
>>>>> proxyConnectors )
>>>>> + {
>>>>> + if ( StringUtils.equals(
>>>>> proxyConnector.getSourceRepoId(), cleanupRepository.getId() ) )
>>>>> + {
>>>>> +
>>>>> archivaConfiguration.getConfiguration().removeProxyConnector(
>>>>> proxyConnector );
>>>>> + }
>>>>> + }
>>>>
>>>> Shouldn't this duplication be in the common base class?
>>>>
>>>> - Brett
>>>>
>>>> --
>>>> Brett Porter - brett@apache.org
>>>> Blog: http://www.devzuz.org/blogs/bporter/
>>>>
>>>
>>>
>>> --
>>> - Joakim Erdfelt
>>> joakim@erdfelt.com
>>> Open Source Software (OSS) Developer
>>
>> --
>> Brett Porter - brett@apache.org
>> Blog: http://www.devzuz.org/blogs/bporter/
>
> --
> Brett Porter - brett@apache.org
> Blog: http://www.devzuz.org/blogs/bporter/
>
--
- Joakim Erdfelt
joakim@erdfelt.com
Open Source Software (OSS) Developer
Re: svn commit: r586635 - in /maven/archiva/trunk/archiva-web/archiva-webapp/src: main/java/org/apache/maven/archiva/web/action/admin/repositories/ test/java/org/apache/maven/archiva/web/action/admin/repositories/
Posted by Brett Porter <br...@apache.org>.
ugh, I obviously need new eyes. two times in a row I've read the
variables back to front :D
On 20/10/2007, at 6:41 PM, Brett Porter wrote:
> pass the repo id in as a parameter?
>
> It's not a lot of code, no big deal, it's just that I noticed the
> other was already factored into a method and these classes had
> recently been emphasised as needing to share more code :)
>
> - Brett
>
> On 20/10/2007, at 2:07 PM, Joakim Erdfelt wrote:
>
>> You'd think so, but the rule is different.
>> One removes based on connector.sourceId and the other removes
>> based on connector.targetId
>> Guess I could bring out the commons-collection's Predicates again
>> to make a common base method. ;-)
>>
>> - Joakim
>>
>> Brett Porter wrote:
>>>
>>> On 20/10/2007, at 8:48 AM, joakime@apache.org wrote:
>>>
>>>> + // [MRM-520] Proxy Connectors are not deleted with the
>>>> deletion of a Repository.
>>>> + List<ProxyConnectorConfiguration> proxyConnectors =
>>>> getProxyConnectors();
>>>> + for ( ProxyConnectorConfiguration proxyConnector :
>>>> proxyConnectors )
>>>> + {
>>>> + if ( StringUtils.equals
>>>> ( proxyConnector.getSourceRepoId(), cleanupRepository.getId() ) )
>>>> + {
>>>> + archivaConfiguration.getConfiguration
>>>> ().removeProxyConnector( proxyConnector );
>>>> + }
>>>> + }
>>>
>>> Shouldn't this duplication be in the common base class?
>>>
>>> - Brett
>>>
>>> --
>>> Brett Porter - brett@apache.org
>>> Blog: http://www.devzuz.org/blogs/bporter/
>>>
>>
>>
>> --
>> - Joakim Erdfelt
>> joakim@erdfelt.com
>> Open Source Software (OSS) Developer
>
> --
> Brett Porter - brett@apache.org
> Blog: http://www.devzuz.org/blogs/bporter/
--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/
Re: svn commit: r586635 - in /maven/archiva/trunk/archiva-web/archiva-webapp/src: main/java/org/apache/maven/archiva/web/action/admin/repositories/ test/java/org/apache/maven/archiva/web/action/admin/repositories/
Posted by Brett Porter <br...@apache.org>.
pass the repo id in as a parameter?
It's not a lot of code, no big deal, it's just that I noticed the
other was already factored into a method and these classes had
recently been emphasised as needing to share more code :)
- Brett
On 20/10/2007, at 2:07 PM, Joakim Erdfelt wrote:
> You'd think so, but the rule is different.
> One removes based on connector.sourceId and the other removes based
> on connector.targetId
> Guess I could bring out the commons-collection's Predicates again
> to make a common base method. ;-)
>
> - Joakim
>
> Brett Porter wrote:
>>
>> On 20/10/2007, at 8:48 AM, joakime@apache.org wrote:
>>
>>> + // [MRM-520] Proxy Connectors are not deleted with the
>>> deletion of a Repository.
>>> + List<ProxyConnectorConfiguration> proxyConnectors =
>>> getProxyConnectors();
>>> + for ( ProxyConnectorConfiguration proxyConnector :
>>> proxyConnectors )
>>> + {
>>> + if ( StringUtils.equals
>>> ( proxyConnector.getSourceRepoId(), cleanupRepository.getId() ) )
>>> + {
>>> + archivaConfiguration.getConfiguration
>>> ().removeProxyConnector( proxyConnector );
>>> + }
>>> + }
>>
>> Shouldn't this duplication be in the common base class?
>>
>> - Brett
>>
>> --
>> Brett Porter - brett@apache.org
>> Blog: http://www.devzuz.org/blogs/bporter/
>>
>
>
> --
> - Joakim Erdfelt
> joakim@erdfelt.com
> Open Source Software (OSS) Developer
--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/
Re: svn commit: r586635 - in /maven/archiva/trunk/archiva-web/archiva-webapp/src:
main/java/org/apache/maven/archiva/web/action/admin/repositories/ test/java/org/apache/maven/archiva/web/action/admin/repositories/
Posted by Joakim Erdfelt <jo...@erdfelt.com>.
You'd think so, but the rule is different.
One removes based on connector.sourceId and the other removes based on
connector.targetId
Guess I could bring out the commons-collection's Predicates again to
make a common base method. ;-)
- Joakim
Brett Porter wrote:
>
> On 20/10/2007, at 8:48 AM, joakime@apache.org wrote:
>
>> + // [MRM-520] Proxy Connectors are not deleted with the
>> deletion of a Repository.
>> + List<ProxyConnectorConfiguration> proxyConnectors =
>> getProxyConnectors();
>> + for ( ProxyConnectorConfiguration proxyConnector :
>> proxyConnectors )
>> + {
>> + if ( StringUtils.equals(
>> proxyConnector.getSourceRepoId(), cleanupRepository.getId() ) )
>> + {
>> +
>> archivaConfiguration.getConfiguration().removeProxyConnector(
>> proxyConnector );
>> + }
>> + }
>
> Shouldn't this duplication be in the common base class?
>
> - Brett
>
> --
> Brett Porter - brett@apache.org
> Blog: http://www.devzuz.org/blogs/bporter/
>
--
- Joakim Erdfelt
joakim@erdfelt.com
Open Source Software (OSS) Developer