Skip to content

Commit

Permalink
add table_filter table
Browse files Browse the repository at this point in the history
security, manager
  • Loading branch information
hangum committed Apr 1, 2015
1 parent a9a6820 commit 97b72fb
Show file tree
Hide file tree
Showing 30 changed files with 774 additions and 219 deletions.
Expand Up @@ -359,6 +359,20 @@
user db
============================================================================================================================
-->

<!--
update db other information
-->
<update id="updateDBOtherInformation" parameterClass="com.hangum.tadpole.engine.query.dao.system.UserDBDAO">
UPDATE
tadpole_db
SET
is_visible = #is_visible#,
is_lock = #is_lock#
WHERE
SEQ = #seq#
</update>

<!--
registered database
-->
Expand Down Expand Up @@ -414,14 +428,14 @@
<!--
유저디비 그룹정보를 가져옵니다.
-->
<select id="userDBGroup" resultClass="java.lang.String" parameterClass="java.lang.String">
<!-- <select id="userDBGroup" resultClass="java.lang.String" parameterClass="java.lang.Integer">
SELECT group_name
FROM tadpole_db
WHERE
group_seq in (#group_seqs#) AND
delYn = 'NO'
group by group_name
</select>
</select> -->

<!--
1) userDB 중복 저장 용도
Expand Down Expand Up @@ -465,6 +479,7 @@
and b.user_seq = #user_seq#
and a.delyn = 'NO'
and b.delyn = 'NO'
AND a.is_visible = 'YES'
</select>

<select id="getCreateUserDB" resultClass="com.hangum.tadpole.engine.query.dao.system.UserDBDAO" parameterClass="java.lang.Integer">
Expand Down
Expand Up @@ -10,6 +10,7 @@
******************************************************************************/
package com.hangum.tadpole.engine.query.sql;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -35,6 +36,18 @@
public class TadpoleSystem_UserDBQuery {
private static final Logger logger = Logger.getLogger(TadpoleSystem_UserDBQuery.class);

/**
* update db other information
* ex) db lock? visible
*
* @param userDB
* @throws Exception
*/
public static void updateDBOtherInformation(final UserDBDAO userDB) throws Exception {
SqlMapClient sqlClient = TadpoleSQLManager.getInstance(TadpoleSystemInitializer.getUserDB());
sqlClient.update("updateDBOtherInformation", userDB);
}

/**
* Registered Database
*
Expand Down Expand Up @@ -116,9 +129,19 @@ public static boolean isAlreadyExistDB(int user_seq, UserDBDAO userDBDao) throws
* @return
* @throws Exception
*/
public static List<String> getUserGroup(String groupSeqs) throws Exception {
SqlMapClient sqlClient = TadpoleSQLManager.getInstance(TadpoleSystemInitializer.getUserDB());
return (List<String>)sqlClient.queryForList("userDBGroup", groupSeqs); //$NON-NLS-1$
public static List<String> getUserGroup() throws Exception {
List<String> listGroupName = new ArrayList<String>();

List<UserDBDAO> userDBS = getCreateUserDB();
for (UserDBDAO userDB : userDBS) {
boolean isAdd = false;

if(!listGroupName.contains(userDB.getGroup_name())) {
listGroupName.add(userDB.getGroup_name());
}
}

return listGroupName;
}

/**
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified com.hangum.tadpole.commons/resources/icons/delete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

@@ -0,0 +1,115 @@
/*******************************************************************************
* Copyright (c) 2013 hangum.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* hangum - initial API and implementation
******************************************************************************/
package com.hangum.tadpole.commons.util;

import org.eclipse.swt.graphics.Image;

import com.hangum.tadpole.commons.Activator;
import com.swtdesigner.ResourceManager;

/**
* Common Images utils
*
* @author hangum
*
*/
public class ToobalImageUtils {
public static final String IMAGE_Activator_ID = Activator.ID;

/**
* add database
* @return
*/
public static final Image getAddDatabase() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/add_database.png");
}

/**
* configuration database
* @return
*/
public static final Image getConfigurationDatabase() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/configuration_database.png");
}


/**
* refresh img
* @return
*/
public static final Image getRefresh() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/refresh.png");
}

/**
* add image
* @return
*/
public static final Image getAdd() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/add.png");
}

/**
* user add image
* @return
*/
public static final Image getUserAdd() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/user-add-0.56.png");
}

/**
* delete image
* @return
*/
public static Image getSave() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/save.png");
}

/**
* delete image
* @return
*/
public static Image getDelete() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/delete.png");
}

/**
* moidfy image
* @return
*/
public static Image getModify() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/modify.png");
}

/**
* export image
* @return
*/
public static Image getExport() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/export.png");
}

/**
* import image
* @return
*/
public static Image getImport() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/import.png");
}

public static Image getQueryHistory() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/queryhistory.png");
}

public static Image getSQLEditor() {
return ResourceManager.getPluginImage(ToobalImageUtils.IMAGE_Activator_ID, "resources/icons/sql-query.png");
}
}

0 comments on commit 97b72fb

Please sign in to comment.