Browse Source

Merge pull request #29 in TC/finekit from ~ZHAOJUNZHE/finekit:master to master

* commit 'a938cd9f81fae0f169923de8cf7f0f706a04d57f':
  update: 新增方法,结构调整
pull/19/head
superman 5 years ago
parent
commit
7f835192eb
  1. 4
      src/main/java/com/fanruan/api/design/ui/component/table/action/UITableEditAction.java
  2. 1
      src/main/java/com/fanruan/api/design/ui/component/table/model/UITableModelAdapter.java
  3. 9
      src/main/java/com/fanruan/api/security/SecurityKit.java
  4. 18
      src/test/java/com/fanruan/api/security/SecurityKitTest.java

4
src/main/java/com/fanruan/api/design/ui/component/table/action/UITableEditAction.java

@ -5,8 +5,8 @@ import java.awt.event.ActionEvent;
public class UITableEditAction extends com.fr.design.gui.itableeditorpane.UITableEditAction {
@Override
public void checkEnabled() {
}
public void checkEnabled(){};
@Override
public void actionPerformed(ActionEvent e) {

1
src/main/java/com/fanruan/api/design/ui/component/table/model/UITableModelAdapter.java

@ -20,6 +20,7 @@ public abstract class UITableModelAdapter<T> extends com.fr.design.gui.itableedi
super(strings);
}
@Override
public abstract UITableEditAction[] createAction();

9
src/main/java/com/fanruan/api/security/SecurityKit.java

@ -35,4 +35,13 @@ public class SecurityKit {
public static String passwordDecode(String passwordText) {
return CodeUtils.passwordDecode(passwordText);
}
/**
* 给字符串加密
* @param passwordText 待加密的字符串
* @return 解加密的字符串
*/
public static String passwordEncode(String passwordText) {
return CodeUtils.passwordEncode(passwordText);
}
}

18
src/test/java/com/fanruan/api/security/SecurityKitTest.java

@ -0,0 +1,18 @@
package com.fanruan.api.security;
import java.util.*;
import com.fr.stable.CommonCodeUtils;
import org.junit.Assert;
import org.junit.Test;
public class SecurityKitTest {
@Test
public void passwordDecode(){
Assert.assertEquals(SecurityKit.passwordDecode("1234"), CommonCodeUtils.passwordDecode("1234"));
}
@Test
public void passwordEncode(){
Assert.assertEquals(SecurityKit.passwordEncode("1234"), CommonCodeUtils.passwordEncode("1234"));
}
}
Loading…
Cancel
Save