Package anvil.script

Examples of anvil.script.Module


  public Product resolveProduct(String filename) throws Throwable
  {
    Zone zone = resolveZone(filename);
    Address address = zone.resolve(filename);
    Module script = getCache().load(address).getModule();
    return new Product(address, System.out, script);
 
View Full Code Here


      server.configure(logprefs);
      server.start();

      Zone zone = server.resolveZone(filename);
      Address address = zone.resolve(filename);
      Module script = server.getCache().load(address).getModule();
      Product product = new Product(address, System.out, script);
      Array arguments = new Array();
      while(index < length) {
        arguments.append(new AnyString(args[index++]));
      }
View Full Code Here

  /// Returns the compiled script for this envelope.
  /// @synopsis Scope getModule()
  /// @throws AccessDenied if security policy denies this operation
  public Any m_getModule(Context context)
  {
    Module script = _envelope.getModule();
    context.checkImport(script.getPathinfo());
    return new anvil.core.runtime.AnyScope(script);
  }
View Full Code Here

        scriptOutput = finalOutput;
      }

      anvil.core.net.AnyContext anyContext = new anvil.core.net.AnyContext(context);
      context.getResponse().setHeader("Cache-Control", "no-cache");
      Module script = zone.getServer().getCache().load(context.getAddress()).getModule();
      Product product = new Product(
        context.getAddress(), scriptOutput, context.getCitizen(), script);
      try {
        product.forge("service", anyContext);
      } finally {
View Full Code Here

  /// @return Instance of module
  public static final Object[] p_getModule = { null, "*frame", new Integer(-1) };
  public static final Any getModule(Context context, int frame)
  {
    context.checkAccess(CAN_READ);
    Module script = null;
    if (frame == -1) {
      script = context.script();
    } else {
      if (frame >= 0 && frame < context.size()) {
        script = context.peek(frame).getModule();
      } else {
        return Any.UNDEFINED;
      }
    }
    context.checkImport(script.getPathinfo());
    return new AnyScope(script);
  }
View Full Code Here

  private void redirectLogin(Context context) {
    try {
      AnyContext anyContext = new AnyContext(context);
      context.getResponse().setHeader("Cache-Control", "no-cache");
      Zone zone = context.getZone();
      Module script = zone.getServer().getCache().load(zone.resolve(loginPath)).getModule();
      Product product = new Product(
        context.getAddress(), context.getOutputStream(), context.getCitizen(), script);
      try {
        product.forge("service", anyContext);
      } finally {
View Full Code Here

  {
    context.checkAccess(anvil.core.system.AnyConfigurable.CAN_READ);
    Type type = _type;
    while(type != null) {
      if (type instanceof Module) {
        Module script = (Module)type;
        Address addr = script.getAddress();
        if (addr != null) {
          return new anvil.core.system.AnyConfigurable(addr.getZone());
        }
      }
      type = type.getParent();
View Full Code Here

TOP

Related Classes of anvil.script.Module

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.