zack
6 years ago
6 changed files with 37 additions and 44 deletions
@ -1,27 +0,0 @@
|
||||
package com.fr.start; |
||||
|
||||
import com.fr.design.fun.OemProcessor; |
||||
import com.fr.module.Activator; |
||||
import com.fr.module.extension.Prepare; |
||||
|
||||
/** |
||||
* 设计器OEM注册 |
||||
*/ |
||||
public class OemActivator extends Activator implements Prepare { |
||||
|
||||
@Override |
||||
public void start() { |
||||
} |
||||
|
||||
@Override |
||||
public void stop() { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void prepare() { |
||||
// 加入Oem
|
||||
setSingleton(OemProcessor.class, new OemImpl()); |
||||
} |
||||
|
||||
} |
@ -1,18 +1,14 @@
|
||||
package com.fr.start; |
||||
|
||||
import com.fr.design.fun.OemProcessor; |
||||
import com.fr.module.Module; |
||||
import com.fr.module.ModuleContext; |
||||
import com.fr.stable.bridge.StableFactory; |
||||
|
||||
/** |
||||
* OEM处理中心 |
||||
*/ |
||||
public class OemHandler { |
||||
|
||||
public static OemProcessor findOem() { |
||||
Module oemModule = ModuleContext.getModule(OemActivator.class); |
||||
if (oemModule != null) { |
||||
return oemModule.getSingleton(OemProcessor.class); |
||||
} |
||||
return null; |
||||
return StableFactory.getMarkedInstanceObjectFromClass(OemProcessor.MARK_STRING, OemProcessor.class); |
||||
} |
||||
} |
Loading…
Reference in new issue