Examples of preserve()


Examples of de.innovationgate.wgpublisher.expressions.tmlscript.ThreadLocalPreserver.preserve()

        // Use Context Redirector as scope, so the objects implicit context always directs to the current script's context
        ContextRedirector redirector = new ContextRedirector();
       
        // Preserve thread locals
        ThreadLocalPreserver preserver = new ThreadLocalPreserver((RhinoContext) cx);
        preserver.preserve(RhinoExpressionEngine.TL_ACTIONDEFINITION, action);
        preserver.preserve(RhinoExpressionEngine.TL_SCRIPTNAME, "TMLScript-Object " + action.getModuleDatabase() + "/" + action.getModuleName());;
        try {
            Function func = runtime.getCompiledFunction(action.getCode(), (RhinoContext) cx, redirector);
            func.put(RhinoExpressionEngine.PARAM_ACTIONDEFINITION, func, action);
            return func;
View Full Code Here

Examples of de.innovationgate.wgpublisher.expressions.tmlscript.ThreadLocalPreserver.preserve()

        ContextRedirector redirector = new ContextRedirector();
       
        // Preserve thread locals
        ThreadLocalPreserver preserver = new ThreadLocalPreserver((RhinoContext) cx);
        preserver.preserve(RhinoExpressionEngine.TL_ACTIONDEFINITION, action);
        preserver.preserve(RhinoExpressionEngine.TL_SCRIPTNAME, "TMLScript-Object " + action.getModuleDatabase() + "/" + action.getModuleName());;
        try {
            Function func = runtime.getCompiledFunction(action.getCode(), (RhinoContext) cx, redirector);
            func.put(RhinoExpressionEngine.PARAM_ACTIONDEFINITION, func, action);
            return func;
        }
View Full Code Here

Examples of de.innovationgate.wgpublisher.expressions.tmlscript.ThreadLocalPreserver.preserve()

        // Use Context Redirector as scope, so the objects implicit context always directs to the current script's context
        ContextRedirector redirector = new ContextRedirector();
       
        // Preserve thread locals
        ThreadLocalPreserver preserver = new ThreadLocalPreserver((RhinoContext) cx);
        preserver.preserve(RhinoExpressionEngine.TL_ACTIONDEFINITION, action);
        preserver.preserve(RhinoExpressionEngine.TL_SCRIPTNAME, "TMLScript-Object " + action.getModuleDatabase() + "/" + action.getModuleName());;
        try {
            Function func = runtime.getCompiledFunction(action.getCode(), (RhinoContext) cx, redirector);
            func.put(RhinoExpressionEngine.PARAM_ACTIONDEFINITION, func, action);
            return func;
View Full Code Here

Examples of de.innovationgate.wgpublisher.expressions.tmlscript.ThreadLocalPreserver.preserve()

        ContextRedirector redirector = new ContextRedirector();
       
        // Preserve thread locals
        ThreadLocalPreserver preserver = new ThreadLocalPreserver((RhinoContext) cx);
        preserver.preserve(RhinoExpressionEngine.TL_ACTIONDEFINITION, action);
        preserver.preserve(RhinoExpressionEngine.TL_SCRIPTNAME, "TMLScript-Object " + action.getModuleDatabase() + "/" + action.getModuleName());;
        try {
            Function func = runtime.getCompiledFunction(action.getCode(), (RhinoContext) cx, redirector);
            func.put(RhinoExpressionEngine.PARAM_ACTIONDEFINITION, func, action);
            return func;
        }
View Full Code Here

Examples of de.innovationgate.wgpublisher.webtml.utils.TMLOptionPreserver.preserve()

      }
     
      // Temporarily set portlet namespace, WebTML scope
      BaseTagStatus tag = getTMLContext().getDesignContext().getTag();
      TMLOptionPreserver preserver = new TMLOptionPreserver(tag);
       preserver.preserve(Base.OPTION_PORTLET_NAMESPACE, actionLink.getPortletKey());
        preserver.preserve(Base.OPTION_WEBTML_SCOPE, actionLink.getWebtmlScope());
     
        try {
        // Inner call, depends, if this a default action or not
        if (actionLink.isDefaultAction()) {
View Full Code Here

Examples of de.innovationgate.wgpublisher.webtml.utils.TMLOptionPreserver.preserve()

     
      // Temporarily set portlet namespace, WebTML scope
      BaseTagStatus tag = getTMLContext().getDesignContext().getTag();
      TMLOptionPreserver preserver = new TMLOptionPreserver(tag);
       preserver.preserve(Base.OPTION_PORTLET_NAMESPACE, actionLink.getPortletKey());
        preserver.preserve(Base.OPTION_WEBTML_SCOPE, actionLink.getWebtmlScope());
     
        try {
        // Inner call, depends, if this a default action or not
        if (actionLink.isDefaultAction()) {
          actionContext.callDefaultAction(actionLink.getDefaultAction(), params);
View Full Code Here

Examples of org.apache.hadoop.tools.DistCpOptions.preserve()

      sourceBase = TestDistCpUtils.createTestSetup(fs, sourcePerm);
      targetBase = TestDistCpUtils.createTestSetup(fs, initialPerm);

      DistCpOptions options = new DistCpOptions(Arrays.asList(new Path(sourceBase)),
          new Path("/out"));
      options.preserve(FileAttribute.PERMISSION);
      options.appendToConf(conf);
      options.setTargetPathExists(false);
     
      CopyListing listing = new GlobbedCopyListing(conf, CREDENTIALS);
      Path listingFile = new Path("/tmp1/" + String.valueOf(rand.nextLong()));
View Full Code Here

Examples of org.apache.hadoop.tools.DistCpOptions.preserve()

    options = OptionsParser.parse(new String[] {
        "-f",
        "hdfs://localhost:8020/source/first",
        "hdfs://localhost:8020/target/"});
    Assert.assertFalse(options.shouldPreserve(FileAttribute.PERMISSION));
    options.preserve(FileAttribute.PERMISSION);
    Assert.assertTrue(options.shouldPreserve(FileAttribute.PERMISSION));

    options.preserve(FileAttribute.PERMISSION);
    Assert.assertTrue(options.shouldPreserve(FileAttribute.PERMISSION));
  }
View Full Code Here

Examples of org.apache.hadoop.tools.DistCpOptions.preserve()

        "hdfs://localhost:8020/target/"});
    Assert.assertFalse(options.shouldPreserve(FileAttribute.PERMISSION));
    options.preserve(FileAttribute.PERMISSION);
    Assert.assertTrue(options.shouldPreserve(FileAttribute.PERMISSION));

    options.preserve(FileAttribute.PERMISSION);
    Assert.assertTrue(options.shouldPreserve(FileAttribute.PERMISSION));
  }

  @Test
  public void testOptionsSwitchAddToConf() {
View Full Code Here

Examples of org.apache.hadoop.tools.DistCpOptions.preserve()

    options = OptionsParser.parse(new String[] {
        "-f",
        "hdfs://localhost:8020/source/first",
        "hdfs://localhost:8020/target/"});
    Assert.assertFalse(options.shouldPreserve(FileAttribute.PERMISSION));
    options.preserve(FileAttribute.PERMISSION);
    Assert.assertTrue(options.shouldPreserve(FileAttribute.PERMISSION));

    options.preserve(FileAttribute.PERMISSION);
    Assert.assertTrue(options.shouldPreserve(FileAttribute.PERMISSION));
  }
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.