Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to create a new Java class to store information about site users in the system. #41

Open
computate opened this issue Sep 23, 2021 · 0 comments
Assignees

Comments

@computate
Copy link
Member

computate commented Sep 23, 2021

Mission to create a new Java class to store information about site users in the system.

Mission

Your mission, should you choose to accept it, is to create a new Java class to store information about site users in the system. .

The day of the operation is October 26th, 2021

You will have 4 hours to complete your mission.

One of the project’s major goals is to establish https://cc.curriki.org as the global authoring and distribution hub and library for openly licensed, next generation, open educational resources (OER+) under the least restrictive Creative Commons license, CC-BY.

You will be joining a team of the boldest

of all Red Hatters for this mission, who will be at your service developing the code and automating the deployment to OpenShift.

  • Should you, or any of your force be taken or compromised that day, you must report back as many changes as you have made, and any knowledge of your actions, by pull request or comments on the issue on the board.

How to get started:

Follow the instructions here to setup the project: https://github.com/team19hackathon2021/ActiveLearningStudio-API/tree/master/src

The details of your mission:

  • The Java package name will be: org.curriki.api.enus.user
  • The Java class name will be: SiteUser
  • The path to the Java class will be: /usr/local/src/ActiveLearningStudio-API/src/main/java/org/curriki/api/enus/user/SiteUser.java
  • The Java class will extend: SiteUserGen<BaseModel>
package org.curriki.api.enus.user;

import java.util.List;
import org.curriki.api.enus.base.BaseModel;
import org.curriki.api.enus.wrap.Wrap;

/**
 * Model: true
 * Stored: true
 * Indexed: true
 * Saved: true

 * ApiUri.enUS: /api/user
 * ApiTag.enUS: User

 * ApiMethod: Search

 * ApiMethod: PATCH

 * ApiMethod: POST

 * AName.enUS: a site user
 * Color: gray
 * IconGroup: regular
 * IconName: user-cog
 * NameVar: siteUser
 **/

public class SiteUser extends SiteUserGen<BaseModel> {
}

Create the init method for the userKey field inside the SiteUser class

Create an initialization method that starts with an underscore (_)userKey to define the userKey field

Here is a suggestion on what the code might look like:

	protected void _userKey(Wrap<Long> c) {
	}

Create the init method for the userKeys field inside the SiteUser class

Create an initialization method that starts with an underscore (_)userKeys to define the userKeys field

Here is a suggestion on what the code might look like:

protected void _userKeys(List<Long> l) {
		l.add(pk);
	}

Create the init method for the userId field inside the SiteUser class

Create an initialization method that starts with an underscore (_)userId to define the userId field

Here is a suggestion on what the code might look like:

	protected void _userId(Wrap<String> c) {
	}

Create the init method for the userName field inside the SiteUser class

Create an initialization method that starts with an underscore (_)userName to define the userName field

Here is a suggestion on what the code might look like:

	protected void _userName(Wrap<String> c) {
	}

Create the init method for the userEmail field inside the SiteUser class

Create an initialization method that starts with an underscore (_)userEmail to define the userEmail field

Here is a suggestion on what the code might look like:

	protected void _userEmail(Wrap<String> c) {
	}

Create the init method for the userFirstName field inside the SiteUser class

Create an initialization method that starts with an underscore (_)userFirstName to define the userFirstName field

Here is a suggestion on what the code might look like:

	protected void _userFirstName(Wrap<String> c) {
	}

Create the init method for the userLastName field inside the SiteUser class

Create an initialization method that starts with an underscore (_)userLastName to define the userLastName field

Here is a suggestion on what the code might look like:

	protected void _userLastName(Wrap<String> c) {
	}

Create the init method for the userFullName field inside the SiteUser class

Create an initialization method that starts with an underscore (_)userFullName to define the userFullName field

Here is a suggestion on what the code might look like:

	protected void _userFullName(Wrap<String> c) {
	}

Create the _objectTitle method inside the SiteUser class

	protected void _objectTitle(Wrap<String> c) {
		c.o(String.format("%s (%s) <%s>", userFullName, userName, userEmail));
	}

This message will not self-destruct.

This message will not self destruct, because this project is open source.

@masoodfaisal masoodfaisal added the curriki-assigned for filtering the board label Oct 24, 2021
@computate computate added Java and removed curriki-assigned for filtering the board labels Oct 25, 2021
@masoodfaisal masoodfaisal added the curriki-assigned for filtering the board label Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants