kotkabeans
Class Copier

java.lang.Object
  |
  +--kotkabeans.Copier

public class Copier
extends java.lang.Object

This bean makes queries/updates to database to copy existing course's definitions to another courseinstance.


Constructor Summary
Copier(DB db, User user, javax.servlet.jsp.JspWriter out)
           
Copier(User user, javax.servlet.jsp.JspWriter out)
          Constructs Copier object
 
Method Summary
 int copyCourseBeginTimes(int copyFromID, int copyToID)
          Copy beginning and endtimes
 int copyCourseBeginTimes(int copyFromID, int copyToID, int diffYear)
           
 boolean copyCourseDescription(int copyFromID, int copyToID)
          Copy descriptions related to a courseinstance to the other courseinstance.
 int copyCourseEventGroup(int copyFromID, int copyToID, int eventGroupID)
          Copy event information related to a courseinstance to the other courseinstance.
 int copyCourseEventGroup(int copyFromID, int copyToID, int eventGroupID, int diffYear)
           
 int copyCourseFieldGroup(int copyFrom, int copyTo, int fieldGroupID)
          Copy course related fieldgroups
 boolean copyCourseInstance(int copyFromID, int copyToID)
          Copy all data related to a courseinstance to the other courseinstance.
 boolean copyCourseInstance(int copyFromID, int copyToID, int yearDiff)
           
 int copyCourseRaport(int copyFrom, int copyTo, int raportID)
          Copy course related raports
 int copyCourseRegistration(int copyFromID, int copyToID)
          Copy details related to registration
 int copyCourseRegistration(int copyFromID, int copyToID, int diffYear)
           
 int copyCourseVisibility(int copyFromID, int copyToID)
          Copy details related to course's visibility in Korppi and to users in general.
 void printCoursesToOptionList(java.lang.String def)
          Method to print all courses for user to select
 void setDB(DB db)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Copier

public Copier(User user,
              javax.servlet.jsp.JspWriter out)
Constructs Copier object

Parameters:
user - No idea if we need thisone...

Copier

public Copier(DB db,
              User user,
              javax.servlet.jsp.JspWriter out)
Method Detail

setDB

public void setDB(DB db)

copyCourseInstance

public boolean copyCourseInstance(int copyFromID,
                                  int copyToID)
Copy all data related to a courseinstance to the other courseinstance.

Parameters:
copyFromID - The courseinstance from witch to copy
copyToID - The courseinstance witch to copy

copyCourseInstance

public boolean copyCourseInstance(int copyFromID,
                                  int copyToID,
                                  int yearDiff)

copyCourseDescription

public boolean copyCourseDescription(int copyFromID,
                                     int copyToID)
Copy descriptions related to a courseinstance to the other courseinstance.

Parameters:
copyFromID - The courseinstance from witch to copy
copyToID - The courseinstance witch to copy

copyCourseBeginTimes

public int copyCourseBeginTimes(int copyFromID,
                                int copyToID)
Copy beginning and endtimes

Parameters:
copyFromID - The courseinstance from witch to copy
copyToID - The courseinstance witch to copy

copyCourseBeginTimes

public int copyCourseBeginTimes(int copyFromID,
                                int copyToID,
                                int diffYear)

copyCourseRegistration

public int copyCourseRegistration(int copyFromID,
                                  int copyToID)
Copy details related to registration

Parameters:
copyFromID - The courseinstance from witch to copy
copyToID - The courseinstance witch to copy

copyCourseRegistration

public int copyCourseRegistration(int copyFromID,
                                  int copyToID,
                                  int diffYear)

copyCourseVisibility

public int copyCourseVisibility(int copyFromID,
                                int copyToID)
Copy details related to course's visibility in Korppi and to users in general.

Parameters:
copyFromID - The courseinstance from witch to copy
copyToID - The courseinstance witch to copy

copyCourseEventGroup

public int copyCourseEventGroup(int copyFromID,
                                int copyToID,
                                int eventGroupID)
Copy event information related to a courseinstance to the other courseinstance. If the target instance has lectures defined then don't override.

Parameters:
copyFromID - The courseinstance from witch to copy
copyToID - The courseinstance witch to copy

copyCourseEventGroup

public int copyCourseEventGroup(int copyFromID,
                                int copyToID,
                                int eventGroupID,
                                int diffYear)

copyCourseFieldGroup

public int copyCourseFieldGroup(int copyFrom,
                                int copyTo,
                                int fieldGroupID)
Copy course related fieldgroups


copyCourseRaport

public int copyCourseRaport(int copyFrom,
                            int copyTo,
                            int raportID)
Copy course related raports


printCoursesToOptionList

public void printCoursesToOptionList(java.lang.String def)
Method to print all courses for user to select