Search in sources :

Example 21 with IPageComponent

use of com.twinsoft.convertigo.beans.core.IPageComponent in project convertigo by convertigo.

the class NgxBuilder method pageRemoved.

@Override
public synchronized void pageRemoved(final IPageComponent pageComponent) throws EngineException {
    PageComponent page = (PageComponent) pageComponent;
    if (page != null && page.isEnabled() && initDone) {
        MobileApplication mobileApplication = project.getMobileApplication();
        if (mobileApplication != null) {
            ApplicationComponent application = (ApplicationComponent) mobileApplication.getApplicationComponent();
            if (application != null) {
                writeAppSourceFiles(application);
                deleteUselessDir(page.getName());
                moveFiles();
                Engine.logEngine.trace("(MobileBuilder) Handled 'pageRemoved'");
            }
        }
    }
}
Also used : MobileApplication(com.twinsoft.convertigo.beans.core.MobileApplication) ApplicationComponent(com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) IPageComponent(com.twinsoft.convertigo.beans.core.IPageComponent) PageComponent(com.twinsoft.convertigo.beans.ngx.components.PageComponent)

Example 22 with IPageComponent

use of com.twinsoft.convertigo.beans.core.IPageComponent in project convertigo by convertigo.

the class NgxBuilder method pageRenamed.

@Override
public synchronized void pageRenamed(final IPageComponent pageComponent, final String oldName) throws EngineException {
    PageComponent page = (PageComponent) pageComponent;
    if (page != null && page.isEnabled() && initDone) {
        MobileApplication mobileApplication = project.getMobileApplication();
        if (mobileApplication != null) {
            ApplicationComponent application = (ApplicationComponent) mobileApplication.getApplicationComponent();
            if (application != null) {
                writePageSourceFiles(page);
                writeAppSourceFiles(application);
                deleteUselessDir(oldName);
                moveFiles();
                Engine.logEngine.trace("(MobileBuilder) Handled 'pageRenamed'");
            }
        }
    }
}
Also used : MobileApplication(com.twinsoft.convertigo.beans.core.MobileApplication) ApplicationComponent(com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent) IApplicationComponent(com.twinsoft.convertigo.beans.core.IApplicationComponent) IPageComponent(com.twinsoft.convertigo.beans.core.IPageComponent) PageComponent(com.twinsoft.convertigo.beans.ngx.components.PageComponent)

Aggregations

IPageComponent (com.twinsoft.convertigo.beans.core.IPageComponent)22 PageComponent (com.twinsoft.convertigo.beans.mobile.components.PageComponent)11 PageComponent (com.twinsoft.convertigo.beans.ngx.components.PageComponent)11 IApplicationComponent (com.twinsoft.convertigo.beans.core.IApplicationComponent)6 MobileApplication (com.twinsoft.convertigo.beans.core.MobileApplication)6 File (java.io.File)6 EngineException (com.twinsoft.convertigo.engine.EngineException)4 IOException (java.io.IOException)4 ApplicationComponent (com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent)3 ApplicationComponent (com.twinsoft.convertigo.beans.ngx.components.ApplicationComponent)3 Matcher (java.util.regex.Matcher)2 Pattern (java.util.regex.Pattern)2