com.jaxio.celerio.convention.GeneratedPackage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of celerio-engine Show documentation
Show all versions of celerio-engine Show documentation
Celerio Core Generation Engine
The newest version!
/*
* Copyright 2015 JAXIO http://www.jaxio.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.jaxio.celerio.convention;
import lombok.Getter;
import lombok.Setter;
import static com.jaxio.celerio.util.PackageUtil.assemblePackage;
/*
* Commonly used package names.
*/
public enum GeneratedPackage {
/* package: <root package>.audit
*/
Audit("audit"), //
/* package: <root package>.configuration
*/
Configuration("configuration"), //
/* package: <root package>.context
*/
Context("context"), //
/* package: <root package>.converter
*/
Converter("converter"), //
/* package: <root package>.dao
*/
Dao("dao"), //
/* package: <root package>.dao.listener
*/
DaoListener("dao.listener"), //
/* package: <root package>.dao.support
*/
DaoSupport("dao.support"), //
/* package: <root package>.service.email
*/
EmailService("service.email"), //
/* package: <root package>.web.domain
*/
EnumItems("web.domain"), //
/* package: <root package>.domain
*/
EnumModel("domain"), //
/* package: <root package>.domain
*/
EnumModelSupport("domain"), //
/* package: <root package>.formatter
*/
Formatter("formatter"), //
/* package: <root package>.formatter.support
*/
FormatterSupport("formatter.support"), //
/* package: <root package>.dao
*/
Hibernate("dao"), //
/* package: <root package>.dao.hibernate.listener
*/
HibernateListener("dao.hibernate.listener"), //
/* package: <root package>.dao.hibernate
*/
HibernateSupport("dao.hibernate"), //
/* package: <root package>.domain
*/
Model("domain"), //
/* package: <root package>.domain
*/
ModelSupport("domain"), //
/* package: <root package>.printer
*/
Printer("printer"), //
/* package: <root package>.printer.support
*/
PrinterSupport("printer.support"), //
/* package: <root package>.random
*/
Random("random"), //
/* package: <root package>.repository
*/
Repository("repository"), //
/* package: <root package>.repository.support
*/
RepositorySupport("repository.support"), //
/* package: <root package>
*/
Root(""), //
/* package: <root package>.search
*/
Search("search"), //
/* package: <root package>.security
*/
Security("security"), //
/* package: <root package>.service
*/
Service("service"), //
/* package: <root package>.service
*/
ServiceImpl("service"), //
/* package: <root package>.service.support
*/
ServiceSupport("service.support"), //
/* package: <root package>.util
*/
Util("util"), //
/* package: <root package>.validation
*/
Validation("validation"), //
/* package: <root package>.validation.impl
*/
ValidationImpl("validation.impl"), //
// WEB
/* package: <root package>.web.controller
*/
RestController("web.controller"), //
/* package: <root package>.web
*/
Web("web"), //
/* package: <root package>.web.action
*/
WebAction("web.action"), //
/* package: <root package>.web.component
*/
WebComponent("web.component"), //
/* package: <root package>.web.configuration
*/
WebConfiguration("web.configuration"), //
/* package: <root package>.web.context
*/
WebContext("web.context"), //
/* package: <root package>.web.controller
*/
WebController("web.controller"), //
/* package: <root package>.web.conversation
*/
WebConversation("web.conversation"), //
/* package: <root package>.web.conversation.component
*/
WebConversationComponent("web.conversation.component"), //
/* package: <root package>.web.converter
*/
WebConverter("web.converter"), //
/* package: <root package>.web.converter.support
*/
WebConverterSupport("web.converter.support"), //
/* package: <root package>.web.ui.el
*/
WebEl("web.ui.el"), //
/* package: <root package>.web.faces
*/
WebFaces("web.faces"), //
/* package: <root package>.web.filter
*/
WebFilter("web.filter"), //
/* package: <root package>.web.flow
*/
WebFlow("web.flow"), //
/* package: <root package>.web.interceptor
*/
WebInterceptor("web.interceptor"), //
/* package: <root package>.web.listener
*/
WebListener("web.listener"), //
/* package: <root package>.web.domain
*/
WebModel("web.domain"), //
/* package: <root package>.web.converter
*/
WebModelConverter("web.converter"), //
/* package: <root package>.web.domain
*/
WebModelEntityForm("web.domain"), //
/* package: <root package>.web.domain
*/
WebModelItems("web.domain"), //
/* package: <root package>.web.domain
*/
WebModelSearchForm("web.domain"), //
/* package: <root package>.web.domain.support
*/
WebModelSupport("web.domain.support"), //
/* package: <root package>.web.domain
*/
WebModelValidator("web.domain"), //
/* package: <root package>.web.permission
*/
WebPermission("web.permission"), //
/* package: <root package>.web.permission.support
*/
WebPermissionSupport("web.permission.support"), //
/* package: <root package>.web.security
*/
WebSecurity("web.security"), //
/* package: <root package>.web.service
*/
WebService("web.service"), //
/* package: <root package>.web.servlet
*/
WebServlet("web.servlet"), //
/* package: <root package>.web.ui
*/
WebUi("web.ui"), //
/* package: <root package>.web.util
*/
WebUtil("web.util"), //
/* package: <root package>.web.validation
*/
WebValidation("web.validation"), //
/* package: <root package>.web.validator
*/
WebValidator("web.validator"), //
// SELENIUM
/* package: <root package>.web.selenium
*/
Selenium("web.selenium"), //
/* package: <root package>.web.selenium.page
*/
SeleniumPage("web.selenium.page"), //
/* package: <root package>.web.selenium.support
*/
SeleniumSupport("web.selenium.support"), //
/* package: <root package>.web.selenium.support.elements
*/
SeleniumElement("web.selenium.support.elements");
@Getter
@Setter
private String subPackage;
@Getter
@Setter
private String rootPackage;
GeneratedPackage(String subPackage) {
this.subPackage = subPackage;
}
public String getPackageName() {
return assemblePackage(getRootPackage(), getSubPackage());
}
public String getSubPackagePath() {
return subPackage.replace('.', '/');
}
/*
* It is convenient for creating resources under src/main/resources/ + com/jaxio.
*
* @return the package as a folder. Example: com.jaxio becomes com/jaxio
*/
public String getPackagePath() {
return getPackageName().replace('.', '/');
}
}