package com.dounine.japi;

import com.dounine.japi.core.IConfig;
import com.dounine.japi.core.IProject;
import com.dounine.japi.core.impl.ConfigImpl;
import com.dounine.japi.core.impl.ProjectImpl;

import java.util.Arrays;
import java.util.List;

/**
 * Created by lake on 17-2-23.
 */
public class JapiClient {

    private static final JapiClient JAPI_CLIENT = new JapiClient();

    private ConfigImpl config = new ConfigImpl();
    private boolean useCache = false;
    private JapiClient(){}

    public static final IConfig getConfig(){
        return JAPI_CLIENT.config;
    }

    public static void main(String[] args) {
        JapiClient.setProjectJavaPath("/home/lake/github/japi/java/client/src/main/java");
        JapiClient.setActionReletivePath("com/dounine/japi/core/action");
        JapiClient.setIncludeProjectJavaPath(new String[]{"/home/lake/github/japi/java/api/src/main/java"});
        JapiClient.setIncludePackages(new String[]{"com.dounine.japi"});//可以准确快速搜索
        JapiClient.setUseCache(false);//

        IProject project = ProjectImpl.init();
        JapiClientStorage japiClientStorage = JapiClientStorage.getInstance();
        japiClientStorage.setProject(project);
        japiClientStorage.autoSaveToDisk();
        new JapiClientTransfer().autoTransfer(japiClientStorage);
    }

    public static void setProjectJavaPath(String projectJavaPath) {
        JAPI_CLIENT.config.setProjectJavaPath(projectJavaPath);
    }

    public static void setActionReletivePath(String actionReletivePath) {
        JAPI_CLIENT.config.setActionReletivePath(actionReletivePath);
    }

    public  static void setIncludeProjectJavaPath(List<String> includeProjectJavaPath) {
        JAPI_CLIENT.config.setIncludeProjectJavaPath(includeProjectJavaPath);
    }

    public static void setIncludePackages(String[] includePackages) {
        JAPI_CLIENT.config.setIncludePackages(includePackages);
    }

    public static void setIncludeProjectJavaPath(String[] includeProjectJavaPath) {
        if(null!=includeProjectJavaPath){
            JAPI_CLIENT.config.setIncludeProjectJavaPath(Arrays.asList(includeProjectJavaPath));
        }
    }


    public static void setUseCache(boolean useCache) {
        JAPI_CLIENT.useCache = useCache;
    }
    public static boolean isUseCache(){
        return JAPI_CLIENT.useCache;
    }
}

@@ -1304,32 +1304,93 @@
 torage);%0A    %7D%0A%0A
+    /**%0A     * %E8%AE%BE%E7%BD%AE%E4%B8%BB%E9%A1%B9%E7%9B%AE%E5%9C%B0%E6%89%AF%0A     * @param projectJavaPath%0A     */%0A
     public stati
@@ -1504,32 +1504,117 @@
 vaPath);%0A    %7D%0A%0A
+    /**%0A     * pringmvc action reletivePath%0A     * @param actionReletivePath%0A     */%0A
     public stati

add method doc