Browse Source

update: 新增方法,结构调整

remotes/1611766341912730171/master
zjz1993 5 years ago
parent
commit
50204f18fa
  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. 13
      src/test/java/com/fanruan/api/plugin/PluginKitTest.java
  5. 12
      src/test/java/com/fanruan/api/plugin/TestExtraClass.java
  6. 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);
}
}

13
src/test/java/com/fanruan/api/plugin/PluginKitTest.java

@ -1,13 +0,0 @@
package com.fanruan.api.plugin;
import org.junit.Assert;
import org.junit.Test;
public class PluginKitTest {
@Test
public void getArray(){
PluginKit p1 = new PluginKit();
TestExtraClass p2 = new TestExtraClass();
Assert.assertEquals(p1.getArray("abcd"), p2.getArray("abcd"));
}
}

12
src/test/java/com/fanruan/api/plugin/TestExtraClass.java

@ -1,12 +0,0 @@
package com.fanruan.api.plugin;
import com.fr.plugin.injectable.PluginSingleInjection;
public class TestExtraClass extends com.fr.plugin.AbstractExtraClassManager{
protected boolean mountSpecific(PluginSingleInjection injection){
return true;
}
protected boolean demountSpecific(PluginSingleInjection injection){
return true;
}
}

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