Search in sources :

Example 11 with UrlMapping

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

the class UrlMappingWizardPage method dialogChanged.

private void dialogChanged() {
    DatabaseObject dbo = ((ObjectExplorerWizardPage) getWizard().getPage("ObjectExplorerWizardPage")).getCreatedBean();
    if (dbo != null && dbo instanceof UrlMapping) {
        String path = getPath();
        if (path.length() == 0) {
            updateStatus("Path must be specified");
            return;
        }
        if (!path.startsWith("/")) {
            updateStatus("Path must start with \"/\"");
            return;
        }
        if (parentObject != null && parentObject instanceof UrlMapper) {
            UrlMapper urlMapper = (UrlMapper) parentObject;
            if (urlMapper.getMappingByPath(path) != null) {
                updateStatus("This mapping path already exists");
                return;
            }
            UrlMapping urlMapping = (UrlMapping) dbo;
            urlMapping.setPath(path);
        }
    }
    updateStatus(null);
}
Also used : UrlMapping(com.twinsoft.convertigo.beans.core.UrlMapping) UrlMapper(com.twinsoft.convertigo.beans.core.UrlMapper) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) ObjectExplorerWizardPage(com.twinsoft.convertigo.eclipse.wizards.new_object.ObjectExplorerWizardPage)

Aggregations

UrlMapping (com.twinsoft.convertigo.beans.core.UrlMapping)11 UrlMappingOperation (com.twinsoft.convertigo.beans.core.UrlMappingOperation)9 ArrayList (java.util.ArrayList)8 Project (com.twinsoft.convertigo.beans.core.Project)7 EngineException (com.twinsoft.convertigo.engine.EngineException)7 UrlMapper (com.twinsoft.convertigo.beans.core.UrlMapper)6 UrlMappingParameter (com.twinsoft.convertigo.beans.core.UrlMappingParameter)6 Sequence (com.twinsoft.convertigo.beans.core.Sequence)5 Step (com.twinsoft.convertigo.beans.core.Step)5 RequestableStep (com.twinsoft.convertigo.beans.core.RequestableStep)4 UrlMappingResponse (com.twinsoft.convertigo.beans.core.UrlMappingResponse)4 BlockStep (com.twinsoft.convertigo.beans.steps.BlockStep)4 BranchStep (com.twinsoft.convertigo.beans.steps.BranchStep)4 ElseStep (com.twinsoft.convertigo.beans.steps.ElseStep)4 SequenceStep (com.twinsoft.convertigo.beans.steps.SequenceStep)4 ThenStep (com.twinsoft.convertigo.beans.steps.ThenStep)4 TransactionStep (com.twinsoft.convertigo.beans.steps.TransactionStep)4 XMLComplexStep (com.twinsoft.convertigo.beans.steps.XMLComplexStep)4 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)4 InformationNode (com.twinsoft.convertigo.eclipse.views.references.model.InformationNode)4