org.cruxframework.crux.core.rebind.offline
Class AppCacheLinker

java.lang.Object
  extended by com.google.gwt.core.ext.Linker
      extended by com.google.gwt.core.ext.linker.AbstractLinker
          extended by org.cruxframework.crux.core.rebind.offline.AppCacheLinker

@LinkerOrder(value=POST)
@Shardable
public class AppCacheLinker
extends com.google.gwt.core.ext.linker.AbstractLinker

A GWT linker that produces an offline.appcache file describing what to cache in the application cache. It produces one appcache file for each permutation.

Author:
Thiago da Rosa de Bustamante

Constructor Summary
AppCacheLinker()
           
 
Method Summary
 String getDescription()
           
 org.cruxframework.crux.core.rebind.offline.ArtifactsGroup getGroup(com.google.gwt.core.ext.linker.ArtifactSet artifacts)
           
protected  String getJsProcessMetas(com.google.gwt.core.ext.LinkerContext context)
          Returns the name of the JsProcessMetas script.
static String getManifestName(com.google.gwt.core.ext.linker.ArtifactSet artifacts)
           
protected  String getOfflinePageTemplate(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.LinkerContext context)
           
protected  String getPageLoadFunction(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.LinkerContext context)
           
protected  String getSelectionScriptTemplate(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.LinkerContext context)
           
 com.google.gwt.core.ext.linker.ArtifactSet link(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.LinkerContext context, com.google.gwt.core.ext.linker.ArtifactSet artifacts, boolean onePermutation)
           
protected  StringBuffer readFileToStringBuffer(String filename, com.google.gwt.core.ext.TreeLogger logger)
           
protected static void replaceAll(StringBuffer buf, String search, String replace)
           
 
Methods inherited from class com.google.gwt.core.ext.linker.AbstractLinker
emitBytes, emitBytes, emitInputStream, emitInputStream, emitString, emitString, emitWithStrongName, emitWithStrongName
 
Methods inherited from class com.google.gwt.core.ext.Linker
isShardable, link, relink, supportsDevModeInJunit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppCacheLinker

public AppCacheLinker()
Method Detail

getDescription

public String getDescription()
Specified by:
getDescription in class com.google.gwt.core.ext.Linker

link

public com.google.gwt.core.ext.linker.ArtifactSet link(com.google.gwt.core.ext.TreeLogger logger,
                                                       com.google.gwt.core.ext.LinkerContext context,
                                                       com.google.gwt.core.ext.linker.ArtifactSet artifacts,
                                                       boolean onePermutation)
                                                throws com.google.gwt.core.ext.UnableToCompleteException
Overrides:
link in class com.google.gwt.core.ext.Linker
Throws:
com.google.gwt.core.ext.UnableToCompleteException

readFileToStringBuffer

protected StringBuffer readFileToStringBuffer(String filename,
                                              com.google.gwt.core.ext.TreeLogger logger)
                                       throws com.google.gwt.core.ext.UnableToCompleteException
Throws:
com.google.gwt.core.ext.UnableToCompleteException

replaceAll

protected static void replaceAll(StringBuffer buf,
                                 String search,
                                 String replace)

getJsProcessMetas

protected String getJsProcessMetas(com.google.gwt.core.ext.LinkerContext context)
Returns the name of the JsProcessMetas script. By default, returns "com/google/gwt/core/ext/linker/impl/processMetas.js".

Parameters:
context - a LinkerContext

getSelectionScriptTemplate

protected String getSelectionScriptTemplate(com.google.gwt.core.ext.TreeLogger logger,
                                            com.google.gwt.core.ext.LinkerContext context)

getPageLoadFunction

protected String getPageLoadFunction(com.google.gwt.core.ext.TreeLogger logger,
                                     com.google.gwt.core.ext.LinkerContext context)

getOfflinePageTemplate

protected String getOfflinePageTemplate(com.google.gwt.core.ext.TreeLogger logger,
                                        com.google.gwt.core.ext.LinkerContext context)

getManifestName

public static String getManifestName(com.google.gwt.core.ext.linker.ArtifactSet artifacts)

getGroup

public org.cruxframework.crux.core.rebind.offline.ArtifactsGroup getGroup(com.google.gwt.core.ext.linker.ArtifactSet artifacts)


Copyright © 2014. All rights reserved.