FileDocCategorySizeDatePackage
DeployedItemConfigBase.javaAPI DocGlassfish v2 API4093Fri May 04 22:23:18 BST 2007com.sun.enterprise.management.config

DeployedItemConfigBase

public class DeployedItemConfigBase extends AMXConfigImplBase implements com.sun.appserv.management.config.Libraries, ConfigFactoryCallback
Base class for certain subclasses

Fields Summary
private static final String
LIBRARIES_ATTR
Constructors Summary
public DeployedItemConfigBase(com.sun.enterprise.management.support.Delegate delegate)

		super( delegate );
	
Methods Summary
public java.lang.String[]getLibraries()

	
	     
	
	
	    final String s  = (String)delegateGetAttributeNoThrow( LIBRARIES_ATTR );
	    
	    final String[]  libraries = s == null ?
	        EMPTY_STRING_ARRAY : s.split( getPathSeparator() );
	        
	    return libraries;
	
protected static java.lang.StringgetPathSeparator()

	    return System.getProperty( "path.separator" );
	
public voidsetLibraries(java.lang.String[] libraries)
Note: some system apps make this Attribute read-only, though the MBeanInfo advertises it as read/write.

	    if ( libraries == null || libraries.length == 0 )
	    {
	        final String[]  current = getLibraries();
	        if ( current.length == 0 )
	        {
	            // OK, no change
	        }
	        else
	        {
                delegateSetAttributeNoThrow( LIBRARIES_ATTR, null );
            }
	    }
	    else
	    {
    	    final String SEP    = getPathSeparator();
    	    
    	    for( final String s : libraries )
    	    {
    	        if ( s == null || s.length() == 0 || s.indexOf( SEP ) >= 0 )
    	        {
    	            throw new IllegalArgumentException( StringUtil.quote( "" + s ) );
    	        }
    	    }
    	    final String libs   = StringUtil.toString( SEP, (Object[])libraries );
            
            delegateSetAttributeNoThrow( LIBRARIES_ATTR, libs );
        }