/** * Performs a deep copy of this configuration element and returns it. * The parent of this configuration must be locked in a transaction and the newly created * child will be automatically enrolled in the parent's transaction. * * @param parent the writable copy of the parent * @return a deep copy of itself. * @throws TransactionFailure if the transaction cannot be completed. */ @DuckTyped @Customize public ConfigBeanProxy deepCopy(ConfigBeanProxy parent) throws TransactionFailure;
/** * Creates a child element of this configuration element * * @param type the child element type * @return the newly created child instance * @throws TransactionFailure when called outside the boundaries of a transaction */ @DuckTyped @Customize public <T extends ConfigBeanProxy> T createChild(Class<T> type) throws TransactionFailure;
/** * Returns a property value if the bean has properties and one of its * properties name is equal to the one passed. Otherwise return * the default value. * * @param name the property name requested * @param defaultValue is the default value to return in case the property * of that name does not exist in this bag * @return the property value */ @Customize @DuckTyped String getPropertyValue(String name, String defaultValue);
/** * Returns a property value if the bean has properties and one of its * properties name is equal to the one passed. * * @param name the property name requested * @return the property value or null if not found */ @Customize @DuckTyped String getPropertyValue(String name);
/** * Returns the typed parent element of this configuration element. * * It is possible to return a not null parent while the parent knows nothing of this * child element. This could happen when the child element was removed * from the configuration tree, yet it's parent would not have been reset. * * @param type parent's type * @return the parent configuration node. */ @DuckTyped @Customize public <T extends ConfigBeanProxy> T getParent(Class<T> type);
/** * Returns the parent element of this configuration element. * * It is possible to return a not null parent while the parent knows nothing of this * child element. This could happen when the child element was removed * from the configuration tree, yet it's parent would not have been reset. * * @return the parent configuration node. */ @DuckTyped @Customize public ConfigBeanProxy getParent();
@Customize @DuckTyped Property getProperty(String name);
/** * Returns the cluster configuration reference * @return the config-ref attribute */ @DuckTyped @Override String getReference();
/** * Returns the node dir as an absolute path. If the node dir path * in the Node element is relative this will make it absolute relative * to the node's installdir. * @return the node's nodedir as an absolute path. Null if no nodedir. */ @DuckTyped String getNodeDirAbsolute();
/** * Does the node allow instance creation? * @return true if node allows instance creation, else false */ @DuckTyped boolean instanceCreationAllowed();
/** * Return the server with the given name, or null if no such server exists. * * @param name the name of the server * @return the Server object, or null if no such server */ @DuckTyped public Server getServer(String name);
/** * Gets a subset of {@link #getModules()} that has the given type. */ @DuckTyped <T> List<T> getModules(Class<T> type);
/** * @param configBeanType The config bean type we want to check whether the configuration exists for it or not. * @param <P> Type that extends the ConfigBeanProxy which is the type of class we accept as parameter * @return true if configuration for the type exists in the target area of domain.xml and false if not. */ @DuckTyped <P extends ConfigBeanProxy> boolean checkIfExtensionExists(Class<P> configBeanType);
/** * Return the monitoring configuration for a container by the provided name, * assuming the named container used the default ContainerMonitoring to * express its monitoring configuration. * * @param name name of the container to return the configuration for * @return the container configuration or null if not found */ @DuckTyped ContainerMonitoring getContainerMonitoring(String name);
/** * True if this is the default local node. Example: localhost-domain1 * @return */ @DuckTyped boolean isDefaultLocalNode();
/** * Return the node with the given name, or null if no such node exists. * * @param name the name of the node * @return the Node object, or null if no such node */ @DuckTyped public Node getNode(String name);
/** * Returns the SecureAdminPrincipal corresponding to the Principal the * instances use to authenticate themselves using SSL/TLS * @return the SecureAdminPrincipal for the instances */ @DuckTyped String getInstanceAlias();
/** * Returns a property value if the bean has properties and one of its * properties name is equal to the one passed. Otherwise return * the default value. * * @param name the property name requested * @param defaultValue is the default value to return in case the property * of that name does not exist in this bag * @return the property value */ @DuckTyped String getPropertyValue(String name, String defaultValue);
/** * Returns the virtualization technology used to interface with low-level machine creation/deletion/etc... * Possible values are libvirt, jclouds, deltacloud. * * So far only libvirt is supported. * @see org.glassfish.virtualization.config.Virtualization#getName() * * @return the virtualization solution. */ @DuckTyped Virtualization getVirtualization();
/** * Validates the value in the env-entry-value subelement against the * type stored in the env-entry-type subelement. * <p> * @throws IllegalArgumentException if the type does not match one of the legal ones * @throws NumberFormatException if the value cannot be parsed according to the type */ @DuckTyped public void validateValue();