Extending and Implementing Classes JavaAgent

/**
 * Created: 2014.02.21.11.08.PM
 * EmployeeData class is the mothership, fires Person, Jobs, Files classes
 */

/**
 * @author Dököll Solutions, Inc.
 * @version 2014.02.21.11.08.PM
 */

//grab info from the DB2 Subjects view
//Add values to ListBoxes onLoad
//create new Forms and Views for new data entered using this class

public class EmployeeData implements IEmpSource {
    
	//TODO: Create Xpages Files to work with these methods, with DB2 values
	//might be a good idea to add a JavaBean and BackingBean to compliment the pages
	public String doAdd() {
		// TODO Auto-generated method stub
		return null;
	}

	public String doDel() {
		// TODO Auto-generated method stub
		return null;
	}

	public String doList() {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean isAddAccessAvail() {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean isDelAccessAvail() {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean isListAccessAvail() {
		// TODO Auto-generated method stub
		return false;
	}
	
	public static void main(String[] args) {
        //create new instance of Person
    	Person person = new Person();
    	//prepare values for Person
    	person.setEmpAge(40);
    	person.setOfficeLieu("Upstate NY");
    	person.setRegion("Fenway Park");
    	person.setUserName("username10");
    	//load values for person
   	     System.out.println("UserName   = " + person.getUserName()); 
    	 System.out.println("PersonAge  = " + person.getEmpAge());
    	 System.out.println("OfficeLieu = " + person.getOfficeLieu());
    	 System.out.println("PerRegion  = " + person.getRegion());

    	//create new instance of JobType
    	JobType jobType = new JobType();
    	//prepare JobType stuff
        jobType.setAllegationCode("XYZ000111000ABD");
        jobType.setDateOpen("2014.02.21");
        jobType.setSubjectJob("Homeschool DayCare");
        jobType.setLicenseType(79708070);
        //load JobType data
        System.out.println("AllegationCode = " + jobType.getAllegationCode());
        System.out.println("DateOpen       = " + jobType.getDateOpen());
        System.out.println("SubjectJob     = " + jobType.getLicenseType());
        System.out.println("LicenseType    = " + jobType.getSubjectJob());

        //create item for userRights
        UserRights userRights = new UserRights();
        //prepare rights
        userRights.setChartRights("Bar Charts");
        userRights.setFilesRights("CSV Files");
        userRights.setImageRights("Folder Icons");
        userRights.setSiteRights("Xpages Sites");
        userRights.setVideoRights("Progressive House Music");
        userRights.setReportRights("Report By Date");
        //load rights @ once
        System.out.println("ChartRights  = " + userRights.getChartRights());
        System.out.println("FilesRights  = " + userRights.getFilesRights());
        System.out.println("ImageRights  = " + userRights.getImageRights());
        System.out.println("SiteRights   = " + userRights.getSiteRights());
        System.out.println("VideoRights  = " + userRights.getVideoRights());
        System.out.println("ReportRights = " + userRights.getReportRights());

    }

	
}//end of program...


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>

/**
 * Created: 2014.02.21.11.38.PM
 * Interface for EmployeeData Class
 * to be used in Xpages...
 */

/**
 * @author Dököll Solutions, Inc.
 * @version 2014.02.21.11.38.PM
 *
 */
public interface IEmpSource {
	//reference task options
	public String doAdd();
	public String doList();
	public String doDel();
	//reference access Levels
	public boolean isAddAccessAvail();
	public boolean isListAccessAvail();
	public boolean isDelAccessAvail();

}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>


/**
 * Created: 2014.02.21.10.38.PM
 * Person class work in conjunction with Jobs, Files, and other associating classes
 */

/**
 * @author Dököll Solutions, Inc.
 * @version 2014.02.21.10.38.PM
 */

//TODO
//grab info from the DB2 Subjects view items
//Add values to ListBoxes onLoad
//create new Forms and Views for new data entered using this class

public class Person {
    private String UserName;
    private String OfficeLieu;
    private String Region;
    private int EmpAge;

    public Person() {
    }

	/**
	 * @return the userName
	 */
	public String getUserName() {
		return UserName;
	}

	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		UserName = userName;
	}

	/**
	 * @return the officeLieu
	 */
	public String getOfficeLieu() {
		return OfficeLieu;
	}

	/**
	 * @param officeLieu the officeLieu to set
	 */
	public void setOfficeLieu(String officeLieu) {
		OfficeLieu = officeLieu;
	}

	/**
	 * @return the region
	 */
	public String getRegion() {
		return Region;
	}

	/**
	 * @param region the region to set
	 */
	public void setRegion(String region) {
		Region = region;
	}

	/**
	 * @return the empAge
	 */
	public int getEmpAge() {
		return EmpAge;
	}

	/**
	 * @param empAge the empAge to set
	 */
	public void setEmpAge(int empAge) {
		EmpAge = empAge;
	}

    
}


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>


/**
 * Created: 2014.02.21.10.45.PM
 * JobType class work in conjunction with Person, Files, and other associating classes
 */

/**
 * @author Dököll Solutions, Inc.
 * @version 2014.02.21.10.45.PM
 */

//TODO
//grab info from the DB2 Subjects view items
//Add values to ListBoxes onLoad
//create new Forms and Views for new data entered using this class



public class JobType extends Person {
    private String SubjectJob;
    private String AllegationCode;
    private int LicenseType;
    private String DateOpen;

    public JobType() {
    }

	/**
	 * @return the subjectJob
	 */
	public String getSubjectJob() {
		return SubjectJob;
	}

	/**
	 * @param subjectJob the subjectJob to set
	 */
	public void setSubjectJob(String subjectJob) {
		SubjectJob = subjectJob;
	}

	/**
	 * @return the allegationCode
	 */
	public String getAllegationCode() {
		return AllegationCode;
	}

	/**
	 * @param allegationCode the allegationCode to set
	 */
	public void setAllegationCode(String allegationCode) {
		AllegationCode = allegationCode;
	}

	/**
	 * @return the licenseType
	 */
	public int getLicenseType() {
		return LicenseType;
	}

	/**
	 * @param licenseType the licenseType to set
	 */
	public void setLicenseType(int licenseType) {
		LicenseType = licenseType;
	}

	/**
	 * @return the dateOpen
	 */
	public String getDateOpen() {
		return DateOpen;
	}

	/**
	 * @param dateOpen the dateOpen to set
	 */
	public void setDateOpen(String dateOpen) {
		DateOpen = dateOpen;
	}

   
}


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>

/**
 * Created: 2014.02.21.10.51.PM
 * UserRights class work in conjunction with Jobs, Person, and other associating classes
 */

/**
 * @author Dököll Solutions, Inc.
 * @version 2014.02.21.10.51.PM
 */

//TODO
//grab info from the DB2 Subjects view items
//Add values to ListBoxes onLoad
//create new Forms and Views for new data entered using this class

public class UserRights extends Person {
    private String FilesRights;
    private String ReportRights;
    private String ChartRights;
    private String VideoRights;
    private String SiteRights;
    private String ImageRights;

    public UserRights() {
    }

	/**
	 * @return the filesRights
	 */
	public String getFilesRights() {
		return FilesRights;
	}

	/**
	 * @param filesRights the filesRights to set
	 */
	public void setFilesRights(String filesRights) {
		FilesRights = filesRights;
	}

	/**
	 * @return the reportRights
	 */
	public String getReportRights() {
		return ReportRights;
	}

	/**
	 * @param reportRights the reportRights to set
	 */
	public void setReportRights(String reportRights) {
		ReportRights = reportRights;
	}

	/**
	 * @return the chartRights
	 */
	public String getChartRights() {
		return ChartRights;
	}

	/**
	 * @param chartRights the chartRights to set
	 */
	public void setChartRights(String chartRights) {
		ChartRights = chartRights;
	}

	/**
	 * @return the videoRights
	 */
	public String getVideoRights() {
		return VideoRights;
	}

	/**
	 * @param videoRights the videoRights to set
	 */
	public void setVideoRights(String videoRights) {
		VideoRights = videoRights;
	}

	/**
	 * @return the siteRights
	 */
	public String getSiteRights() {
		return SiteRights;
	}

	/**
	 * @param siteRights the siteRights to set
	 */
	public void setSiteRights(String siteRights) {
		SiteRights = siteRights;
	}

	/**
	 * @return the imageRights
	 */
	public String getImageRights() {
		return ImageRights;
	}

	/**
	 * @param imageRights the imageRights to set
	 */
	public void setImageRights(String imageRights) {
		ImageRights = imageRights;
	}

	
}





Run main class in this XSnippet as a Java Program to perform tasks in relating classes; items that will later be used as JavaBean and BackBean classes to compliment Xpages files rendered with NSF records...

Java
Köll S Cherizard
February 22, 2014 12:09 AM
Rating
2

All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.



No comments yetLogin first to comment...