本文整理匯總了Java中org.ofbiz.service.config.ServiceConfigException類的典型用法代碼示例。如果您正苦於以下問題:Java ServiceConfigException類的具體用法?Java ServiceConfigException怎麽用?Java ServiceConfigException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ServiceConfigException類屬於org.ofbiz.service.config包,在下文中一共展示了ServiceConfigException類的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: NotificationGroup
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
NotificationGroup(Element notificationGroupElement) throws ServiceConfigException {
String name = notificationGroupElement.getAttribute("name").intern();
if (name.isEmpty()) {
throw new ServiceConfigException("<notification-group> element name attribute is empty");
}
this.name = name;
Element notification = UtilXml.firstChildElement(notificationGroupElement, "notification");
if (notification == null) {
throw new ServiceConfigException("<notification> element is missing");
}
this.notification = new Notification(notification);
List<? extends Element> notifyElementList = UtilXml.childElementList(notificationGroupElement, "notify");
if (notifyElementList.size() < 2) {
throw new ServiceConfigException("<notify> element(s) missing");
} else {
List<Notify> notifyList = new ArrayList<Notify>(notifyElementList.size());
for (Element notifyElement : notifyElementList) {
notifyList.add(new Notify(notifyElement));
}
this.notifyList = Collections.unmodifiableList(notifyList);
}
}
示例2: StartupService
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
StartupService(Element startupServiceElement) throws ServiceConfigException {
String name = startupServiceElement.getAttribute("name").intern();
if (name.isEmpty()) {
throw new ServiceConfigException("<startup-service> element name attribute is empty");
}
this.name = name;
this.runtimeDataId = startupServiceElement.getAttribute("runtime-data-id").intern();
String runtimeDelay = startupServiceElement.getAttribute("runtime-delay").intern();
if (runtimeDelay.isEmpty()) {
this.runtimeDelay = 0;
} else {
try {
this.runtimeDelay = Integer.parseInt(runtimeDelay);
} catch (Exception e) {
throw new ServiceConfigException("<startup-service> element runtime-delay attribute value is invalid");
}
}
this.runInPool = startupServiceElement.getAttribute("run-in-pool").intern();
}
示例3: Notification
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
Notification(Element notificationElement) throws ServiceConfigException {
String subject = notificationElement.getAttribute("subject").intern();
if (subject.isEmpty()) {
throw new ServiceConfigException("<notification> element subject attribute is empty");
}
this.subject = subject;
String screen = notificationElement.getAttribute("screen").intern();
if (subject.isEmpty()) {
throw new ServiceConfigException("<notification> element screen attribute is empty");
}
this.screen = screen;
String service = notificationElement.getAttribute("service").intern();
if (service.isEmpty()) {
service = "sendMailFromScreen";
}
this.service = service;
}
示例4: ServiceEcas
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
ServiceEcas(Element serviceEcasElement) throws ServiceConfigException {
String loader = serviceEcasElement.getAttribute("loader").intern();
if (loader.isEmpty()) {
throw new ServiceConfigException("<service-ecas> element loader attribute is empty");
}
this.loader = loader;
String location = serviceEcasElement.getAttribute("location").intern();
if (location.isEmpty()) {
throw new ServiceConfigException("<service-ecas> element location attribute is empty");
}
this.location = location;
}
示例5: ServiceGroups
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
ServiceGroups(Element serviceGroupsElement) throws ServiceConfigException {
String loader = serviceGroupsElement.getAttribute("loader").intern();
if (loader.isEmpty()) {
throw new ServiceConfigException("<service-groups> element loader attribute is empty");
}
this.loader = loader;
String location = serviceGroupsElement.getAttribute("location").intern();
if (location.isEmpty()) {
throw new ServiceConfigException("<service-groups> element location attribute is empty");
}
this.location = location;
}
示例6: Authorization
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
Authorization(Element authElement) throws ServiceConfigException {
String serviceName = authElement.getAttribute("service-name").intern();
if (serviceName.isEmpty()) {
throw new ServiceConfigException("<authorization> element service-name attribute is empty");
}
this.serviceName = serviceName;
}
示例7: Server
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
Server(Element serverElement) throws ServiceConfigException {
String jndiServerName = serverElement.getAttribute("jndi-server-name").intern();
if (jndiServerName.isEmpty()) {
throw new ServiceConfigException("<server> element jndi-server-name attribute is empty");
}
this.jndiServerName = jndiServerName;
String jndiName = serverElement.getAttribute("jndi-name").intern();
if (jndiName.isEmpty()) {
throw new ServiceConfigException("<server> element jndi-name attribute is empty");
}
this.jndiName = jndiName;
String topicQueue = serverElement.getAttribute("topic-queue").intern();
if (topicQueue.isEmpty()) {
throw new ServiceConfigException("<server> element topic-queue attribute is empty");
}
this.topicQueue = topicQueue;
String type = serverElement.getAttribute("type").intern();
if (type.isEmpty()) {
throw new ServiceConfigException("<server> element type attribute is empty");
}
this.type = type;
this.username = serverElement.getAttribute("username").intern();
this.password = serverElement.getAttribute("password").intern();
this.clientId = serverElement.getAttribute("client-id").intern();
this.listen = "true".equals(serverElement.getAttribute("listen"));
this.listenerClass = serverElement.getAttribute("listener-class").intern();
}
示例8: GlobalServices
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
GlobalServices(Element globalServicesElement) throws ServiceConfigException {
String loader = globalServicesElement.getAttribute("loader").intern();
if (loader.isEmpty()) {
throw new ServiceConfigException("<global-services> element loader attribute is empty");
}
this.loader = loader;
String location = globalServicesElement.getAttribute("location").intern();
if (location.isEmpty()) {
throw new ServiceConfigException("<global-services> element location attribute is empty");
}
this.location = location;
}
示例9: RunFromPool
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
RunFromPool(Element runFromPoolElement) throws ServiceConfigException {
String name = runFromPoolElement.getAttribute("name").intern();
if (name.isEmpty()) {
throw new ServiceConfigException("<run-from-pool> element name attribute is empty");
}
this.name = name;
}
示例10: create
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
public static ServiceConfig create(Element serviceConfigElement) throws ServiceConfigException {
Map<String, ServiceEngine> serviceEngineMap = new HashMap<String, ServiceEngine>();
List<? extends Element> engineElementList = UtilXml.childElementList(serviceConfigElement, "service-engine");
for (Element engineElement : engineElementList) {
ServiceEngine engineModel = new ServiceEngine(engineElement);
serviceEngineMap.put(engineModel.getName(), engineModel);
}
return new ServiceConfig(serviceEngineMap);
}
示例11: Parameter
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
Parameter(Element parameterElement) throws ServiceConfigException {
String name = parameterElement.getAttribute("name").intern();
if (name.isEmpty()) {
throw new ServiceConfigException("<parameter> element name attribute is empty");
}
this.name = name;
String value = parameterElement.getAttribute("value").intern();
if (value.isEmpty()) {
throw new ServiceConfigException("<parameter> element value attribute is empty");
}
this.value = value;
}
示例12: ResourceLoader
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
ResourceLoader(Element resourceLoaderElement) throws ServiceConfigException {
String name = resourceLoaderElement.getAttribute("name").intern();
if (name.isEmpty()) {
throw new ServiceConfigException("<resource-loader> element name attribute is empty");
}
this.name = name;
String className = resourceLoaderElement.getAttribute("class").intern();
if (className.isEmpty()) {
throw new ServiceConfigException("<resource-loader> element class attribute is empty");
}
this.className = className;
this.prependEnv = resourceLoaderElement.getAttribute("prepend-env").intern();
this.prefix = resourceLoaderElement.getAttribute("prefix").intern();
}
示例13: ServiceLocation
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
ServiceLocation(Element serviceLocationElement, String location) throws ServiceConfigException {
String name = serviceLocationElement.getAttribute("name").intern();
if (name.isEmpty()) {
throw new ServiceConfigException("<service-location> element name attribute is empty");
}
this.name = name;
if (location.isEmpty()) {
throw new ServiceConfigException("<service-location> element location attribute is empty");
}
this.location = location;
}
示例14: Notify
import org.ofbiz.service.config.ServiceConfigException; //導入依賴的package包/類
Notify(Element notifyElement) throws ServiceConfigException {
String type = notifyElement.getAttribute("type").intern();
if (type.isEmpty()) {
throw new ServiceConfigException("<notify> element type attribute is empty");
}
this.type = type;
String content = UtilXml.elementValue(notifyElement);
if (content == null) {
content = "";
}
this.content = content;
}