Package com.aelitis.azureus.core.cnetwork

Examples of com.aelitis.azureus.core.cnetwork.ContentNetwork


  public long getContentNetworkID() {
    return contentNetworkID;
  }
 
  public ContentNetwork getContentNetwork() {
    ContentNetwork cn = ContentNetworkManagerFactory.getSingleton().getContentNetwork(contentNetworkID);
    if (cn == null) {
      cn = ConstantsVuze.getDefaultContentNetwork();
    }
    return cn;
  }
View Full Code Here


             
              // Content Network of context is invalid because it's the
              // internal one used for anythin. Get network id from params instead
              long contentNetworkID = MapUtils.getMapLong(decodedMap,
                  "content-network", ConstantsVuze.getDefaultContentNetwork().getID());
              ContentNetwork cn = ContentNetworkManagerFactory.getSingleton().getContentNetwork(contentNetworkID);
              if (cn == null) {
                cn = ConstantsVuze.getDefaultContentNetwork();
              }

              DownloadUrlInfo dlInfo = new DownloadUrlInfoContentNetwork(url,
View Full Code Here

      String torrentUrl    = (String) decodedMap.get( "torrent_url" );
      String referer_str  = (String) decodedMap.get( "referer_url" );
     
      if ( UrlFilter.getInstance().isWhitelisted( torrentUrl )){
       
        ContentNetwork cn = ContentNetworkManagerFactory.getSingleton().getContentNetworkForURL( torrentUrl );
       
        if ( cn == null ){
         
          cn = ConstantsVuze.getDefaultContentNetwork();
        }
       
        torrentUrl = cn.appendURLSuffix( torrentUrl, false, true );
      }
     
      try {
     
        Map headers = UrlUtils.getBrowserHeaders( referer_str );
View Full Code Here

    // Build base RPC url based on listener and server

    // one day all this URL hacking should be moved into the ContentNetwork...

    ContentNetwork cn = ContentNetworkManagerFactory.getSingleton().getContentNetwork(
        contentNetworkID);
    if (cn == null) {
      cn = ConstantsVuze.getDefaultContentNetwork();
    }

    String sURL_RPC = ContentNetworkUtils.getUrl(cn, ContentNetwork.SERVICE_RPC)
          + "&" + urlStem.toString();

    // Build full url and data to send
    String sURL;
    String sPostData = null;
    String sJSONPayload = UrlUtils.encode(JSONUtils.encodeToJSON(mapPayload));
    if (USE_HTTP_POST) {
      sURL = sURL_RPC;

      sPostData = URL_POST_PLATFORM_DATA + "&payload=" + sJSONPayload;
      sPostData = cn.appendURLSuffix(sPostData, true, sendAZID);

      if (DEBUG_URL) {
        debug("POST for " + mapProcessing.size() + ": " + sURL + "\n   DATA: "
            + sPostData);
      } else {
        debug("POST for " + mapProcessing.size() + ": " + sURL);
      }
    } else {
      sURL = sURL_RPC + URL_PLATFORM_MESSAGE + "&payload=" + sJSONPayload;

      sURL = cn.appendURLSuffix(sURL, false, sendAZID);

      if (DEBUG_URL) {
        debug("GET: " + sURL);
      } else {
        debug("GET: " + sURL_RPC + URL_PLATFORM_MESSAGE);
View Full Code Here

      return;
    }

    if ( UrlFilter.getInstance().isWhitelisted( download_link )){
     
      ContentNetwork cn = ContentNetworkManagerFactory.getSingleton().getContentNetworkForURL( download_link );
     
      if ( cn == null ){
       
        cn = ConstantsVuze.getDefaultContentNetwork();
      }
     
      download_link = cn.appendURLSuffix( download_link, false, true );
    }
   
    final String  key = subs.getID() + ":" + result.getID();
    final String  dl  = download_link;
   
View Full Code Here

  public static void login(long contentNetworkID, long maxDelayMS) {
    PlatformManager pm = PlatformManagerFactory.getPlatformManager();
   
    String sourceRef = null;
    if (contentNetworkID != ConstantsVuze.DEFAULT_CONTENT_NETWORK_ID) {
      ContentNetwork cn = ContentNetworkManagerFactory.getSingleton().getContentNetwork(contentNetworkID);
      sourceRef = (String) cn.getPersistentProperty(ContentNetwork.PP_SOURCE_REF);
    }
    if (sourceRef == null) {
      sourceRef = "unknown";
    }
View Full Code Here

                    try{
                        // change here as we always add all networks upfront so
                        // we always set the customisation flag regardless of
                        // whether existing or not
                     
                      ContentNetwork imported = importNetwork( comp.getContent());
                     
                      imported.setPersistentProperty( ContentNetwork.PP_IS_CUSTOMIZATION, true );
                     
                      comp.setProcessed();
                     
                    }catch( Throwable e ){
                     
View Full Code Here

         
          for ( contentNetworkDetails details: cnets ){
         
            str += (str.length()==0?"":", ") + details.getString();
           
            ContentNetwork existing = getContentNetwork( details.getID());
           
            if ( existing != null ){
             
              ContentNetworkImpl new_net = createNetwork( details );
             
View Full Code Here

      context.addMessageListener(new DisplayListener(mainBrowser));
      context.addMessageListener(new ConfigListener(mainBrowser));
      context.addMessageListener(
          new MetaSearchListener( this ));
     
      ContentNetwork contentNetwork = ContentNetworkManagerFactory.getSingleton().getContentNetwork(
          context.getContentNetworkID());
      // contentNetwork won't be null because a new browser context
      // has the default content network
     
      String url = contentNetwork.getSubscriptionURL(subs.getID());
       
      Boolean  edit_mode = (Boolean)subs.getUserData( SubscriptionManagerUI.SUB_EDIT_MODE_KEY );
     
      if ( edit_mode != null ){
     
View Full Code Here

        boolean showWelcome = COConfigurationManager.getBooleanParameter("v3.Show Welcome");
        if (ConfigurationChecker.isNewVersion()) {
          showWelcome = true;
        }

        ContentNetwork startupCN = ContentNetworkManagerFactory.getSingleton().getStartupContentNetwork();
        if (!startupCN.isServiceSupported(ContentNetwork.SERVICE_WELCOME)) {
          showWelcome = false;
        }

        if (showWelcome) {
          startTab = SideBar.SIDEBAR_SECTION_WELCOME;
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.cnetwork.ContentNetwork

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.