Examples of BeanContext


Examples of java.beans.beancontext.BeanContext

    }

    public void setName(String name) {
        super.setName(name);

        BeanContext bc = getBeanContext();
        if (bc != null && bc instanceof MapHandler) {
            LayerHandler lh = (LayerHandler) ((MapHandler) bc).get("com.bbn.openmap.LayerHandler");

            if (lh != null) {
                lh.setLayers();
View Full Code Here

Examples of java.beans.beancontext.BeanContext

        }
        if (lsListeners != null) {
            lsListeners.removeAll();
        }

        BeanContext bc = getBeanContext();
        if (bc != null) {
            bc.removeBeanContextMembershipListener(this);
        }
    }
View Full Code Here

Examples of java.beans.beancontext.BeanContext

     * Gets the current BeanContext from itself, if it's been set and
     * the provided PlugIn wants/can be added to the BeanContext, it
     * will be added..
     */
    public void addPlugInToBeanContext(PlugIn pi) {
        BeanContext bc = getBeanContext();

        if (bc != null
                && pi != null
                &&

                (pi instanceof BeanContextChild || (pi instanceof AbstractPlugIn && ((AbstractPlugIn) pi).getAddToBeanContext()))) {

            bc.add(pi);
        }
    }
View Full Code Here

Examples of java.beans.beancontext.BeanContext

     * Gets the current BeanContext from itself, if it's been set and
     * the provided PlugIn wants/can be added to the BeanContext, it
     * assumes it was and removes it from the BeanContext.
     */
    public void removePlugInFromBeanContext(PlugIn pi) {
        BeanContext bc = getBeanContext();

        if (bc != null
                && pi != null
                &&

                (pi instanceof BeanContextChild || (pi instanceof AbstractPlugIn && ((AbstractPlugIn) pi).getAddToBeanContext()))) {

            // Of course, we don't need all these conditions met to
            // order the removal, but they are the ones in place that would
            // cause it to be added, so we don't waste the effort
            // unless the same conditions are met.
            bc.remove(pi);
        }
    }
View Full Code Here

Examples of java.beans.beancontext.BeanContext

    public void removeAll() {
        if (allLayers == null || allLayers.length == 0) {
            return;
        }

        BeanContext bc = getBeanContext();
        Layer[] oldLayers = allLayers;
        Vector nonRemoveableLayers = null;

        for (int i = 0; i < oldLayers.length; i++) {
            Layer layer = oldLayers[i];
            if (layer.isRemovable()) {
                turnLayerOn(false, layer);
                layer.clearListeners();
                if (bc != null) {
                    // Remove the layer from the BeanContext
                    bc.remove(layer);
                }
                oldLayers[i] = null;
            } else {
                if (nonRemoveableLayers == null) {
                    nonRemoveableLayers = new Vector(oldLayers.length);
View Full Code Here

Examples of java.beans.beancontext.BeanContext

                newLayers,
                index,
                currentLayers.length - index - 1);

        // Remove the layer to the BeanContext, if it wants to be.
        BeanContext bc = getBeanContext();
        if (bc != null) {
            bc.remove(rLayer);
        }
        turnLayerOn(false, rLayer);
        rLayer.clearListeners();
        rLayer = null;
View Full Code Here

Examples of java.beans.beancontext.BeanContext

     * duplicates aren't allowed.
     *
     * @param layers layers to add, if they want to be.
     */
    public void addLayersToBeanContext(Layer[] layers) {
        BeanContext bc = getBeanContext();
        if (bc == null || layers == null) {
            return;
        }

        for (int i = 0; i < layers.length; i++) {
            if (layers[i].getAddToBeanContext()
                    && layers[i].getBeanContext() == null) {
                bc.add(layers[i]);
            }
        }
    }
View Full Code Here

Examples of java.beans.beancontext.BeanContext

     * duplicates aren't allowed.
     *
     * @param layers layers to add, if they want to be.
     */
    public void removeLayersFromBeanContext(Layer[] layers) {
        BeanContext bc = getBeanContext();
        if (bc == null || layers == null) {
            return;
        }

        for (int i = 0; i < layers.length; i++) {
            bc.remove(layers[i]);
        }
    }
View Full Code Here

Examples of org.apache.openejb.BeanContext

                }
            }
        }

        ProxyInfo proxyInfo = handler.getProxyInfo();
        BeanContext beanContext = proxyInfo.getBeanContext();
        String deploymentID = beanContext.getDeploymentID().toString();

        updateServer(req, res, proxyInfo);

        switch (proxyInfo.getInterfaceType()) {
            case EJB_HOME: {
                res.setResponseCode(ResponseCodes.JNDI_EJBHOME);
                EJBMetaDataImpl metaData = new EJBMetaDataImpl(beanContext.getHomeInterface(),
                                                               beanContext.getRemoteInterface(),
                                                               beanContext.getPrimaryKeyClass(),
                                                               beanContext.getComponentType().toString(),
                                                               deploymentID,
                                                               -1,
                                                               convert(proxyInfo.getInterfaceType()),
                                                               null,
                                                               beanContext.getAsynchronousMethodSignatures());
                metaData.loadProperties(beanContext.getProperties());
                log(metaData);
                res.setResult(metaData);
                break;
            }
            case EJB_LOCAL_HOME: {
                res.setResponseCode(ResponseCodes.JNDI_NAMING_EXCEPTION);
                NamingException namingException = new NamingException("Not remotable: '" + name + "'. EJBLocalHome interfaces are not remotable as per the EJB specification.");
                res.setResult(new ThrowableArtifact(namingException));
                break;
            }
            case BUSINESS_REMOTE: {
                res.setResponseCode(ResponseCodes.JNDI_BUSINESS_OBJECT);
                EJBMetaDataImpl metaData = new EJBMetaDataImpl(null,
                                                               null,
                                                               beanContext.getPrimaryKeyClass(),
                                                               beanContext.getComponentType().toString(),
                                                               deploymentID,
                                                               -1,
                                                               convert(proxyInfo.getInterfaceType()),
                                                               proxyInfo.getInterfaces(),
                                                               beanContext.getAsynchronousMethodSignatures());
                metaData.setPrimaryKey(proxyInfo.getPrimaryKey());
                metaData.loadProperties(beanContext.getProperties());

                log(metaData);
                res.setResult(metaData);
                break;
            }
View Full Code Here

Examples of org.apache.openejb.BeanContext

        }
        return null;
    }

    public Method method(final String app, final String name, final long id) {
        final BeanContext bean = bean(app, name);
        if (bean != null) {
            final Collection<MethodInfo> methods = methods(baseClass(bean));
            for (MethodInfo method : methods) {
                if (method.getId() == id) {
                    return method.getMethod();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.