Package org.drools.task

Examples of org.drools.task.Deadline


            return;
        }

        // get earliest start deadline
        List<Deadline> startDeadlines = task.getDeadlines().getStartDeadlines();
        Deadline start = null;
        for ( Deadline deadline : startDeadlines ) {
            if ( start == null || start.getDate().getTime() > deadline.getDate().getTime() ) {
                start = deadline;
            }
        }

        // get latest end deadline
        List<Deadline> endDeadlines = task.getDeadlines().getEndDeadlines();
        Deadline end = null;
        for ( Deadline deadline : endDeadlines ) {
            if ( end == null || end.getDate().getTime() < deadline.getDate().getTime() ) {
                end = deadline;
            }
        }

        String language = userInfo.getLanguageForEntity( owner );
        String name = I18NText.getLocalText( task.getNames(),
                                             language,
                                             defaultLanguage );
        String summary = I18NText.getLocalText( task.getSubjects(),
                                                language,
                                                defaultLanguage );
        String description = I18NText.getLocalText( task.getDescriptions(),
                                                    language,
                                                    defaultLanguage );
        // send ical for start
        if ( start != null ) {
            try {
                sendIcal( task.getId(),
                          name,
                          summary,
                          description,
                          task.getPriority(),
                          start.getDate(),
                          owner,
                          creator,
                          createdOn,
                          userInfo,
                          "Start" );
            } catch ( Exception e ) {

            }
        }

        // send ical for end
        if ( end != null ) {
            try {
                sendIcal( task.getId(),
                          name,
                          summary,
                          description,
                          task.getPriority(),
                          end.getDate(),
                          owner,
                          creator,
                          createdOn,
                          userInfo,
                          "End" );
View Full Code Here


   
    public static List<Deadline> readDeadlinesList(ObjectInput in) throws IOException, ClassNotFoundException  {
        int size = in.readInt();
        List<Deadline> list = new ArrayList<Deadline>(size);
        for ( int i = 0; i < size; i++ ) {
            Deadline item = new Deadline();
            item.readExternal( in );
            list.add( item );
        }
        return list;
    }   
View Full Code Here

            return;
        }

        // get earliest start deadline
        List<Deadline> startDeadlines = task.getDeadlines().getStartDeadlines();
        Deadline start = null;
        for ( Deadline deadline : startDeadlines ) {
            if ( start == null || start.getDate().getTime() > deadline.getDate().getTime() ) {
                start = deadline;
            }
        }

        // get latest end deadline
        List<Deadline> endDeadlines = task.getDeadlines().getEndDeadlines();
        Deadline end = null;
        for ( Deadline deadline : endDeadlines ) {
            if ( end == null || end.getDate().getTime() < deadline.getDate().getTime() ) {
                end = deadline;
            }
        }

        String language = userInfo.getLanguageForEntity( owner );
        String name = I18NText.getLocalText( task.getNames(),
                                             language,
                                             defaultLanguage );
        String summary = I18NText.getLocalText( task.getSubjects(),
                                                language,
                                                defaultLanguage );
        String description = I18NText.getLocalText( task.getDescriptions(),
                                                    language,
                                                    defaultLanguage );
        // send ical for start
        if ( start != null ) {
            try {
                sendIcal( task.getId(),
                          name,
                          summary,
                          description,
                          task.getPriority(),
                          start.getDate(),
                          owner,
                          creator,
                          createdOn,
                          userInfo,
                          "Start" );
            } catch ( Exception e ) {

            }
        }

        // send ical for end
        if ( end != null ) {
            try {
                sendIcal( task.getId(),
                          name,
                          summary,
                          description,
                          task.getPriority(),
                          end.getDate(),
                          owner,
                          creator,
                          createdOn,
                          userInfo,
                          "End" );
View Full Code Here

   
    public static List<Deadline> readDeadlinesList(ObjectInput in) throws IOException, ClassNotFoundException  {
        int size = in.readInt();
        List<Deadline> list = new ArrayList<Deadline>(size);
        for ( int i = 0; i < size; i++ ) {
            Deadline item = new Deadline();
            item.readExternal( in );
            list.add( item );
        }
        return list;
    }   
View Full Code Here

    public void executeEscalatedDeadline(long taskId,
                                         long deadlineId) {
        EntityManager localEm = emf.createEntityManager();
        Task task = localEm.find( Task.class,
                                  taskId );
        Deadline deadline = localEm.find( Deadline.class,
                                          deadlineId );

        if ( escalatedDeadlineHandler == null ) {
            escalatedDeadlineHandler = new DefaultEscalatedDeadlineHandler();
        }
View Full Code Here

            return;
        }

        // get earliest start deadline
        List<Deadline> startDeadlines = task.getDeadlines().getStartDeadlines();
        Deadline start = null;
        for ( Deadline deadline : startDeadlines ) {
            if ( start == null || start.getDate().getTime() > deadline.getDate().getTime() ) {
                start = deadline;
            }
        }

        // get latest end deadline
        List<Deadline> endDeadlines = task.getDeadlines().getEndDeadlines();
        Deadline end = null;
        for ( Deadline deadline : endDeadlines ) {
            if ( end == null || end.getDate().getTime() < deadline.getDate().getTime() ) {
                end = deadline;
            }
        }

        String language = userInfo.getLanguageForEntity( owner );
        String name = I18NText.getLocalText( task.getNames(),
                                             language,
                                             defaultLanguage );
        String summary = I18NText.getLocalText( task.getSubjects(),
                                                language,
                                                defaultLanguage );
        String description = I18NText.getLocalText( task.getDescriptions(),
                                                    language,
                                                    defaultLanguage );
        // send ical for start
        if ( start != null ) {
            try {
                sendIcal( task.getId(),
                          name,
                          summary,
                          description,
                          task.getPriority(),
                          start.getDate(),
                          owner,
                          creator,
                          createdOn,
                          userInfo,
                          "Start" );
            } catch ( Exception e ) {

            }
        }

        // send ical for end
        if ( end != null ) {
            try {
                sendIcal( task.getId(),
                          name,
                          summary,
                          description,
                          task.getPriority(),
                          end.getDate(),
                          owner,
                          creator,
                          createdOn,
                          userInfo,
                          "End" );
View Full Code Here

            return;
        }

        // get earliest start deadline
        List<Deadline> startDeadlines = task.getDeadlines().getStartDeadlines();
        Deadline start = null;
        for ( Deadline deadline : startDeadlines ) {
            if ( start == null || start.getDate().getTime() > deadline.getDate().getTime() ) {
                start = deadline;
            }
        }

        // get latest end deadline
        List<Deadline> endDeadlines = task.getDeadlines().getEndDeadlines();
        Deadline end = null;
        for ( Deadline deadline : endDeadlines ) {
            if ( end == null || end.getDate().getTime() < deadline.getDate().getTime() ) {
                end = deadline;
            }
        }

        String language = userInfo.getLanguageForEntity( owner );
        String name = I18NText.getLocalText( task.getNames(),
                                             language,
                                             defaultLanguage );
        String summary = I18NText.getLocalText( task.getSubjects(),
                                                language,
                                                defaultLanguage );
        String description = I18NText.getLocalText( task.getDescriptions(),
                                                    language,
                                                    defaultLanguage );
        // send ical for start
        if ( start != null ) {
            try {
                sendIcal( task.getId(),
                          name,
                          summary,
                          description,
                          task.getPriority(),
                          start.getDate(),
                          owner,
                          creator,
                          createdOn,
                          userInfo,
                          "Start" );
            } catch ( Exception e ) {

            }
        }

        // send ical for end
        if ( end != null ) {
            try {
                sendIcal( task.getId(),
                          name,
                          summary,
                          description,
                          task.getPriority(),
                          end.getDate(),
                          owner,
                          creator,
                          createdOn,
                          userInfo,
                          "End" );
View Full Code Here

TOP

Related Classes of org.drools.task.Deadline

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.