All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.katalon.platform.api.extension.TestSuiteCollectionUIViewDescription Maven / Gradle / Ivy

There is a newer version: 1.0.21
Show newest version
package com.katalon.platform.api.extension;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;

import com.katalon.platform.api.model.ProjectEntity;
import com.katalon.platform.api.model.TestSuiteCollectionEntity;

/**
 * TestSuiteCollectionUIViewDescription is the interface of
 * com.katalon.platform.api.extension.testSuiteCollectionUIViewDescription
 * extension point that allows client plugins can:
 * 
    *
  • Add a custom composite to test suite collection view
  • *
*

* Register in the plugin.xml like this: * *

 * {@code
 * 
 *     
 * 
 * }
 * 
* * The implementationClass is the full qualified name of the class that * implements TestSuiteCollectionUIViewDescription. * * @since 1.0.11 * */ public interface TestSuiteCollectionUIViewDescription { /** * Id of this extension point * * @since 1.0.11 */ String EXTENSION_POINT_ID = "com.katalon.platform.api.extension.testSuiteCollectionUIViewDescription"; /** * @param projectEntity * the working project * @return true if this view is visible. Otherwise, false. * @since 1.0.11 */ default boolean isEnabled(ProjectEntity projectEntity) { return true; } /** * @return Name of this view * @since 1.0.11 */ String getName(); /** * @return clazz that implements TestSuiteCollectionUIView * @since 1.0.11 */ Class getTestSuiteCollectionUIView(); default boolean shouldBeRendered() { return true; } /** * A utility that helps this view interact with Test Suite Collection view. * * @since 1.0.11 */ public interface PartActionService { /** * Marks the test suite collection view is able to save. * * @since 1.0.11 */ void markDirty(); /** * Checks the test suite collection view is able to save or not. * * @return true if test suite collection view needs to save. Otherwise, * false. * @since 1.0.11 */ boolean isDirty(); } /** * Describes how the view is displayed. * * @since 1.0.11 */ public interface TestSuiteCollectionUIView { /** * Creates the view * * @param parent * parent view of this view * @param partActionService * utility service that helps to interact with Test Suite * collection view. * @param testSuiteCollectionEntity * the working test suite collection * @return the created view * @since 1.0.11 */ Control onCreateView(Composite parent, PartActionService partActionService, TestSuiteCollectionEntity testSuiteCollectionEntity); /** * The callback function after the Test Suite Collection view has been * rendered. Data initialization should occur inside this implementation * * @since 1.0.11 */ void onPostCreateView(); /** * The success callback function after the current editing test suite * collection successfully saved. * * @param updatedTestSuiteCollection * the updated TestSuiteCollectionEntity * * @since 1.0.11 */ default void onSaveSuccess(TestSuiteCollectionEntity updatedTestSuiteCollection) { } /** * The failure callback function after the current editing test suite * collection was unable to save. * * @param exception * the root cause failure * * @since 1.0.11 */ default void onSaveFailure(Exception exception) { } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy