Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 
 
 /*
  * Created on : 16.06.2003
  * Created by : s3595
  */
 package at.spardat.xma.boot.comp.data;
 
 import java.net.URL;
 
XMAComponent

Author(s):
s3595, Chris Sch�fer (CGS)
Version:
$Id: XMAComponent.java 2902 2008-11-12 13:59:09Z gub $
 
 public class XMAComponent {

    
name of the xma component as described in xma-app
 
     private String name_;

    
base package that this component is included in
 
     private String implPackage_;

    
the resources needed by this component
 
     private HashMap res_;

    
shared resources needed by this component
 
     private ArrayList resourceLinks_;

    
contains to this application
 
     private XMAApp application_;

    
interface to the running component
 
     // private IComponent rtcmp;
 
    
running components one or more components of an application can be instantiated.
 
     private HashMap instances_;

    
File URL of fast develompment mode class directory for this componen
 
     private URL fdmUrl_;
 
 
     public XMAComponentString nameString impl ) {
                   = new HashMap(15);
         = new ArrayList();
             = new HashMap();
       this.setName_(name);
       this.setImplPackage_(impl);
     }
 
     public void writeXMLPrintStream ps ) {
 
        ps.print. + . );
          ps.print. + . + . + this. + . );
         ps.print. + . );
         ps.println();
 
         for (Iterator iter = .values().iterator(); iter.hasNext();) {
             XMAResource element = (XMAResource)iter.next();
             ps.print("   "); //$NON-NLS-1$
             element.writeXML(ps);
             ps.println();
 
         }
 
         for (Iterator iter = .iterator(); iter.hasNext();) {
             XMAResourceLink element = (XMAResourceLink)iter.next();
             ps.print("   ");             //$NON-NLS-1$
             element.writeXML(ps);
             ps.println();
          }
 
     }
 
 
 
    public void addResourceXMAResource r ) {
       this..putr.getHref_(), r);
    }
    public void addResourceLinkXMAResourceLink r ) {
       this..add(r);
    }

    

Returns:
String base impl-package name
    public String getImplPackage_() {
        return ;
    }

    

Returns:
String component name
    public String getName_() {
        return ;
    }

    

Parameters:
string package name
    public void setImplPackage_(String string) {
         = string;
    }

    

Parameters:
string component name
    public void setName_(String string) {
         = string;
    }

    

Returns:
ArrayList resource links of required shared resources
    public ArrayList getResourceLinks() {
        return ;
    }

    

Returns:
HashMap component resources
    public HashMap getRes() {
        return ;
    }

    

Returns:
XMAApp the xma app
    public XMAApp getApplication() {
        return ;
    }

    

Parameters:
app xmaapp
    public void setApplication(XMAApp app) {
         = app;
    }

    
add a new running instance of this component.

Parameters:
component
    public void addInstance(IComponent component ){
        .put( Integer.toStringcomponent.hashCode()), component );
    }
    public IComponent remInstanceIComponent component ) {
        Object cmp = .remove( Integer.toStringcomponent.hashCode()) );
        IComponentHelper compHelper = BootRuntime.getInstance().getAppManager().getCompHelper();
        return compHelper!=null?compHelper.castToIComponent(cmp):null;
    }
    public int instanceCount() {
        return .size();
    }
    public void setFdmUrl(URL url) {
        =url;
    }
    public URL getFdmUrl() {
        return ;
    }
New to GrepCode? Check out our FAQ X