From e5fc53bbfabfe2b2835dc48fea1c559295b2bacf Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Sun, 23 Feb 2014 20:26:05 +0000 Subject: QPID-5578 : rename managed object annotation git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1571083 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/qpid/server/model/AmqpManagement.java | 35 ---------------------- .../apache/qpid/server/model/ConfiguredObject.java | 2 +- .../org/apache/qpid/server/model/Connection.java | 2 +- .../org/apache/qpid/server/model/Exchange.java | 2 +- .../apache/qpid/server/model/ManagedObject.java | 35 ++++++++++++++++++++++ .../java/org/apache/qpid/server/model/Queue.java | 2 +- .../org/apache/qpid/server/model/VirtualHost.java | 2 +- .../server/management/amqp/ManagementNode.java | 14 ++++----- 8 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AmqpManagement.java create mode 100644 qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedObject.java (limited to 'qpid/java') diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AmqpManagement.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AmqpManagement.java deleted file mode 100644 index a7ef6e4e4e..0000000000 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AmqpManagement.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you 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.apache.qpid.server.model; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) - -public @interface AmqpManagement -{ - String[] attributes() default {}; - String[] operations() default {}; - boolean managesChildren() default false; // for objects that manage children, a management node needs to be created - boolean creatable() default true; - String defaultImplementation() default ""; // in this case the class/interface itself is to be used -} diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java index b236581cbf..4bd21c737b 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java @@ -25,7 +25,7 @@ import java.util.Collection; import java.util.Map; import java.util.UUID; -@AmqpManagement( creatable = false ) +@ManagedObject( creatable = false, category = false ) /** * An object that can be "managed" (eg via the web interface) and usually read from configuration. */ diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java index 5e86f83dfb..061d82fe5e 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java @@ -24,7 +24,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; -@AmqpManagement( creatable = false ) +@ManagedObject( creatable = false ) public interface Connection> extends ConfiguredObject { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java index 792453b13f..f788a07c4b 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Exchange.java @@ -25,7 +25,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Map; -@AmqpManagement +@ManagedObject public interface Exchange> extends ConfiguredObject { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedObject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedObject.java new file mode 100644 index 0000000000..f3370ff354 --- /dev/null +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedObject.java @@ -0,0 +1,35 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.qpid.server.model; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) + +public @interface ManagedObject +{ + boolean category() default true; + String[] operations() default {}; + boolean managesChildren() default false; // for objects that manage children, a management node needs to be created + boolean creatable() default true; + String defaultImplementation() default ""; // in this case the class/interface itself is to be used +} diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java index 9f806caa93..9a4f9d6af1 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java @@ -25,7 +25,7 @@ import java.util.Collection; import java.util.Collections; import org.apache.qpid.server.queue.QueueEntryVisitor; -@AmqpManagement +@ManagedObject public interface Queue> extends ConfiguredObject { diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java index e24b048870..8fb1a306e9 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/VirtualHost.java @@ -30,7 +30,7 @@ import java.util.Collection; import java.util.Collections; import java.util.Map; -@AmqpManagement( managesChildren = true ) +@ManagedObject( managesChildren = true ) public interface VirtualHost> extends ConfiguredObject { diff --git a/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java b/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java index 9a6dfa3b7e..9c9e2a011f 100644 --- a/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java +++ b/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNode.java @@ -32,7 +32,7 @@ import org.apache.qpid.server.message.MessageSource; import org.apache.qpid.server.message.ServerMessage; import org.apache.qpid.server.message.internal.InternalMessage; import org.apache.qpid.server.message.internal.InternalMessageHeader; -import org.apache.qpid.server.model.AmqpManagement; +import org.apache.qpid.server.model.ManagedObject; import org.apache.qpid.server.model.Attribute; import org.apache.qpid.server.model.ConfigurationChangeListener; import org.apache.qpid.server.model.ConfiguredObject; @@ -145,7 +145,7 @@ class ManagementNode implements MessageSource