Package org.libreplan.business.common.entities

Examples of org.libreplan.business.common.entities.Connector


    /**
     * Returns true if Tim is Activated. Used to show/hide Tim edit window
     */
    public boolean isTimActivated() {
        Connector connector = connectorDAO
                .findUniqueByName(PredefinedConnectors.TIM.getName());
        if (connector == null) {
            return false;
        }
        return connector.isActivated();
    }
View Full Code Here


    public boolean existsByNameAnotherTransaction(Connector connector) {
        return existsOtherConnectorByName(connector);
    }

    private boolean existsOtherConnectorByName(Connector connector) {
        Connector found = findUniqueByName(connector.getName());
        return found != null && found != connector;
    }
View Full Code Here

                Restrictions.eq("name", typeOfWorkHours.getName()));
        return c.uniqueResult() != null;
    }

    private void checkIsJiraConnectorTypeOfWorkHours(TypeOfWorkHours type) {
        Connector connector = connectorDAO
                .findUniqueByName(PredefinedConnectors.JIRA.getName());
        if (connector != null) {
            String name = connector.getPropertiesAsMap().get(
                    PredefinedConnectorProperties.JIRA_HOURS_TYPE);
            if (name.equals(type.getName())) {
                throw ValidationException
                        .invalidValueException(
                                "Cannot delete the type of work hours. It is configured as type of work hours for JIRA connector.",
View Full Code Here

    }

    @AssertTrue(message = "type of work hours for JIRA connector cannot be disabled")
    public boolean isJiraConnectorTypeOfWorkHoursNotDisabledConstraint() {
        if (!isNewObject() && !getEnabled()) {
            Connector connector = Registry.getConnectorDAO().findUniqueByName(
                    PredefinedConnectors.JIRA.getName());
            if (connector != null) {
                if (this.name.equals(connector.getPropertiesAsMap().get(
                        PredefinedConnectorProperties.JIRA_HOURS_TYPE))) {
                    return false;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.libreplan.business.common.entities.Connector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.