Package railo.runtime.rest

Examples of railo.runtime.rest.Mapping


    ConfigWebImpl config=(ConfigWebImpl) pc.getConfig();

    try {
      ConfigWebAdmin admin = ConfigWebAdmin.newInstance((ConfigWebImpl)pc.getConfig(),webAdminPassword);
      Mapping[] mappings = config.getRestMappings();
      Mapping mapping;
      for(int i=0;i<mappings.length;i++){
        mapping=mappings[i];
        if(RestUtil.isMatch(pc,mapping,dir)){
          admin.removeRestMapping(mapping.getVirtual());
          admin.store();
        }
      }
    }
      catch (Exception e) {
View Full Code Here


    }
    Resource dir=RestDeleteApplication.toResource(pc,dirPath);
   
    ConfigWebImpl config=(ConfigWebImpl) pc.getConfig();
    Mapping[] mappings = config.getRestMappings();
    Mapping mapping;
   
    // id is mapping name
   
    String virtual=serviceMapping.trim();
    if(!virtual.startsWith("/")) virtual="/"+virtual;
    if(!virtual.endsWith("/")) virtual+="/";
    boolean hasResetted=false;
    for(int i=0;i<mappings.length;i++){
      mapping=mappings[i];
      if(mapping.getVirtualWithSlash().equals(virtual)){
        // directory has changed
        if(!RestUtil.isMatch(pc, mapping, dir) || (defaultMapping!=null && mapping.isDefault()!=defaultMapping.booleanValue())) {
          update(pc,dir,virtual,RestDeleteApplication.getPassword(pc,webAdminPassword),defaultMapping==null?mapping.isDefault():defaultMapping.booleanValue());
        }
        mapping.reset(pc);
        hasResetted=true;
      }
    }
    if(!hasResetted) {
      update(pc,dir,virtual,RestDeleteApplication.getPassword(pc,webAdminPassword),defaultMapping==null?false:defaultMapping.booleanValue());
View Full Code Here

TOP

Related Classes of railo.runtime.rest.Mapping

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.