/*
 * #%L
 * JBossOSGi Resolver API
 * %%
 * Copyright (C) 2010 - 2012 JBoss by Red Hat
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 2.1 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 *
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/lgpl-2.1.html>.
 * #L%
 */
package org.jboss.osgi.resolver.internal;

import java.util.List;

import org.jboss.logging.Cause;
import org.jboss.logging.Message;
import org.jboss.logging.MessageBundle;
import org.jboss.logging.Messages;
import org.jboss.osgi.resolver.ResourceBuilderException;
import org.osgi.resource.Capability;
import org.osgi.resource.Resource;

/**
 * Logging Id ranges: 10900-10999
 *
 * https://docs.jboss.org/author/display/JBOSGI/JBossOSGi+Logging
 *
 * @author Thomas.Diesler@jboss.com
 */
@MessageBundle(projectCode = "JBOSGI")
public interface ResolverMessages {

    ResolverMessages MESSAGES = Messages.getBundle(ResolverMessages.class);

    @Message(id = 10900, value = "%s is null")
    IllegalArgumentException illegalArgumentNull(String name);

    @Message(id = 10901, value = "Invalid filter directive: %s")
    IllegalArgumentException illegalArgumentInvalidFilterDirective(String filter);

    @Message(id = 10902, value = "Invalid coordinates: %s")
    IllegalArgumentException illegalArgumentInvalidCoordinates(String coordinates);

    @Message(id = 10903, value = "Invalid namespace: %s")
    IllegalArgumentException illegalArgumentInvalidNamespace(String namespace);

    @Message(id = 10904, value = "Cannot obtain attribute: %s")
    IllegalStateException illegalStateCannotObtainAttribute(String name);

    @Message(id = 10905, value = "Cannot obtain namespace value for: %s")
    IllegalStateException illegalStateCannotObtainNamespaceValue(String name);

    @Message(id = 10906, value = "Resource already installed: %s")
    IllegalStateException illegalStateResourceAlreadyInstalled(Resource resource);

    @Message(id = 10907, value = "Multiple identities detected: %s")
    IllegalStateException illegalStateMultipleIdentities(List<Capability> caps);

    @Message(id = 10908, value = "Resource not created")
    IllegalStateException illegalStateResourceNotCreated();

    @Message(id = 10909, value = "Invalid artifact URL: %s")
    IllegalStateException illegalStateInvalidArtifactURL(String urlspec);

    @Message(id = 10910, value = "Cannot initialize resource from: %s")
    ResourceBuilderException resourceBuilderCannotInitializeResource(@Cause Throwable cause, String attributes);

    @Message(id = 10911, value = "Invalid access to mutable resource")
    IllegalStateException illegalStateInvalidAccessToMutableResource();

    @Message(id = 10912, value = "Invalid access to immutable resource")
    IllegalStateException illegalStateInvalidAccessToImmutableResource();
}

@@ -1531,32 +1531,34 @@
 ing name);%0A%0A    
+//
 @Message(id = 10
@@ -1561,32 +1561,179 @@
 = 10901, value =
+ %22Cannot obtain attribute: %25s%22)%0A    //IllegalArgumentException illegalArgumentCannotObtainAttribute(String name);%0A%0A    @Message(id = 10902, value =
  %22Invalid filter
@@ -1847,33 +1847,33 @@
 essage(id = 1090
-2
+3
 , value = %22Inval
@@ -2004,441 +2004,9 @@
 1090
-3, value = %22Invalid namespace: %25s%22)%0A    IllegalArgumentException illegalArgumentInvalidNamespace(String namespace);%0A%0A    @Message(id = 10904, value = %22Cannot obtain attribute: %25s%22)%0A    IllegalStateException illegalStateCannotObtainAttribute(String name);%0A%0A    @Message(id = 10905, value = %22Cannot obtain namespace value for: %25s%22)%0A    IllegalStateException illegalStateCannotObtainNamespaceValue(String name);%0A%0A    @Message(id = 10906
+4
 , va
@@ -2155,9 +2155,9 @@
 1090
-7
+5
 , va
@@ -2306,9 +2306,9 @@
 1090
-8
+6
 , va
@@ -2420,17 +2420,17 @@
 d = 1090
-9
+7
 , value 
@@ -2555,18 +2555,18 @@
 id = 109
-1
 0
+8
 , value 
@@ -2745,10 +2745,442 @@
  109
-11
+09, value = %22Invalid namespace: %25s%22)%0A    IllegalArgumentException illegalArgumentInvalidNamespace(String namespace);%0A%0A    @Message(id = 10910, value = %22Cannot obtain attribute: %25s%22)%0A    IllegalStateException illegalStateCannotObtainAttribute(String name);%0A%0A    @Message(id = 10911, value = %22Cannot obtain namespace value for: %25s%22)%0A    IllegalStateException illegalStateCannotObtainNamespaceValue(String name);%0A%0A    @Message(id = 10912
 , va
@@ -3310,33 +3310,33 @@
 essage(id = 1091
-2
+3
 , value = %22Inval

Fix invalid change of SPI message ids