Examples of canHandle()


Examples of org.apache.ace.client.repository.helper.ArtifactRecognizer.canHandle()

        String foundMimetype = null;
        for (ServiceReference ref : refs) {
            ArtifactRecognizer candidate = (ArtifactRecognizer) m_context.getService(ref);
            try {
                if (mimetype != null) {
                    if (candidate.canHandle(mimetype)) {
                        recognizer = candidate;
                        break;
                    }
                }
                else {
View Full Code Here

Examples of org.apache.felix.fileinstall.ArtifactListener.canHandle()

                return fileSet;
            }
        };

        final ArtifactListener mockArtifactListener = EasyMock.createNiceMock(ArtifactListener.class);
        EasyMock.expect(mockArtifactListener.canHandle(bundleFile)).andReturn(Boolean.TRUE).anyTimes();
        final ServiceReference mockServiceReference = EasyMock.createNiceMock(ServiceReference.class);

        // simulate known/installed bundles
        mockBundleContext.addBundleListener((BundleListener) org.easymock.EasyMock.anyObject());
        EasyMock.expect(mockBundleContext.getBundles()).andReturn(new Bundle[]{mockBundle});
View Full Code Here

Examples of org.apache.felix.fileinstall.ArtifactListener.canHandle()

    ArtifactListener findListener(File artifact, List/* <ArtifactListener> */ listeners)
    {
        for (Iterator itL = listeners.iterator(); itL.hasNext();)
        {
            ArtifactListener listener = (ArtifactListener) itL.next();
            if (listener.canHandle(artifact))
            {
                return listener;
            }
        }
        return null;
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.token.TokenBasedAuthentication.canHandle()

     */
    @Override
    protected Authentication getAuthentication(Principal principal, Credentials creds) throws RepositoryException {
        if (!disableTokenAuth && tokenCredentials != null) {
            Authentication authentication = new TokenBasedAuthentication(tokenCredentials.getToken(), tokenExpiration, session);
            if (authentication.canHandle(creds)) {
                return authentication;
            }
        }

        if (user != null) {
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.token.TokenBasedAuthentication.canHandle()

            }
        }

        if (user != null) {
            Authentication authentication = new SimpleCredentialsAuthentication(user);
            if (authentication.canHandle(creds)) {
                return authentication;
            }
        }
        // no valid user or authentication could not handle the given credentials
        return null;
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.token.TokenBasedAuthentication.canHandle()

     */
    @Override
    protected Authentication getAuthentication(Principal principal, Credentials creds) throws RepositoryException {
        if (!disableTokenAuth && tokenCredentials != null) {
            Authentication authentication = new TokenBasedAuthentication(tokenCredentials.getToken(), tokenExpiration, session);
            if (authentication.canHandle(creds)) {
                return authentication;
            }
        }

        if (user != null) {
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.token.TokenBasedAuthentication.canHandle()

            }
        }

        if (user != null) {
            Authentication authentication = new SimpleCredentialsAuthentication(user);
            if (authentication.canHandle(creds)) {
                return authentication;
            }
        }
        // no valid user or authentication could not handle the given credentials
        return null;
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.token.TokenBasedAuthentication.canHandle()

     */
    @Override
    protected Authentication getAuthentication(Principal principal, Credentials creds) throws RepositoryException {
        if (!disableTokenAuth && tokenCredentials != null) {
            Authentication authentication = new TokenBasedAuthentication(tokenCredentials.getToken(), tokenExpiration, session);
            if (authentication.canHandle(creds)) {
                return authentication;
            }
        }

        if (user != null) {
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.token.TokenBasedAuthentication.canHandle()

            }
        }

        if (user != null) {
            Authentication authentication = new SimpleCredentialsAuthentication(user);
            if (authentication.canHandle(creds)) {
                return authentication;
            }
        }
        // no valid user or authentication could not handle the given credentials
        return null;
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.token.TokenBasedAuthentication.canHandle()

     */
    @Override
    protected Authentication getAuthentication(Principal principal, Credentials creds) throws RepositoryException {
        if (!disableTokenAuth && tokenCredentials != null) {
            Authentication authentication = new TokenBasedAuthentication(tokenCredentials.getToken(), tokenExpiration, session);
            if (authentication.canHandle(creds)) {
                return authentication;
            }
        }

        if (user != null) {
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.