All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rhq.helpers.pluginGen.Props Maven / Gradle / Ivy

The newest version!
/*
 * RHQ Management Platform
 * Copyright (C) 2005-2011 Red Hat, Inc.
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation version 2 of the License.
 *
 * 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 Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
package org.rhq.helpers.pluginGen;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

import javassist.ClassPool;
import javassist.CtClass;
import org.rhq.helpers.pluginAnnotations.agent.DataType;
import org.rhq.helpers.pluginAnnotations.agent.DisplayType;
import org.rhq.helpers.pluginAnnotations.agent.Metric;
import org.rhq.helpers.pluginAnnotations.agent.Units;

/**
 * The properties needed to generate a new plugin skeleton
 *
 * @author Heiko W. Rupp
 */
public class Props {

   /** What category is this ? */
   private ResourceCategory category;
   /** The name of this item */
   private String name;
   /** A description of the plugin */
   private String description;
   /** Package name prefix */
   private String packagePrefix;
   /** String package */
   private String pkg;
   /** The name of the DiscoveryClass */
   private String discoveryClass;
   /** The name of the Component class */
   private String componentClass;
   /** The type of the parent we run in */
   private String parentType;
   /** Filesytem root */
   private String fileSystemRoot;
   /** Should this service do monitoring ? */
   private boolean hasMetrics;
   /** Should this service do operations ? */
   private boolean hasOperations;
   /** Is this service a singleton (e.g. a XYZ subsystem) */
   private boolean singleton;
   /** Does the service support configuration ? */
   private boolean resourceConfiguration;
   /** Does the service support events */
   private boolean events;
   /** Does the service support the support facet? */
   private boolean supportFacet;
   /** Can the service create children ? */
   private boolean createChildren;
   /** Can the service delete children ? */
   private boolean deleteChildren;
   /** Use externals chars in the plugin jar ? */
   private boolean usesExternalJarsInPlugin;
   /** Does it support manuall add of children ? */
   private boolean manualAddOfResourceType;
   /** Does it use the PluginLifecycleListener api ? */
   private boolean usePluginLifecycleListenerApi;
   /** Depends on JMX plugin ? */
   private boolean dependsOnJmxPlugin;
   /** What version of RHQ should this plugin's pom use ? */
   private String rhqVersion = "3.0.0";

   /** Embedded children */
   private Set children = new HashSet();

   private Set simpleProps = new LinkedHashSet();

   private Set