1 /*
2 * Copyright 2013 smartics, Kronseder & Reiner GmbH
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package de.smartics.properties.jboss.extension.resources;
17
18 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE;
19 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
20
21 import org.jboss.as.controller.PathElement;
22 import org.jboss.as.controller.SimpleResourceDefinition;
23 import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler;
24 import org.jboss.as.controller.registry.ManagementResourceRegistration;
25 import org.jboss.as.controller.registry.OperationEntry;
26
27 /**
28 * The definition of the subsystem's operations and attributes.
29 */
30 public final class SubsystemDefinition extends SimpleResourceDefinition
31 {
32 // ********************************* Fields *********************************
33
34 // --- constants ------------------------------------------------------------
35
36 /**
37 * The name of the subsystem within the model.
38 * <p>
39 * The value of this constant is {@value}.
40 * </p>
41 */
42 public static final String SUBSYSTEM_NAME = "properties";
43
44 /**
45 * The path to the subsystem.
46 */
47 public static final PathElement SUBSYSTEM_PATH = PathElement.pathElement(
48 SUBSYSTEM, SUBSYSTEM_NAME);
49
50 /**
51 * Reference to the definition singleton.
52 */
53 public static final SubsystemDefinition INSTANCE = new SubsystemDefinition();
54
55 // --- members --------------------------------------------------------------
56
57 // ****************************** Initializer *******************************
58
59 // ****************************** Constructors ******************************
60
61 private SubsystemDefinition()
62 {
63 super(SUBSYSTEM_PATH,
64 DescriptionUtils.getResourceDescriptionResolver(null),
65 SubsystemAdd.INSTANCE, SubsystemRemove.INSTANCE);
66 }
67
68 // ****************************** Inner Classes *****************************
69
70 // ********************************* Methods ********************************
71
72 // --- init -----------------------------------------------------------------
73
74 // --- get&set --------------------------------------------------------------
75
76 // --- business -------------------------------------------------------------
77
78 @Override
79 public void registerOperations(
80 final ManagementResourceRegistration resourceRegistration)
81 {
82 super.registerOperations(resourceRegistration);
83 resourceRegistration.registerOperationHandler(DESCRIBE,
84 GenericSubsystemDescribeHandler.INSTANCE,
85 GenericSubsystemDescribeHandler.INSTANCE, false,
86 OperationEntry.EntryType.PRIVATE);
87 }
88
89 @Override
90 public void registerAttributes(
91 final ManagementResourceRegistration resourceRegistration)
92 {
93 }
94
95 // --- object basics --------------------------------------------------------
96
97 }