Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Sonatype Nexus (TM) Open Source Version
   * Copyright (c) 2008-2015 Sonatype, Inc.
   * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.
   *
   * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
   * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.
   *
   * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
  * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
  * Eclipse Foundation. All other trademarks are the property of their respective owners.
  */
 package org.sonatype.nexus.plugins.capabilities;
 
 import java.util.Map;
 
 
 import  com.google.common.base.Predicate;

Registry of current configured capabilities.
 
 public interface CapabilityRegistry
 {

  
Creates a new capability.

Parameters:
type type of capability to be created
enabled whether or not created capability should be enabled
notes optional capability notes (can be null)
properties optional capability properties (can be null)
Returns:
reference to created capability (never null)
Throws:
InvalidConfigurationException If validation failed
IOException If capabilities could not be stored
 
                           boolean enabled,
                           String notes,
                           Map<StringStringproperties)
       throws InvalidConfigurationExceptionIOException;

  
Updates a capability.

Parameters:
id of capability to be updated
enabled whether or not updated capability should be enabled
notes optional capability notes (can be null)
properties optional capability properties (can be null)
Returns:
reference to updated capability (never null)
Throws:
InvalidConfigurationException If validation failed
IOException If capabilities could not be stored
CapabilityNotFoundException If capability with specified id does not exist
 
                              boolean enabled,
                              String notes,
                              Map<StringStringproperties)
Removes a capability.

Parameters:
id of capability to be removed
Returns:
reference of removed capability (never null)
Throws:
IOException If capabilities could not be stored
CapabilityNotFoundException If capability with specified id does not exist
 
       throws IOExceptionCapabilityNotFoundException;

  
Enables a capability.

Parameters:
id of capability to be enabled
Returns:
reference to enabled capability (never null)
Throws:
IOException If capabilities could not be stored
CapabilityNotFoundException If capability with specified id does not exist
 
       throws IOExceptionCapabilityNotFoundException;

  
Disables a capability.

Parameters:
id of capability to be disabled
Returns:
reference to disabled capability
Throws:
IOException If capabilities could not be stored
CapabilityNotFoundException If capability with specified id does not exist
 
       throws IOExceptionCapabilityNotFoundException;

  
Retrieves the capability from registry with specified id. If there is no capability with specified id in the registry it will return null.

Parameters:
id to retrieve
Returns:
capability with specified id or null if not found
Since:
capabilities 2.0
Retrieves all capabilities from registry that matches the specified filter. If no capability exists or matches, result will be empty.

Parameters:
filter capability reference filter
Returns:
collection of capabilities, never null
Since:
capabilities 2.0
  public Collection<? extends CapabilityReferenceget(Predicate<CapabilityReferencefilter);

  
Retrieves all capabilities from registry. If no capability exists, result will be empty.

Returns:
collection of capabilities, never null
Since:
capabilities 2.0
New to GrepCode? Check out our FAQ X