Package com.bj58.spat.gaea.server.core.proxy

Examples of com.bj58.spat.gaea.server.core.proxy.SyncInvokerHandle


     */
    @Path("post-upload.html")
    @POST  // 只处理post的请求
    public ActionResult postUpload() {

        BeatContext beat = beat();

        ClientContext client = beat.getClient();

        Preconditions.checkState(Strings.isNullOrEmpty(client.form("company")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.form("address")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.form("file")));

        client.queryString("name");

        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("name")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("phone")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("submit")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("file")));


        Upload upload = client.getUpload("file");


        beat.getModel()
                .add("company", client.queryString("company"))
                .add("address", client.queryString("address"))

                .add("name", client.form("name"))
                .add("phone", client.form("phone"))
View Full Code Here


    public ActionInfo(ControllerInfo controllerInfo, Method method, Argo argo) {
        this.controllerInfo = controllerInfo;
        this.method = method;
        this.argo = argo;

        Path path = AnnotationUtils.findAnnotation(method, Path.class);
        this.order = path.order();

        this.pathPattern = simplyPathPattern(controllerInfo, path);

        this.paramTypes = ImmutableList.copyOf(method.getParameterTypes());
        this.paramNames = ImmutableList.copyOf(ClassUtils.getMethodParamNames(controllerInfo.getClazz(), method));
View Full Code Here

    @POST  // 只处理post的请求
    public ActionResult postForm() {

        BeatContext beat = beat();

        ClientContext client = beat.getClient();

        Preconditions.checkState(Strings.isNullOrEmpty(client.form("company")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.form("address")));

        client.queryString("name");

        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("name")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("phone")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("submit")));


        beat.getModel()
                .add("company", client.queryString("company"))
                .add("address", client.queryString("address"))

                .add("name", client.form("name"))
                .add("phone", client.form("phone"))
                .add("submit", client.form("submit"));


        return view("post"); // resources/views/post.html velocity模板

    }
View Full Code Here

    @POST  // 只处理post的请求
    public ActionResult postUpload() {

        BeatContext beat = beat();

        ClientContext client = beat.getClient();

        Preconditions.checkState(Strings.isNullOrEmpty(client.form("company")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.form("address")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.form("file")));

        client.queryString("name");

        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("name")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("phone")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("submit")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("file")));


        Upload upload = client.getUpload("file");


        beat.getModel()
                .add("company", client.queryString("company"))
                .add("address", client.queryString("address"))

                .add("name", client.form("name"))
                .add("phone", client.form("phone"))
                .add("submit", client.form("submit"))

                .add("upload", upload);


View Full Code Here

            if (part == null)
                continue;
            MultiPartInputStreamParser.MultiPart mp = (MultiPartInputStreamParser.MultiPart) part;

            Upload upload = wrapPart(part, mp.getContentDispositionFilename());

            originPartMultiMapBuilder.put(part.getName(), upload);


View Full Code Here

        return safeParameter;

    }

    private Upload wrapPart(final Part part, final String filename) {
        return new Upload() {
            @Override
            public String getFileName() {
                return filename; // header: filename
            }
View Full Code Here

        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("phone")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("submit")));
        Preconditions.checkState(Strings.isNullOrEmpty(client.queryString("file")));


        Upload upload = client.getUpload("file");


        beat.getModel()
                .add("company", client.queryString("company"))
                .add("address", client.queryString("address"))
View Full Code Here

public class ArgoDispatcherFactory {

    public static ArgoDispatcher create(ServletContext servletContext){

        // xxx:这是一处硬编码
        GroupConvention groupConvention = GroupConventionFactory.getGroupConvention();

        return Argo.instance.init(servletContext, groupConvention);

    }
View Full Code Here

        this.groupConvention = groupConvention;
        this.controllerClasses = groupConvention.currentProject().controllerClasses();
        this.currentFolder = innerCurrentFolder();

        List<Module> modules = Lists.newArrayList();
        modules.add(new ArgoModule(this));


        Module groupModule = groupConvention.group().module();
        if (null != groupModule)
            modules.add(groupModule);
View Full Code Here

    List<PostInterceptor> getPostInterceptorList( List<InterceptorInfo> interceptorInfoList) {

        ImmutableList.Builder<PostInterceptor> builder = ImmutableList.builder();

        for(InterceptorInfo interceptorInfo : interceptorInfoList) {
            PostInterceptor postInterceptor = interceptorInfo.getPostInterceptor();
            if (postInterceptor != null)
                builder.add(postInterceptor);
        }

        //反转,对于post先执行排序高的,再执行排序低的
View Full Code Here

TOP

Related Classes of com.bj58.spat.gaea.server.core.proxy.SyncInvokerHandle

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.