Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2011 Red Hat, Inc. (jdcasey@commonjava.org) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.commonjava.aprox.client.core.module;
 
 
 
 public class AproxStoresClientModule
     extends AproxClientModule
 {
     private final Logger logger = LoggerFactory.getLoggergetClass() );
 
     public <T extends ArtifactStore> T createfinal T valuefinal String changelogfinal Class<T> type )
         throws AproxClientException
     {
         value.setMetadata.changelog );
         return .postWithResponse( UrlUtils.buildUrl"admin"value.getKey()
                                                                        .getType()
                                                                        .singularEndpointName() ),
                                       valuetype );
     }
 
     public boolean existsfinal StoreType typefinal String name )
         throws AproxClientException
     {
         return .exists( UrlUtils.buildUrl"admin"type.singularEndpointName(), name ) );
     }
 
     public void deletefinal StoreType typefinal String namefinal String changelog )
         throws AproxClientException
     {
         .deleteWithChangelog( UrlUtils.buildUrl"admin"type.singularEndpointName(), name ), changelog );
     }
 
     public boolean updatefinal ArtifactStore storefinal String changelog )
         throws AproxClientException
     {
         store.setMetadata.changelog );
         return .put( UrlUtils.buildUrl"admin"store.getKey()
                                                                            .getType()
                                                                            .singularEndpointName(), store.getName() ),
                          store );
     }
 
     public <T extends ArtifactStore> T loadfinal StoreType typefinal String namefinal Class<T> cls )
         throws AproxClientException
     {
         return .get( UrlUtils.buildUrl"admin"type.singularEndpointName(), name ), cls );
     }
 
         throws AproxClientException
     {
         return .get( UrlUtils.buildUrl"admin"..singularEndpointName() ),
                          new TypeReference<StoreListingDTO<HostedRepository>>()
                          {
                          } );
     }
 
         throws AproxClientException
     {
         return .get( UrlUtils.buildUrl"admin"..singularEndpointName() ),
                          new TypeReference<StoreListingDTO<RemoteRepository>>()
                          {
                          } );
     }
 
     public StoreListingDTO<GrouplistGroups()
         throws AproxClientException
     {
         return .get( UrlUtils.buildUrl"admin"..singularEndpointName() ),
                          new TypeReference<StoreListingDTO<Group>>()
                          {
                          } );
    }
New to GrepCode? Check out our FAQ X