Examples of ClientEntry


Examples of org.apache.jetspeed.om.registry.ClientEntry

  {
    try
    {
      String clientName =
        rundata.getParameters().getString("client_name");
      ClientEntry clientEntry =
        (ClientEntry) Registry.getEntry(Registry.CLIENT, clientName);
      if (clientEntry != null)
      {
                String mimeType = rundata.getParameters().getString("mime_type");
        clientEntry.getMimetypeMap().addMimetype(mimeType);

        Registry.addEntry(Registry.CLIENT, clientEntry);
        clearUserData(rundata);
      }
      else
View Full Code Here

Examples of org.apache.jetspeed.om.registry.ClientEntry

  {
    try
    {
      String clientName =
        rundata.getParameters().getString("client_name");
      ClientEntry clientEntry =
        (ClientEntry) Registry.getEntry(Registry.CLIENT, clientName);
      if (clientEntry != null)
      {
        String[] mimeTypes =
                    rundata.getParameters().getStrings("mime_type");
        if (mimeTypes != null && mimeTypes.length > 0)
        {
          for (int i = 0; i < mimeTypes.length; i++)
          {
            String mimeType = mimeTypes[i];

            clientEntry.getMimetypeMap().removeMimetype(mimeType);
          }

          Registry.addEntry(Registry.CLIENT, clientEntry);
          clearUserData(rundata);
        }
View Full Code Here

Examples of org.apache.jetspeed.om.registry.ClientEntry

        {
            useragent = DEFAULT_AGENT;
        }

        ClientRegistry registry = (ClientRegistry)Registry.get(Registry.CLIENT);
        ClientEntry entry = registry.findEntry(useragent);

        if (entry == null)
        {
            if (useragent.equals(DEFAULT_AGENT))
            {
View Full Code Here

Examples of org.apache.jetspeed.om.registry.ClientEntry

                    MediaTypeEntry mediaTypeEntry = (MediaTypeEntry) regEntry;
                    cm = mediaTypeEntry.getCapabilityMap();
                }
                else if (regEntry instanceof ClientEntry)
                {
                    ClientEntry clientEntry = (ClientEntry) regEntry;
                    cm = clientEntry.getCapabilityMap();
                }
                else
                {
                    //TODO: throw error
                }
View Full Code Here

Examples of org.apache.jetspeed.om.registry.ClientEntry

                    MediaTypeEntry mediaTypeEntry = (MediaTypeEntry) regEntry;
                    cm = mediaTypeEntry.getCapabilityMap();
                }
                else if (regEntry instanceof ClientEntry)
                {
                    ClientEntry clientEntry = (ClientEntry) regEntry;
                    cm = clientEntry.getCapabilityMap();
                }
                else
                {
                    //TODO: throw error
                }
View Full Code Here

Examples of org.apache.jetspeed.om.registry.ClientEntry

    {
        try
        {
            // Make sure the Registry works
            ClientRegistry cr = (ClientRegistry)Registry.get(Registry.CLIENT);
            ClientEntry ce = (ClientEntry)cr.getEntry("ie5");
            assertNotNull(ce);
        }
        catch (Exception e)
        {
            String errmsg = "Error in test: " + e.toString();
View Full Code Here

Examples of org.apache.jetspeed.om.registry.ClientEntry

     * @return the found client or null if the user-agent does not match any
     *  defined client
     */
    public ClientEntry findEntry(String useragent)
    {
        ClientEntry clientEntry = null;
        Enumeration clients = getEntries();

        if ( logger.isDebugEnabled() )
        {
            logger.debug( "ClientRegistry: Looking for client with useragent :" + useragent );
        }

        if (clients != null)
        {
            while (clients.hasMoreElements())
            {
                ClientEntry client = (ClientEntry)clients.nextElement();
                if (client.getUseragentpattern() != null)
                {
                    try
                    {
                        RE r = new RE(client.getUseragentpattern());
                        r.setMatchFlags(RE.MATCH_CASEINDEPENDENT);

                        if (r.match(useragent))
                        {

                            if ( logger.isDebugEnabled() )
                            {
                                logger.debug( "ClientRegistry: " + useragent + " matches " + client.getUseragentpattern() );
                            }

                            return client;
                        }
                        else
                        {
                            if ( logger.isDebugEnabled() )
                            {
                                logger.debug( "ClientRegistry: " + useragent + " does not match " + client.getUseragentpattern() );
                            }
                        }
                    }
                    catch (org.apache.regexp.RESyntaxException e)
                    {
                        String message = "ClientRegistryService: UserAgentPattern not valid : " + client.getUseragentpattern() + " : " + e.getMessage();
                        logger.error( message, e );
                    }
                }
            }
        }
View Full Code Here

Examples of org.apache.jetspeed.om.registry.ClientEntry

        {
            useragent = DEFAULT_AGENT;
        }

        ClientRegistry registry = (ClientRegistry)Registry.get(Registry.CLIENT);
        ClientEntry entry = registry.findEntry(useragent);

        if (entry == null)
        {
            if (useragent.equals(DEFAULT_AGENT))
            {
View Full Code Here

Examples of org.eclipse.ecf.internal.example.collab.ClientEntry

  protected ClientEntry isConnected(IResource res) {
    if (res == null)
      return null;
    final CollabClient client = CollabClient.getDefault();
    final ClientEntry entry = client.isConnected(res, CollabClient.GENERIC_CONTAINER_CLIENT_NAME);
    return entry;
  }
View Full Code Here

Examples of org.eclipse.ecf.internal.example.collab.ClientEntry

      return;
    final IFile file = getFileForPart(editor);
    if (file == null)
      return;
    final IProject project = file.getProject();
    final ClientEntry entry = isConnected(project.getWorkspace().getRoot());
    if (entry == null) {
      MessageDialog.openInformation(getWorkbench().getDisplay().getActiveShell(), Messages.SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TITLE, Messages.SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TEXT);
      return;
    }
    final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
    if (collabsharedobject != null) {
      collabsharedobject.sendOpenAndSelectForFile(null, project.getName() + "/" + file.getProjectRelativePath().toString(), textSelection.getOffset(), textSelection.getLength()); //$NON-NLS-1$
    }
  }
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.