1 package com.proalpha.pds.paconnector.repository;
4 import java.util.ArrayList;
5 import java.util.Collections;
6 import java.util.Hashtable;
8 import java.util.regex.Pattern;
10 import com.proalpha.pds.exception.ProALPHANotAvailableException;
11 import com.proalpha.pds.paconnector.PaProject;
12 import com.proalpha.pds.paconnector.RunCommonPaProgram;
16 public static final List<String> instanceExtentions = Collections.unmodifiableList(
17 new ArrayList<String>() {
20 private static final long serialVersionUID = 459592606466143041L;
47 String projectRoot =
new File(
".").getAbsolutePath();
57 public String getClassInformation(String drcClassObj, String request) {
62 public String getClassOBJ(String fileName) {
63 if (isInstanceObject(fileName))
70 public String getInstanceID(String instanceObj) {
75 public String getInstanceObj(String fileName) {
81 public String getClassGroupOf(String className) {
82 return getClassInformation(className,
"ClassGroupCode");
86 public String getListOfTableFields(String tableName) {
91 public String getListOFSubClasses(String rootClass) {
92 return getClassInformation(rootClass,
"ListOfSubClasses");
96 public String getMessageText(String messageCode, String text) {
101 public String getModule(String fileName) {
102 Hashtable<String, String> selection =
new Hashtable<String, String>();
104 selection.put(
"ModulName", getProductName(fileName));
105 selection.put(
"Kennbuchstabe", fileName.substring(1, 2));
107 return getRecordField(
"D_UnterModul", selection,
"UnterModulName");
111 public String getModuleDescription(String fileName) {
112 Hashtable<String, String> selection =
new Hashtable<String, String>();
113 selection.put(
"ModulName", getProductName(fileName));
114 selection.put(
"UnterModulName", getModule(fileName));
115 selection.put(
"Sprache",
"###Language###");
117 return getRecordField(
"D_UnterModulSpr", selection,
"Bezeichnung");
121 public String getProductDescription(String fileName) {
122 Hashtable<String, String> selection =
new Hashtable<String, String>();
124 selection.put(
"ModulName", getProductName(fileName));
125 selection.put(
"Sprache",
"###Language###");
131 public String getProductName(String fileName) {
132 Hashtable<String, String> selection =
new Hashtable<String, String>();
134 selection.put(
"Kennbuchstabe", fileName.substring(0, 1));
140 public String getProgramShortDesc(String fileName) {
141 if (isInstanceObject(fileName))
148 public String getRelativePath(String fileName) {
154 public String getTableCompanyInclude(String tableName) {
155 return getTableInformation(tableName,
"CompanyInclude");
159 public String getTableInformation(String tableName, String request) {
164 public Object isInstanceOfClass(String instance, String className) {
169 public boolean isObjectBlockable(String fileName) {
170 if (isInstanceObject(fileName))
176 private boolean isInstanceObject(String fileName) {
180 if(fileName.contains(
".")) {
181 String FileExt = fileName.split(Pattern.quote(
"."))[1];
182 return instanceExtentions.contains(FileExt);
String getRecordField(String tableName, Hashtable< String, String > selection, String fieldName)
String runSupportProcedure(String supportProcedure, String... parameters)
final PaProject paProject