kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luke...@apache.org
Subject [03/51] [partial] incubator-kylin git commit: cleanup for migration from github.com
Date Wed, 14 Jan 2015 14:15:38 GMT
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/model/SelectedColumnMeta.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/model/SelectedColumnMeta.java b/server/src/main/java/com/kylinolap/rest/model/SelectedColumnMeta.java
deleted file mode 100644
index 28c5260..0000000
--- a/server/src/main/java/com/kylinolap/rest/model/SelectedColumnMeta.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.kylinolap.rest.model;
-
-/**
- * Created by lukhan on 2/27/14.
- */
-public class SelectedColumnMeta {
-    public SelectedColumnMeta(boolean isAutoIncrement, boolean isCaseSensitive, boolean isSearchable, boolean isCurrency, int isNullalbe, boolean isSigned, int displaySize, String label, String name, String schemaName, String catelogName, String tableName, int precision, int scale, int columnType, String columnTypeName, boolean isReadOnly, boolean isWritable, boolean isDefinitelyWritable) {
-        super();
-        this.isAutoIncrement = isAutoIncrement;
-        this.isCaseSensitive = isCaseSensitive;
-        this.isSearchable = isSearchable;
-        this.isCurrency = isCurrency;
-        this.isNullable = isNullalbe;
-        this.isSigned = isSigned;
-        this.displaySize = displaySize;
-        this.label = label;
-        this.name = name;
-        this.schemaName = schemaName;
-        this.catelogName = catelogName;
-        this.tableName = tableName;
-        this.precision = precision;
-        this.scale = scale;
-        this.columnType = columnType;
-        this.columnTypeName = columnTypeName;
-        this.isReadOnly = isReadOnly;
-        this.isWritable = isWritable;
-        this.isDefinitelyWritable = isDefinitelyWritable;
-    }
-
-    public boolean isAutoIncrement() {
-        return isAutoIncrement;
-    }
-
-    public boolean isCaseSensitive() {
-        return isCaseSensitive;
-    }
-
-    public boolean isSearchable() {
-        return isSearchable;
-    }
-
-    public boolean isCurrency() {
-        return isCurrency;
-    }
-
-    public int getIsNullable() {
-        return isNullable;
-    }
-
-    public boolean isSigned() {
-        return isSigned;
-    }
-
-    public int getDisplaySize() {
-        return displaySize;
-    }
-
-    public String getLabel() {
-        return label;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getSchemaName() {
-        return schemaName;
-    }
-
-    public String getCatelogName() {
-        return catelogName;
-    }
-
-    public String getTableName() {
-        return tableName;
-    }
-
-    public int getPrecision() {
-        return precision;
-    }
-
-    public int getScale() {
-        return scale;
-    }
-
-    public int getColumnType() {
-        return columnType;
-    }
-
-    public String getColumnTypeName() {
-        return columnTypeName;
-    }
-
-    public boolean isReadOnly() {
-        return isReadOnly;
-    }
-
-    public boolean isWritable() {
-        return isWritable;
-    }
-
-    public boolean isDefinitelyWritable() {
-        return isDefinitelyWritable;
-    }
-
-    private final boolean isAutoIncrement;
-    private final boolean isCaseSensitive;
-    private final boolean isSearchable;
-    private final boolean isCurrency;
-    private final int isNullable;// 0:nonull, 1:nullable, 2: nullableunknown
-    private final boolean isSigned;
-    private final int displaySize;
-    private final String label;// AS keyword
-    private final String name;
-    private final String schemaName;
-    private final String catelogName;
-    private final String tableName;
-    private final int precision;
-    private final int scale;
-    private final int columnType;// as defined in java.sql.Types
-    private final String columnTypeName;
-    private final boolean isReadOnly;
-    private final boolean isWritable;
-    private final boolean isDefinitelyWritable;
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/model/TableMeta.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/model/TableMeta.java b/server/src/main/java/com/kylinolap/rest/model/TableMeta.java
deleted file mode 100644
index 98580f4..0000000
--- a/server/src/main/java/com/kylinolap/rest/model/TableMeta.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.kylinolap.rest.model;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by lukhan on 2/27/14.
- */
-public class TableMeta implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-    private String TABLE_CAT;
-    private String TABLE_SCHEM;
-    private String TABLE_NAME;
-    private String TABLE_TYPE;
-    private String REMARKS;
-    private String TYPE_CAT;
-    private String TYPE_SCHEM;
-    private String TYPE_NAME;
-    private String SELF_REFERENCING_COL_NAME;
-    private String REF_GENERATION;
-    private List<ColumnMeta> columns = new ArrayList<ColumnMeta>();
-
-    public TableMeta() {
-    }
-
-    public TableMeta(String tABLE_CAT, String tABLE_SCHEM, String tABLE_NAME, String tABLE_TYPE, String rEMARKS, String tYPE_CAT, String tYPE_SCHEM, String tYPE_NAME, String sELF_REFERENCING_COL_NAME, String rEF_GENERATION) {
-        super();
-        TABLE_CAT = tABLE_CAT;
-        TABLE_SCHEM = tABLE_SCHEM;
-        TABLE_NAME = tABLE_NAME;
-        TABLE_TYPE = tABLE_TYPE;
-        REMARKS = rEMARKS;
-        TYPE_CAT = tYPE_CAT;
-        TYPE_SCHEM = tYPE_SCHEM;
-        TYPE_NAME = tYPE_NAME;
-        SELF_REFERENCING_COL_NAME = sELF_REFERENCING_COL_NAME;
-        REF_GENERATION = rEF_GENERATION;
-    }
-
-    public String getTABLE_CAT() {
-        return TABLE_CAT;
-    }
-
-    public void setTABLE_CAT(String tABLE_CAT) {
-        TABLE_CAT = tABLE_CAT;
-    }
-
-    public String getTABLE_SCHEM() {
-        return TABLE_SCHEM;
-    }
-
-    public void setTABLE_SCHEM(String tABLE_SCHEM) {
-        TABLE_SCHEM = tABLE_SCHEM;
-    }
-
-    public String getTABLE_NAME() {
-        return TABLE_NAME;
-    }
-
-    public void setTABLE_NAME(String tABLE_NAME) {
-        TABLE_NAME = tABLE_NAME;
-    }
-
-    public String getTABLE_TYPE() {
-        return TABLE_TYPE;
-    }
-
-    public void setTABLE_TYPE(String tABLE_TYPE) {
-        TABLE_TYPE = tABLE_TYPE;
-    }
-
-    public String getREMARKS() {
-        return REMARKS;
-    }
-
-    public void setREMARKS(String rEMARKS) {
-        REMARKS = rEMARKS;
-    }
-
-    public String getTYPE_CAT() {
-        return TYPE_CAT;
-    }
-
-    public void setTYPE_CAT(String tYPE_CAT) {
-        TYPE_CAT = tYPE_CAT;
-    }
-
-    public String getTYPE_SCHEM() {
-        return TYPE_SCHEM;
-    }
-
-    public void setTYPE_SCHEM(String tYPE_SCHEM) {
-        TYPE_SCHEM = tYPE_SCHEM;
-    }
-
-    public String getTYPE_NAME() {
-        return TYPE_NAME;
-    }
-
-    public void setTYPE_NAME(String tYPE_NAME) {
-        TYPE_NAME = tYPE_NAME;
-    }
-
-    public String getSELF_REFERENCING_COL_NAME() {
-        return SELF_REFERENCING_COL_NAME;
-    }
-
-    public void setSELF_REFERENCING_COL_NAME(String sELF_REFERENCING_COL_NAME) {
-        SELF_REFERENCING_COL_NAME = sELF_REFERENCING_COL_NAME;
-    }
-
-    public String getREF_GENERATION() {
-        return REF_GENERATION;
-    }
-
-    public void setREF_GENERATION(String rEF_GENERATION) {
-        REF_GENERATION = rEF_GENERATION;
-    }
-
-    public List<ColumnMeta> getColumns() {
-        return columns;
-    }
-
-    public void setColumns(List<ColumnMeta> columns) {
-        this.columns = columns;
-    }
-
-    public void addColumn(ColumnMeta column) {
-        this.columns.add(column);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/AccessRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/AccessRequest.java b/server/src/main/java/com/kylinolap/rest/request/AccessRequest.java
deleted file mode 100644
index 220aaad..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/AccessRequest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.request;
-
-/**
- * @author xduo
- * 
- */
-public class AccessRequest {
-
-    private Long accessEntryId;
-    private String permission;
-    private String sid;
-    private boolean principal;
-
-    public AccessRequest() {
-    }
-
-    public Long getAccessEntryId() {
-        return accessEntryId;
-    }
-
-    public void setAccessEntryId(Long accessEntryId) {
-        this.accessEntryId = accessEntryId;
-    }
-
-    public String getPermission() {
-        return permission;
-    }
-
-    public void setPermission(String permission) {
-        this.permission = permission;
-    }
-
-    public String getSid() {
-        return sid;
-    }
-
-    public void setSid(String sid) {
-        this.sid = sid;
-    }
-
-    public boolean isPrincipal() {
-        return principal;
-    }
-
-    public void setPrincipal(boolean principal) {
-        this.principal = principal;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/CardinalityRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/CardinalityRequest.java b/server/src/main/java/com/kylinolap/rest/request/CardinalityRequest.java
deleted file mode 100644
index 06294f8..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/CardinalityRequest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.request;
-
-/**
- * @author jianliu
- * 
- */
-public class CardinalityRequest {
-    private int delimiter;
-
-    private int format;
-
-    /**
-     * @return the delimiter
-     */
-    public String getDelimiter() {
-        switch (delimiter) {
-        case 0:
-            return null;
-        case 1:
-            return "177";
-        case 2:
-            return "t";
-        default:
-            return null;
-        }
-    }
-
-    /**
-     * @param delimiter
-     *            the delimiter to set
-     */
-    public void setDelimiter(int delimiter) {
-        this.delimiter = delimiter;
-    }
-
-    /**
-     * @return the format
-     */
-    public String getFormat() {
-        switch (format) {
-        case 0:
-            return null;
-        case 1:
-            return "text";
-        case 2:
-            return "sequence";
-        default:
-            return null;
-        }
-    }
-
-    /**
-     * @param format
-     *            the format to set
-     */
-    public void setFormat(int format) {
-        this.format = format;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/CreateProjectRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/CreateProjectRequest.java b/server/src/main/java/com/kylinolap/rest/request/CreateProjectRequest.java
deleted file mode 100644
index 49c7f4a..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/CreateProjectRequest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.kylinolap.rest.request;
-
-/**
- * Created by honma on 8/7/14.
- */
-public class CreateProjectRequest {
-    private String name;
-    private String description;
-
-    public CreateProjectRequest() {
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/CubeRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/CubeRequest.java b/server/src/main/java/com/kylinolap/rest/request/CubeRequest.java
deleted file mode 100644
index 51151b7..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/CubeRequest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.kylinolap.rest.request;
-
-public class CubeRequest {
-
-    private String uuid;
-    private String cubeName;
-    private String cubeDescData;
-    private boolean successful;
-    private String message;
-    private String cubeDescName;
-    private String project;
-
-    public String getUuid() {
-        return uuid;
-    }
-
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-
-    /**
-     * @return the cubeDescName
-     */
-    public String getCubeDescName() {
-        return cubeDescName;
-    }
-
-    /**
-     * @param cubeDescName
-     *            the cubeDescName to set
-     */
-    public void setCubeDescName(String cubeDescName) {
-        this.cubeDescName = cubeDescName;
-    }
-
-    /**
-     * @return the message
-     */
-    public String getMessage() {
-        return message;
-    }
-
-    /**
-     * @param message
-     *            the message to set
-     */
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-    /**
-     * @return the status
-     */
-    public boolean getSuccessful() {
-        return successful;
-    }
-
-    /**
-     * @param status
-     *            the status to set
-     */
-    public void setSuccessful(boolean status) {
-        this.successful = status;
-    }
-
-    public CubeRequest() {
-    }
-
-    public CubeRequest(long id, String cubeName, String cubeDescData) {
-        this.cubeName = cubeName;
-        this.cubeDescData = cubeDescData;
-    }
-
-    public String getCubeDescData() {
-        return cubeDescData;
-    }
-
-    public void setCubeDescData(String cubeDescData) {
-        this.cubeDescData = cubeDescData;
-    }
-
-    /**
-     * @return the cubeDescName
-     */
-    public String getCubeName() {
-        return cubeName;
-    }
-
-    /**
-     * @param cubeName
-     *            the cubeDescName to set
-     */
-    public void setCubeName(String cubeName) {
-        this.cubeName = cubeName;
-    }
-
-    public String getProject() {
-        return project;
-    }
-
-    public void setProject(String project) {
-        this.project = project;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/JobBuildRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/JobBuildRequest.java b/server/src/main/java/com/kylinolap/rest/request/JobBuildRequest.java
deleted file mode 100644
index 77636d3..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/JobBuildRequest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.request;
-
-/**
- * @author xduo
- * 
- */
-public class JobBuildRequest {
-
-    private long startTime;
-
-    private long endTime;
-
-    private String buildType;
-
-    public long getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(long startTime) {
-        this.startTime = startTime;
-    }
-
-    public long getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(long endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getBuildType() {
-        return buildType;
-    }
-
-    public void setBuildType(String buildType) {
-        this.buildType = buildType;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/JobListRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/JobListRequest.java b/server/src/main/java/com/kylinolap/rest/request/JobListRequest.java
deleted file mode 100644
index bf82e97..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/JobListRequest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.request;
-
-import java.util.List;
-
-/**
- * @author xduo
- * 
- */
-public class JobListRequest {
-
-    private List<Integer> status;
-    private String cubeName;
-    private String projectName;
-    private Integer offset;
-    private Integer limit;
-
-    public JobListRequest() {
-    }
-
-    public List<Integer> getStatus() {
-        return status;
-    }
-
-    public void setStatus(List<Integer> status) {
-        this.status = status;
-    }
-
-    public String getCubeName() {
-        return cubeName;
-    }
-
-    public void setCubeName(String cubeName) {
-        this.cubeName = cubeName;
-    }
-
-    public String getProjectName() {
-        return projectName;
-    }
-
-    public void setProjectName(String projectName) {
-        this.projectName = projectName;
-    }
-
-    public Integer getOffset() {
-        return offset;
-    }
-
-    public void setOffset(Integer offset) {
-        this.offset = offset;
-    }
-
-    public Integer getLimit() {
-        return limit;
-    }
-
-    public void setLimit(Integer limit) {
-        this.limit = limit;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/MetaRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/MetaRequest.java b/server/src/main/java/com/kylinolap/rest/request/MetaRequest.java
deleted file mode 100644
index 511bce5..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/MetaRequest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.kylinolap.rest.request;
-
-/**
- * Created by honma on 7/10/14.
- */
-public class MetaRequest {
-
-    private String project;
-
-    public MetaRequest() {
-    }
-
-    public MetaRequest(String project) {
-        this.project = project;
-    }
-
-    public String getProject() {
-        return project;
-    }
-
-    public void setProject(String project) {
-        this.project = project;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/MetricsRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/MetricsRequest.java b/server/src/main/java/com/kylinolap/rest/request/MetricsRequest.java
deleted file mode 100644
index e2f3d7c..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/MetricsRequest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.request;
-
-import java.util.Date;
-
-/**
- * @author xduo
- * 
- */
-public class MetricsRequest {
-
-    private Date startTime;
-
-    private Date endTime;
-
-    private String account;
-
-    public Date getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(Date startTime) {
-        this.startTime = startTime;
-    }
-
-    public Date getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(Date endTime) {
-        this.endTime = endTime;
-    }
-
-    public String getAccount() {
-        return account;
-    }
-
-    public void setAccount(String account) {
-        this.account = account;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/PrepareSqlRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/PrepareSqlRequest.java b/server/src/main/java/com/kylinolap/rest/request/PrepareSqlRequest.java
deleted file mode 100644
index ae80d52..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/PrepareSqlRequest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.request;
-
-/**
- * @author xduo
- * 
- */
-public class PrepareSqlRequest extends SQLRequest {
-
-    public PrepareSqlRequest() {
-        super();
-    }
-
-    private StateParam[] params;
-
-    public StateParam[] getParams() {
-        return params;
-    }
-
-    public void setParams(StateParam[] params) {
-        this.params = params;
-    }
-
-    public static class StateParam {
-        private String className;
-        private String value;
-
-        public StateParam() {
-        }
-
-        public String getClassName() {
-            return className;
-        }
-
-        public void setClassName(String className) {
-            this.className = className;
-        }
-
-        public String getValue() {
-            return value;
-        }
-
-        public void setValue(String value) {
-            this.value = value;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/SQLRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/SQLRequest.java b/server/src/main/java/com/kylinolap/rest/request/SQLRequest.java
deleted file mode 100644
index f2b20eb..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/SQLRequest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.kylinolap.rest.request;
-
-public class SQLRequest {
-
-    private String sql;
-    private String project;
-    private Integer offset = 0;
-    private Integer limit = 0;
-    private boolean acceptPartial = true;
-
-    public SQLRequest() {
-    }
-
-    public String getProject() {
-        return project;
-    }
-
-    public void setProject(String project) {
-        this.project = project;
-    }
-
-    public String getSql() {
-        return sql;
-    }
-
-    public void setSql(String sql) {
-        this.sql = sql;
-    }
-
-    public Integer getOffset() {
-        return offset;
-    }
-
-    public void setOffset(Integer offset) {
-        this.offset = offset;
-    }
-
-    public Integer getLimit() {
-        return limit;
-    }
-
-    public void setLimit(Integer limit) {
-        this.limit = limit;
-    }
-
-    public boolean isAcceptPartial() {
-        return acceptPartial;
-    }
-
-    public void setAcceptPartial(boolean acceptPartial) {
-        this.acceptPartial = acceptPartial;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + (acceptPartial ? 1231 : 1237);
-        result = prime * result + ((offset == null) ? 0 : offset.hashCode());
-        result = prime * result + ((limit == null) ? 0 : limit.hashCode());
-        result = prime * result + ((project == null) ? 0 : project.hashCode());
-        result = prime * result + ((sql == null) ? 0 : sql.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        SQLRequest other = (SQLRequest) obj;
-        if (acceptPartial != other.acceptPartial)
-            return false;
-        if (offset == null) {
-            if (other.offset != null)
-                return false;
-        } else if (!offset.equals(other.offset))
-            return false;
-        if (limit == null) {
-            if (other.limit != null)
-                return false;
-        } else if (!limit.equals(other.limit))
-            return false;
-        if (project == null) {
-            if (other.project != null)
-                return false;
-        } else if (!project.equals(other.project))
-            return false;
-        if (sql == null) {
-            if (other.sql != null)
-                return false;
-        } else if (!sql.equals(other.sql))
-            return false;
-        return true;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/SaveSqlRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/SaveSqlRequest.java b/server/src/main/java/com/kylinolap/rest/request/SaveSqlRequest.java
deleted file mode 100644
index c7fef63..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/SaveSqlRequest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.request;
-
-/**
- * @author xduo
- * 
- */
-public class SaveSqlRequest {
-    private long id;
-    private String name;
-    private String sql;
-    private String project;
-    private String description;
-
-    public long getId() {
-        return id;
-    }
-
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getSql() {
-        return sql;
-    }
-
-    public void setSql(String sql) {
-        this.sql = sql;
-    }
-
-    public String getProject() {
-        return project;
-    }
-
-    public void setProject(String project) {
-        this.project = project;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/UpdateConfigRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/UpdateConfigRequest.java b/server/src/main/java/com/kylinolap/rest/request/UpdateConfigRequest.java
deleted file mode 100644
index fc1c37d..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/UpdateConfigRequest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.request;
-
-/**
- * @author xduo
- * 
- */
-public class UpdateConfigRequest {
-    private String key;
-
-    private String value;
-
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/request/UpdateProjectRequest.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/request/UpdateProjectRequest.java b/server/src/main/java/com/kylinolap/rest/request/UpdateProjectRequest.java
deleted file mode 100644
index e9d551f..0000000
--- a/server/src/main/java/com/kylinolap/rest/request/UpdateProjectRequest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.kylinolap.rest.request;
-
-/**
- * Created by honma on 8/7/14.
- */
-public class UpdateProjectRequest {
-    private String formerProjectName;
-    private String newProjectName;
-    private String newDescription;
-
-    public UpdateProjectRequest() {
-    }
-
-    public String getFormerProjectName() {
-        return formerProjectName;
-    }
-
-    public void setFormerProjectName(String formerProjectName) {
-
-        this.formerProjectName = formerProjectName;
-    }
-
-    public String getNewDescription() {
-        return newDescription;
-    }
-
-    public void setNewDescription(String newDescription) {
-        this.newDescription = newDescription;
-    }
-
-    public String getNewProjectName() {
-        return newProjectName;
-    }
-
-    public void setNewProjectName(String newProjectName) {
-        this.newProjectName = newProjectName;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/response/AccessEntryResponse.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/response/AccessEntryResponse.java b/server/src/main/java/com/kylinolap/rest/response/AccessEntryResponse.java
deleted file mode 100644
index 8c1790f..0000000
--- a/server/src/main/java/com/kylinolap/rest/response/AccessEntryResponse.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.response;
-
-import java.io.Serializable;
-
-import org.springframework.security.acls.model.Permission;
-import org.springframework.security.acls.model.Sid;
-import org.springframework.util.Assert;
-
-/**
- * @author xduo
- * 
- */
-public class AccessEntryResponse {
-
-    private Permission permission;
-    private Serializable id;
-    private Sid sid;
-    private boolean granting;
-
-    public AccessEntryResponse() {
-    }
-
-    public AccessEntryResponse(Serializable id, Sid sid, Permission permission, boolean granting) {
-        Assert.notNull(sid, "Sid required");
-        Assert.notNull(permission, "Permission required");
-        this.id = id;
-        this.sid = sid;
-        this.permission = permission;
-        this.granting = granting;
-    }
-
-    public Permission getPermission() {
-        return permission;
-    }
-
-    public void setPermission(Permission permission) {
-        this.permission = permission;
-    }
-
-    public Serializable getId() {
-        return id;
-    }
-
-    public Sid getSid() {
-        return sid;
-    }
-
-    public boolean isGranting() {
-        return granting;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/response/ErrorResponse.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/response/ErrorResponse.java b/server/src/main/java/com/kylinolap/rest/response/ErrorResponse.java
deleted file mode 100644
index fce23c4..0000000
--- a/server/src/main/java/com/kylinolap/rest/response/ErrorResponse.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.response;
-
-/**
- * @author xduo
- * 
- */
-public class ErrorResponse {
-
-    public String url;
-    public String exception;
-
-    /**
-     * @param exception
-     */
-    public ErrorResponse(String url, Exception exception) {
-        this.url = url;
-        this.exception = exception.getLocalizedMessage();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/response/GeneralResponse.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/response/GeneralResponse.java b/server/src/main/java/com/kylinolap/rest/response/GeneralResponse.java
deleted file mode 100644
index d688db5..0000000
--- a/server/src/main/java/com/kylinolap/rest/response/GeneralResponse.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.response;
-
-import java.util.Properties;
-
-/**
- * @author xduo
- * 
- */
-public class GeneralResponse extends Properties {
-
-    private static final long serialVersionUID = -6540990247122312493L;
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/response/HBaseResponse.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/response/HBaseResponse.java b/server/src/main/java/com/kylinolap/rest/response/HBaseResponse.java
deleted file mode 100644
index 3636bbf..0000000
--- a/server/src/main/java/com/kylinolap/rest/response/HBaseResponse.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.kylinolap.rest.response;
-
-import java.io.Serializable;
-
-public class HBaseResponse implements Serializable {
-    private static final long serialVersionUID = 7263557115683263492L;
-    private String tableName;
-    private long tableSize;
-    private int regionCount;
-
-    public HBaseResponse() {
-    }
-
-    /**
-     * @return The hbase table name.
-     */
-    public String getTableName() {
-        return tableName;
-    }
-
-    /**
-     * @param tableName
-     *            The hbase table name.
-     */
-    public void setTableName(String tableName) {
-        this.tableName = tableName;
-    }
-
-    /**
-     * @return the tableSize
-     */
-    public long getTableSize() {
-        return tableSize;
-    }
-
-    /**
-     * @param tableSize
-     *            the tableSize to set
-     */
-    public void setTableSize(long tableSize) {
-        this.tableSize = tableSize;
-    }
-
-    /**
-     * @return the regionCount
-     */
-    public int getRegionCount() {
-        return regionCount;
-    }
-
-    /**
-     * @param regionCount
-     *            the regionCount to set
-     */
-    public void setRegionCount(int regionCount) {
-        this.regionCount = regionCount;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/response/MetricsResponse.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/response/MetricsResponse.java b/server/src/main/java/com/kylinolap/rest/response/MetricsResponse.java
deleted file mode 100644
index 371f6fe..0000000
--- a/server/src/main/java/com/kylinolap/rest/response/MetricsResponse.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.response;
-
-import java.util.HashMap;
-
-/**
- * @author xduo
- * 
- */
-public class MetricsResponse extends HashMap<String, Float> {
-
-    private static final long serialVersionUID = 1L;
-
-    public void increase(String key) {
-        increase(key, (float) 1);
-    }
-
-    public void increase(String key, Float increased) {
-        if (this.containsKey(key)) {
-            this.put(key, (this.get(key) + increased));
-        } else {
-            this.put(key, increased);
-        }
-    }
-
-    public void decrease(String key) {
-        decrease(key, (float) 1);
-    }
-
-    public void decrease(String key, Float decreased) {
-        if (this.containsKey(key)) {
-            this.put(key, (this.get(key) - decreased));
-        } else {
-            this.put(key, decreased);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/response/SQLResponse.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/response/SQLResponse.java b/server/src/main/java/com/kylinolap/rest/response/SQLResponse.java
deleted file mode 100644
index 9121bb6..0000000
--- a/server/src/main/java/com/kylinolap/rest/response/SQLResponse.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.kylinolap.rest.response;
-
-import java.io.Serializable;
-import java.util.List;
-
-import com.kylinolap.rest.model.SelectedColumnMeta;
-
-public class SQLResponse implements Serializable {
-    private static final long serialVersionUID = 1L;
-
-    // private static final Logger logger =
-    // LoggerFactory.getLogger(SQLResponse.class);
-
-    // the data type for each column
-    private List<SelectedColumnMeta> columnMetas;
-
-    // the results rows, each row contains several columns
-    private List<List<String>> results;
-
-    private String cube;
-
-    // if not select query, only return affected row count
-    private int affectedRowCount;
-
-    // flag indicating whether an exception occurred
-    private boolean isException;
-
-    // if isException, the detailed exception message
-    private String exceptionMessage;
-
-    private long duration;
-
-    private boolean isPartial = false;
-
-    private long totalScanCount;
-
-    private boolean hitCache = false;
-
-    public SQLResponse() {
-    }
-
-    public SQLResponse(List<SelectedColumnMeta> columnMetas, List<List<String>> results, int affectedRowCount, boolean isException, String exceptionMessage) {
-        this.columnMetas = columnMetas;
-        this.results = results;
-        this.affectedRowCount = affectedRowCount;
-        this.isException = isException;
-        this.exceptionMessage = exceptionMessage;
-    }
-
-    public SQLResponse(List<SelectedColumnMeta> columnMetas, List<List<String>> results, String cube, int affectedRowCount, boolean isException, String exceptionMessage) {
-        this.columnMetas = columnMetas;
-        this.results = results;
-        this.cube = cube;
-        this.affectedRowCount = affectedRowCount;
-        this.isException = isException;
-        this.exceptionMessage = exceptionMessage;
-    }
-
-    public SQLResponse(List<SelectedColumnMeta> columnMetas, List<List<String>> results, String cube, int affectedRowCount, boolean isException, String exceptionMessage, boolean isPartial) {
-        this.columnMetas = columnMetas;
-        this.results = results;
-        this.cube = cube;
-        this.affectedRowCount = affectedRowCount;
-        this.isException = isException;
-        this.exceptionMessage = exceptionMessage;
-        this.isPartial = isPartial;
-    }
-
-    public List<SelectedColumnMeta> getColumnMetas() {
-        return columnMetas;
-    }
-
-    public List<List<String>> getResults() {
-        return results;
-    }
-
-    public void setResults(List<List<String>> results) {
-        this.results = results;
-    }
-
-    public String getCube() {
-        return cube;
-    }
-
-    public int getAffectedRowCount() {
-        return affectedRowCount;
-    }
-
-    public boolean getIsException() {
-        return isException;
-    }
-
-    public String getExceptionMessage() {
-        return exceptionMessage;
-    }
-
-    public long getDuration() {
-        return duration;
-    }
-
-    public void setDuration(long duration) {
-        this.duration = duration;
-    }
-
-    public boolean isPartial() {
-
-        return isPartial;
-    }
-
-    public long getTotalScanCount() {
-        return totalScanCount;
-    }
-
-    public void setTotalScanCount(long totalScanCount) {
-        this.totalScanCount = totalScanCount;
-    }
-
-    public boolean isHitCache() {
-        return hitCache;
-    }
-
-    public void setHitCache(boolean hitCache) {
-        this.hitCache = hitCache;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/response/TableDescResponse.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/response/TableDescResponse.java b/server/src/main/java/com/kylinolap/rest/response/TableDescResponse.java
deleted file mode 100644
index c97c30b..0000000
--- a/server/src/main/java/com/kylinolap/rest/response/TableDescResponse.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.response;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.kylinolap.metadata.model.schema.TableDesc;
-
-/**
- * A response class to wrap TableDesc
- * 
- * @author jianliu
- * 
- */
-public class TableDescResponse extends TableDesc {
-    @JsonProperty("exd")
-    Map<String, String> descExd = new HashMap<String, String>();
-    @JsonProperty("cardinality")
-    Map<String, Long> cardinality = new HashMap<String, Long>();
-
-    /**
-     * @return the cardinality
-     */
-    public Map<String, Long> getCardinality() {
-        return cardinality;
-    }
-
-    /**
-     * @param cardinality
-     *            the cardinality to set
-     */
-    public void setCardinality(Map<String, Long> cardinality) {
-        this.cardinality = cardinality;
-    }
-
-    /**
-     * @return the descExd
-     */
-    public Map<String, String> getDescExd() {
-        return descExd;
-    }
-
-    /**
-     * @param descExd
-     *            the descExd to set
-     */
-    public void setDescExd(Map<String, String> descExd) {
-        this.descExd = descExd;
-    }
-
-    /**
-     * @param table
-     */
-    public TableDescResponse(TableDesc table) {
-        this.setColumns(table.getColumns());
-        this.setDatabase(table.getDatabase());
-        this.setName(table.getName());
-        this.setUuid(table.getUuid());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/AclEntityFactory.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/AclEntityFactory.java b/server/src/main/java/com/kylinolap/rest/security/AclEntityFactory.java
deleted file mode 100644
index cb51a0a..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/AclEntityFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.security;
-
-import com.kylinolap.common.persistence.RootPersistentEntity;
-import com.kylinolap.cube.CubeInstance;
-import com.kylinolap.cube.project.ProjectInstance;
-import com.kylinolap.job.JobInstance;
-
-/**
- * @author xduo
- * 
- */
-public class AclEntityFactory {
-
-    public static RootPersistentEntity createAclEntity(String entityType, String uuid) {
-        if ("CubeInstance".equals(entityType)) {
-            CubeInstance cubeInstance = new CubeInstance();
-            cubeInstance.setUuid(uuid);
-
-            return cubeInstance;
-        }
-
-        if ("JobInstance".equals(entityType)) {
-            JobInstance jobInstance = new JobInstance();
-            jobInstance.setUuid(uuid);
-
-            return jobInstance;
-        }
-
-        if ("ProjectInstance".equals(entityType)) {
-            ProjectInstance projectInstance = new ProjectInstance();
-            projectInstance.setUuid(uuid);
-
-            return projectInstance;
-        }
-
-        throw new RuntimeException("Unsupported entity type!");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/AclPermission.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/AclPermission.java b/server/src/main/java/com/kylinolap/rest/security/AclPermission.java
deleted file mode 100644
index 587a6bb..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/AclPermission.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.security;
-
-import org.springframework.security.acls.domain.BasePermission;
-import org.springframework.security.acls.model.Permission;
-
-/**
- * @author xduo
- * 
- */
-public class AclPermission extends BasePermission {
-
-    private static final long serialVersionUID = 6121785617686149123L;
-
-    public static final Permission MANAGEMENT = new AclPermission(1 << 5, 'M'); // 32
-    public static final Permission OPERATION = new AclPermission(1 << 6, 'O'); // 64
-
-    protected AclPermission(int mask) {
-        super(mask);
-    }
-
-    protected AclPermission(int mask, char code) {
-        super(mask, code);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/AclPermissionFactory.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/AclPermissionFactory.java b/server/src/main/java/com/kylinolap/rest/security/AclPermissionFactory.java
deleted file mode 100644
index 257845c..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/AclPermissionFactory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.security;
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.security.acls.domain.DefaultPermissionFactory;
-import org.springframework.security.acls.model.Permission;
-
-/**
- * @author xduo
- * 
- */
-public class AclPermissionFactory extends DefaultPermissionFactory {
-
-    public AclPermissionFactory() {
-        super();
-        registerPublicPermissions(AclPermission.class);
-    }
-
-    public static List<Permission> getPermissions() {
-        List<Permission> permissions = new ArrayList<Permission>();
-        Field[] fields = AclPermission.class.getFields();
-
-        for (Field field : fields) {
-            try {
-                Object fieldValue = field.get(null);
-
-                if (Permission.class.isAssignableFrom(fieldValue.getClass())) {
-                    // Found a Permission static field
-                    permissions.add((Permission) fieldValue);
-                }
-            } catch (Exception ignore) {
-            }
-        }
-
-        return permissions;
-    }
-
-    public static Permission getPermission(String perName) {
-        Field[] fields = AclPermission.class.getFields();
-
-        for (Field field : fields) {
-            try {
-                Object fieldValue = field.get(null);
-
-                if (Permission.class.isAssignableFrom(fieldValue.getClass())) {
-                    // Found a Permission static field
-                    if (perName.equals(field.getName())) {
-                        return (Permission) fieldValue;
-                    }
-                }
-            } catch (Exception ignore) {
-            }
-        }
-
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/AuthoritiesPopulator.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/AuthoritiesPopulator.java b/server/src/main/java/com/kylinolap/rest/security/AuthoritiesPopulator.java
deleted file mode 100644
index 4808e44..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/AuthoritiesPopulator.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.security;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.springframework.ldap.core.ContextSource;
-import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.authority.SimpleGrantedAuthority;
-import org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator;
-
-import com.kylinolap.rest.constant.Constant;
-
-/**
- * @author xduo
- * 
- */
-public class AuthoritiesPopulator extends DefaultLdapAuthoritiesPopulator {
-
-    String adminRole;
-    SimpleGrantedAuthority adminRoleAsAuthority;
-    
-    SimpleGrantedAuthority adminAuthority = new SimpleGrantedAuthority(Constant.ROLE_ADMIN);
-    SimpleGrantedAuthority modelerAuthority = new SimpleGrantedAuthority(Constant.ROLE_MODELER);
-    SimpleGrantedAuthority analystAuthority = new SimpleGrantedAuthority(Constant.ROLE_ANALYST);
-    
-    Set<GrantedAuthority> defaultAuthorities = new HashSet<GrantedAuthority>();
-    
-    /**
-     * @param contextSource
-     * @param groupSearchBase
-     */
-    public AuthoritiesPopulator(ContextSource contextSource, String groupSearchBase, String adminRole, String defaultRole) {
-        super(contextSource, groupSearchBase);
-        this.adminRole = adminRole;
-        this.adminRoleAsAuthority = new SimpleGrantedAuthority(adminRole);
-        
-        if (defaultRole.contains(Constant.ROLE_MODELER))
-            this.defaultAuthorities.add(modelerAuthority);
-        if (defaultRole.contains(Constant.ROLE_ANALYST))
-            this.defaultAuthorities.add(analystAuthority);
-    }
-
-    @Override
-    public Set<GrantedAuthority> getGroupMembershipRoles(String userDn, String username) {
-        Set<GrantedAuthority> authorities = super.getGroupMembershipRoles(userDn, username);
-        
-        if (authorities.contains(adminRoleAsAuthority)) {
-            authorities.add(adminAuthority);
-            authorities.add(modelerAuthority);
-            authorities.add(analystAuthority);
-        }
-        
-        authorities.addAll(defaultAuthorities);
-        
-        return authorities;
-    }
-    
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/CrossDomainFilter.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/CrossDomainFilter.java b/server/src/main/java/com/kylinolap/rest/security/CrossDomainFilter.java
deleted file mode 100644
index 01d277b..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/CrossDomainFilter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.security;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletResponse;
-
-import com.kylinolap.common.KylinConfig;
-
-/**
- * @author xduo
- * 
- */
-public class CrossDomainFilter implements Filter {
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
-     */
-    @Override
-    public void init(FilterConfig filterConfig) throws ServletException {
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
-     * javax.servlet.ServletResponse, javax.servlet.FilterChain)
-     */
-    @Override
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
-        if (Boolean.parseBoolean(KylinConfig.getInstanceFromEnv().getProperty("crossdomain.enable", "false"))) {
-            ((HttpServletResponse) response).addHeader("Access-Control-Allow-Origin", "*");
-            ((HttpServletResponse) response).addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
-            ((HttpServletResponse) response).addHeader("Access-Control-Allow-Headers", "Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With, Accept, Authorization");
-        }
-
-        chain.doFilter(request, response);
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see javax.servlet.Filter#destroy()
-     */
-    @Override
-    public void destroy() {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/LdapProvider.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/LdapProvider.java b/server/src/main/java/com/kylinolap/rest/security/LdapProvider.java
deleted file mode 100644
index 4faaa99..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/LdapProvider.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.security;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.CacheManager;
-import net.sf.ehcache.Element;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.core.userdetails.User;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.ldap.authentication.LdapAuthenticationProvider;
-import org.springframework.security.ldap.authentication.LdapAuthenticator;
-import org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator;
-
-import com.kylinolap.rest.service.UserService;
-
-/**
- * @author xduo
- * 
- */
-public class LdapProvider extends LdapAuthenticationProvider {
-
-    private static final Logger logger = LoggerFactory.getLogger(LdapProvider.class);
-
-    @Autowired
-    UserService userService;
-
-    @Autowired
-    private CacheManager cacheManager;
-
-    MessageDigest md = null;
-
-    /**
-     * @param authenticator
-     * @param authoritiesPopulator
-     */
-    public LdapProvider(LdapAuthenticator authenticator, LdapAuthoritiesPopulator authoritiesPopulator) {
-        super(authenticator, authoritiesPopulator);
-
-        try {
-            md = MessageDigest.getInstance("MD5");
-        } catch (NoSuchAlgorithmException e) {
-            throw new RuntimeException("Failed to init Message Digest ", e);
-        }
-    }
-
-    @Override
-    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
-        Authentication authed = null;
-        Cache userCache = cacheManager.getCache("UserCache");
-        md.reset();
-        byte[] hashKey = md.digest((authentication.getName() + authentication.getCredentials()).getBytes());
-        String userKey = Arrays.toString(hashKey);
-
-        Element authedUser = userCache.get(userKey);
-        if (null != authedUser) {
-            authed = (Authentication) authedUser.getObjectValue();
-            SecurityContextHolder.getContext().setAuthentication(authed);
-        } else {
-            try {
-                authed = super.authenticate(authentication);
-                userCache.put(new Element(userKey, authed));
-            } catch (AuthenticationException e) {
-                logger.error("Failed to auth user: " + authentication.getName(), e);
-                throw e;
-            }
-
-            UserDetails user = new User(authentication.getName(), "skippped-ldap", authed.getAuthorities());
-
-            if (!userService.userExists(authentication.getName())) {
-                userService.createUser(user);
-            } else {
-                userService.updateUser(user);
-            }
-        }
-
-        return authed;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/PasswordPlaceholderConfigurer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/PasswordPlaceholderConfigurer.java b/server/src/main/java/com/kylinolap/rest/security/PasswordPlaceholderConfigurer.java
deleted file mode 100644
index beff51b..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/PasswordPlaceholderConfigurer.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.security;
-
-import java.util.Properties;
-
-import javax.crypto.Cipher;
-import javax.crypto.spec.SecretKeySpec;
-
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
-import org.springframework.core.io.InputStreamResource;
-import org.springframework.core.io.Resource;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-
-import com.kylinolap.common.KylinConfig;
-
-/**
- * @author xduo
- * 
- */
-public class PasswordPlaceholderConfigurer extends PropertyPlaceholderConfigurer {
-
-    private static byte[] key = { 0x74, 0x68, 0x69, 0x73, 0x49, 0x73, 0x41, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79 };
-
-    public PasswordPlaceholderConfigurer() {
-        Resource[] resources = new Resource[1];
-        resources[0] = new InputStreamResource(KylinConfig.getKylinPropertiesAsInputSteam());
-        this.setLocations(resources);
-    }
-    
-    public static String encrypt(String strToEncrypt) {
-        try {
-            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
-            final SecretKeySpec secretKey = new SecretKeySpec(key, "AES");
-            cipher.init(Cipher.ENCRYPT_MODE, secretKey);
-            final String encryptedString = Base64.encodeBase64String(cipher.doFinal(strToEncrypt.getBytes()));
-            return encryptedString;
-        } catch (Exception e) {
-            throw new RuntimeException(e.getMessage(), e);
-        }
-    }
-
-    public static String decrypt(String strToDecrypt) {
-        try {
-            Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
-            final SecretKeySpec secretKey = new SecretKeySpec(key, "AES");
-            cipher.init(Cipher.DECRYPT_MODE, secretKey);
-            final String decryptedString = new String(cipher.doFinal(Base64.decodeBase64(strToDecrypt)));
-            return decryptedString;
-        } catch (Exception e) {
-            throw new RuntimeException(e.getMessage(), e);
-        }
-    }
-
-    protected String resolvePlaceholder(String placeholder, Properties props) {
-        if (placeholder.toLowerCase().contains("password")) {
-            return decrypt(props.getProperty(placeholder));
-        } else {
-            return props.getProperty(placeholder);
-        }
-    }
-
-    public static void main(String[] args) {
-        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
-        System.out.println(bCryptPasswordEncoder.encode("MODELER"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/UnauthorisedEntryPoint.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/UnauthorisedEntryPoint.java b/server/src/main/java/com/kylinolap/rest/security/UnauthorisedEntryPoint.java
deleted file mode 100644
index 4c645fa..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/UnauthorisedEntryPoint.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.kylinolap.rest.security;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.security.core.AuthenticationException;
-import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.stereotype.Component;
-
-/**
- * Just return 401-unauthorized for every unauthorized request. The client side
- * catches this and handles login.
- * 
- * @author xduo
- */
-@Component(value = "unauthorisedEntryPoint")
-public class UnauthorisedEntryPoint implements AuthenticationEntryPoint {
-
-    public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
-        response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/security/UserManager.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/security/UserManager.java b/server/src/main/java/com/kylinolap/rest/security/UserManager.java
deleted file mode 100644
index df33c43..0000000
--- a/server/src/main/java/com/kylinolap/rest/security/UserManager.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.kylinolap.rest.security;
-
-import java.util.List;
-
-import org.springframework.security.provisioning.UserDetailsManager;
-
-public interface UserManager extends UserDetailsManager{
-
-    public List<String> getUserAuthorities();
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/a4fd4268/server/src/main/java/com/kylinolap/rest/service/AccessService.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/com/kylinolap/rest/service/AccessService.java b/server/src/main/java/com/kylinolap/rest/service/AccessService.java
deleted file mode 100644
index 3bdb595..0000000
--- a/server/src/main/java/com/kylinolap/rest/service/AccessService.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright 2013-2014 eBay Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.kylinolap.rest.service;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.acls.domain.BasePermission;
-import org.springframework.security.acls.domain.GrantedAuthoritySid;
-import org.springframework.security.acls.domain.ObjectIdentityImpl;
-import org.springframework.security.acls.domain.PrincipalSid;
-import org.springframework.security.acls.model.AccessControlEntry;
-import org.springframework.security.acls.model.Acl;
-import org.springframework.security.acls.model.AlreadyExistsException;
-import org.springframework.security.acls.model.MutableAcl;
-import org.springframework.security.acls.model.NotFoundException;
-import org.springframework.security.acls.model.ObjectIdentity;
-import org.springframework.security.acls.model.Permission;
-import org.springframework.security.acls.model.Sid;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.Assert;
-
-import com.kylinolap.common.persistence.AclEntity;
-import com.kylinolap.common.persistence.RootPersistentEntity;
-import com.kylinolap.rest.constant.Constant;
-import com.kylinolap.rest.exception.ForbiddenException;
-import com.kylinolap.rest.response.AccessEntryResponse;
-import com.kylinolap.rest.security.AclEntityFactory;
-
-/**
- * @author xduo
- * 
- */
-@Component("accessService")
-public class AccessService {
-
-    @Autowired
-    private AclService aclService;
-
-    @Autowired
-    UserService userService;
-
-    // ~ Methods to manage acl life circle of domain objects ~
-
-    @Transactional
-    public Acl init(AclEntity ae, Permission initPermission) {
-        Acl acl = null;
-        ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), ae.getId());
-
-        try {
-            // Create acl record for secured domain object.
-            acl = aclService.createAcl(objectIdentity);
-        } catch (AlreadyExistsException e) {
-            acl = (MutableAcl) aclService.readAclById(objectIdentity);
-        }
-
-        if (null != initPermission) {
-            Authentication auth = SecurityContextHolder.getContext().getAuthentication();
-            PrincipalSid sid = new PrincipalSid(auth);
-            acl = grant(ae, initPermission, sid);
-        }
-
-        return acl;
-    }
-
-    @Transactional
-    @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN + " or hasPermission(#ae, 'ADMINISTRATION')")
-    public Acl grant(AclEntity ae, Permission permission, Sid sid) {
-        Assert.notNull(ae, "Acl domain object required");
-        Assert.notNull(permission, "Acl permission required");
-        Assert.notNull(sid, "Sid required");
-
-        ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), ae.getId());
-        MutableAcl acl = null;
-
-        try {
-            acl = (MutableAcl) aclService.readAclById(objectIdentity);
-        } catch (NotFoundException e) {
-            acl = (MutableAcl) init(ae, null);
-        }
-
-        int indexOfAce = -1;
-        for (int i = 0; i < acl.getEntries().size(); i++) {
-            AccessControlEntry ace = acl.getEntries().get(i);
-
-            if (ace.getSid().equals(sid)) {
-                indexOfAce = i;
-            }
-        }
-
-        if (indexOfAce != -1) {
-            secureOwner(acl, indexOfAce);
-            acl.updateAce(indexOfAce, permission);
-        } else {
-            acl.insertAce(acl.getEntries().size(), permission, sid, true);
-        }
-
-        acl = aclService.updateAcl(acl);
-
-        return acl;
-    }
-
-    @Transactional
-    @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN + " or hasPermission(#ae, 'ADMINISTRATION')")
-    public Acl update(AclEntity ae, Long accessEntryId, Permission newPermission) {
-        Assert.notNull(ae, "Acl domain object required");
-        Assert.notNull(accessEntryId, "Ace id required");
-        Assert.notNull(newPermission, "Acl permission required");
-
-        ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), ae.getId());
-        MutableAcl acl = (MutableAcl) aclService.readAclById(objectIdentity);
-
-        int indexOfAce = -1;
-        for (int i = 0; i < acl.getEntries().size(); i++) {
-            AccessControlEntry ace = acl.getEntries().get(i);
-            if (ace.getId().equals(accessEntryId)) {
-                indexOfAce = i;
-                break;
-            }
-        }
-
-        if (indexOfAce != -1) {
-            secureOwner(acl, indexOfAce);
-
-            try {
-                acl.updateAce(indexOfAce, newPermission);
-                acl = aclService.updateAcl(acl);
-            } catch (NotFoundException e) {
-            }
-        }
-
-        return acl;
-    }
-
-    @Transactional
-    @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN + " or hasPermission(#ae, 'ADMINISTRATION')")
-    public Acl revoke(AclEntity ae, Long accessEntryId) {
-        Assert.notNull(ae, "Acl domain object required");
-        Assert.notNull(accessEntryId, "Ace id required");
-
-        ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), ae.getId());
-        MutableAcl acl = (MutableAcl) aclService.readAclById(objectIdentity);
-        int indexOfAce = -1;
-
-        for (int i = 0; i < acl.getEntries().size(); i++) {
-            AccessControlEntry ace = acl.getEntries().get(i);
-            if (((Long) ace.getId()).equals(accessEntryId)) {
-                indexOfAce = i;
-                break;
-            }
-        }
-
-        if (indexOfAce != -1) {
-            secureOwner(acl, indexOfAce);
-
-            try {
-                acl.deleteAce(indexOfAce);
-                acl = aclService.updateAcl(acl);
-            } catch (NotFoundException e) {
-            }
-        }
-
-        return acl;
-    }
-
-    @Transactional
-    public void inherit(AclEntity ae, AclEntity parentAe) {
-        Assert.notNull(ae, "Acl domain object required");
-        Assert.notNull(parentAe, "Parent acl required");
-
-        ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), ae.getId());
-        MutableAcl acl = null;
-        try {
-            acl = (MutableAcl) aclService.readAclById(objectIdentity);
-        } catch (NotFoundException e) {
-            acl = (MutableAcl) init(ae, null);
-        }
-
-        ObjectIdentity parentObjectIdentity = new ObjectIdentityImpl(parentAe.getClass(), parentAe.getId());
-        MutableAcl parentAcl = null;
-        try {
-            parentAcl = (MutableAcl) aclService.readAclById(parentObjectIdentity);
-        } catch (NotFoundException e) {
-            parentAcl = (MutableAcl) init(parentAe, null);
-        }
-
-        if (null == acl || null == parentAcl) {
-            return;
-        }
-
-        acl.setEntriesInheriting(true);
-        acl.setParent(parentAcl);
-        aclService.updateAcl(acl);
-    }
-
-    @Transactional
-    @PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN + " or hasPermission(#ae, 'ADMINISTRATION')")
-    public void clean(AclEntity ae, boolean deleteChildren) {
-        Assert.notNull(ae, "Acl domain object required");
-
-        ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), ae.getId());
-
-        try {
-            aclService.deleteAcl(objectIdentity, deleteChildren);
-        } catch (NotFoundException e) {
-        }
-    }
-
-    // ~ Methods to get acl info of domain objects ~
-
-    public RootPersistentEntity getAclEntity(String entityType, String uuid) {
-        if (null == uuid) {
-            return null;
-        }
-
-        return AclEntityFactory.createAclEntity(entityType, uuid);
-    }
-
-    public Acl getAcl(AclEntity ae) {
-        if (null == ae) {
-            return null;
-        }
-        ObjectIdentity objectIdentity = new ObjectIdentityImpl(ae.getClass(), ae.getId());
-        Acl acl = null;
-
-        try {
-            acl = (MutableAcl) aclService.readAclById(objectIdentity);
-        } catch (NotFoundException e) {
-        }
-
-        return acl;
-    }
-
-    public Sid getSid(String sid, boolean isPrincepal) {
-        if (isPrincepal) {
-            return new PrincipalSid(sid);
-        } else {
-            return new GrantedAuthoritySid(sid);
-        }
-    }
-
-    public List<AccessEntryResponse> generateAceResponses(Acl acl) {
-        if (null == acl) {
-            return Collections.emptyList();
-        }
-        List<AccessEntryResponse> accessControlEntities = new ArrayList<AccessEntryResponse>();
-
-        // Cause there is a circle reference in AccessControlEntry, it needs to
-        // set acl to null as a workaround.
-        for (AccessControlEntry ace : acl.getEntries()) {
-            accessControlEntities.add(new AccessEntryResponse(ace.getId(), ace.getSid(), ace.getPermission(), ace.isGranting()));
-        }
-
-        return accessControlEntities;
-    }
-
-    /**
-     * Protect admin permission granted to acl owner.
-     * 
-     * @param acl
-     * @param indexOfAce
-     */
-    private void secureOwner(MutableAcl acl, int indexOfAce) {
-        // Can't revoke admin permission from domain object owner
-        if (acl.getOwner().equals(acl.getEntries().get(indexOfAce).getSid()) && BasePermission.ADMINISTRATION.equals(acl.getEntries().get(indexOfAce).getPermission())) {
-            throw new ForbiddenException("Can't revoke admin permission of owner.");
-        }
-    }
-}


Mime
View raw message