Package org.apache.felix.dm

Examples of org.apache.felix.dm.DependencyManager


     * @param component the component representing this object.
     */
    public void init(Component component) {
        populate();

        DependencyManager dm = component.getDependencyManager();
        component.add(dm
            .createServiceDependency()
            .setInstanceBound(true)
            .setService(UIExtensionFactory.class, "(" + UIExtensionFactory.EXTENSION_POINT_KEY + "=" + m_extensionPoint + ")")
            .setCallbacks("addExtension", "removeExtension"));
    }
View Full Code Here


       
        initComponent();
    }

    public void init(org.apache.felix.dm.Component component) {
      DependencyManager dm = component.getDependencyManager();
      component.add(dm.createServiceDependency()
            .setService(UIExtensionFactory.class, "(" + UIExtensionFactory.EXTENSION_POINT_KEY + "=" + UIExtensionFactory.EXTENSION_POINT_VALUE_MENU + ")")
            .setCallbacks("add", "remove")
            .setRequired(false)
            .setInstanceBound(true)
        );
View Full Code Here

        }
    }

    private GridLayout createToolbar(User user) {
        final boolean showLogoutButton = m_useAuth;
        final DependencyManager manager = m_manager;
        MainActionToolbar mainActionToolbar = new MainActionToolbar(user, manager, showLogoutButton) {
            @Override
            protected RepositoryAdmin getRepositoryAdmin() {
                return m_admin;
            }
View Full Code Here

    /**
     * Common set up for each test case.
     */
    @Before
    public void setUp() {
        m_dependencyManager = new DependencyManager(m_context);
    }
View Full Code Here

    /**
     * Common set up for each test case.
     */
    @Before
    public void setUp() {
        m_dependencyManager = new DependencyManager(m_context);
    }
View Full Code Here

        m_currentUser = currentUser;
        setEnabled(false);
    }

    public void init(Component component) {
        final DependencyManager dm = component.getDependencyManager();
        setEnabled(true);
        if (m_userUtil.hasRole(m_currentUser, "editUsers")) {
            setCaption("Manage Users");
        }
        else {
            setCaption("My Info");
        }
        final Window window = new UserAdminWindow(m_currentUser);
        window.setModal(true);
        // create a new dependency for the window
        m_window = dm.createComponent()
            .setImplementation(window)
            .add(dm.createServiceDependency()
                .setService(UserEditor.class)
                .setRequired(true)
            );
        dm.add(m_window);
        m_click = new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                getWindow().addWindow(window);
            }
View Full Code Here

    /**
     * Set up of this test case.
     */
    protected final void setUp() throws Exception {
      m_bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
        m_dependencyManager = new DependencyManager(m_bundleContext);

        Component[] components = getDependencies();
        ComponentCounter listener = new ComponentCounter(components);

        // Register our listener for all the services...
View Full Code Here

    /**
     * Set up of this test case.
     */
    protected final void setUp() throws Exception {
      m_bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
        m_dependencyManager = new DependencyManager(m_bundleContext);

        Component[] components = getDependencies();
        ComponentCounter listener = new ComponentCounter(components);

        // Register our listener for all the services...
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    protected void bundleStopped(Bundle b)
    {
        Log.instance().info("Runtime: Removing services from stopping bundle: %s", b.getSymbolicName());
        DependencyManager dm = m_managers.remove(b);
        if (dm != null)
        {
            List<Component> services = new ArrayList<Component>(dm.getComponents());
            for (Component service : services)
            {
                Log.instance().info("Runtime: Removing service: %s", service);
                dm.remove(service);
            }
        }
    }
View Full Code Here

        BufferedReader in = null;
        try
        {
            in = new BufferedReader(new InputStreamReader(descriptorURL.openStream()));
            DependencyManager dm = m_managers.get(b);
            if (dm == null)
            {
                dm = new DependencyManager(b.getBundleContext());
                m_managers.put(b, dm);
            }

            m_parser.parse(in, b, dm);
        }
View Full Code Here

TOP

Related Classes of org.apache.felix.dm.DependencyManager

Copyright © 2018 www.massapicom. 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.