By: Team CS2113-AY1819S1-T13-2 Since: Aug 2018 Licence: MIT

1. Introduction

ForumBook (FB) is for those who prefer to use a desktop app for module ForumBook. More importantly, FB is optimized for those who prefer to work with a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, FB can be a great place to learn and share comments regarding modules offered in NUS.This can be done faster than traditional GUI apps. Can’t wait? Jump to the Section 2, “Quick Start” to get started. Enjoy!

2. Quick Start

  1. Ensure you have Java version 9 or later installed in your Computer.

  2. Download the latest ForumBook.jar here.

  3. Copy the file to the folder you want to use as the home folder for your Forum Book.

  4. Double-click the file to start the app. The GUI should appear in a few seconds.

    Ui
  5. Type the command in the command box and press Enter to execute it.
    e.g. typing help and pressing Enter will open the help window.

  6. There are two types of users in ForumBook: user and admin

    • Without logging in, you could:

      1. Register using addUser uName/john uPass/123

      2. Login using login uName/john uPass/123

    • As a user, you could:

      1. Show help using help

      2. List all the modules using listModule

      3. Select a module to check the threads under that module using selectModule mCode/CS2113

      4. Select a thread among the threads listed using selectThread tId/1

      5. Create a comment under a thread using createComment tId/1 cContent/This is a new comment

      6. Update a comment created by you using updateComment cId/1 cContent/This is a new comment

      7. Delete a comment created by you using deleteComment cId/1

      8. Create a thread under a module using createThread mCode/CS2113 tTitle/About exams? cContent/Is there any exam?

      9. Update a thread created by you using updateThread tId/1 tTitle/Is there any midterm?

      10. Delete a thread created by you using deleteThread tId/1

      11. Check for latest announcement using checkAnnounce

      12. Delete himself from the ForumBook using 'deleteMe'

      13. Logout from ForumBook using logout

      14. Exits the app using exit

    • As an admin, you could do anything that an ordinary user could do and the following:

      1. Post new announcement using announce aTitle/Urgent! aContent/System maintenance from 3pm to 5pm

      2. Update a given user’s password using updatePass uName/john uPass/456

      3. Block a given user using blockUser uName/john block/true

      4. Create a new module using createModule mCode/MA1508E mTitle/Linear Algebra

      5. Delete a module using deleteModule mCode/MA1508E

      6. Update a comment created by other user using updateComment cId/1 cContent/This is a new comment by admin

      7. Delete a comment created by other user using deleteComment cId/1

      8. Update a thread created by other user using updateThread tId/1 tTitle/This is updated by admin

      9. Delete a thread created by other user using deleteThread tId/1

      10. Set a user as an admin using setAdmin uName/john set/true

      11. Delete a given user using deleteUser uName/john

  7. Note that we populate ForumBook with default data:

    1. Default admin: uName/admin uPass/admin

    2. Default user: uName/user1 uPass/user1

    3. Default module: mCode/CS2113 mTitle/Software Eng

    4. Default thread under CS2113: tTitle/Hey How is CS2113

    5. Default content under that thread: cContent/I am taking this module next sem, how is it?

    6. Default announcement: aTitle/Welcome! aContent/Welcome to ForumBook

  8. Refer to Section 3, “Features” for details of each command.

3. Features

Command Format

  • Words in UPPER_CASE are the parameters to be supplied by the user e.g. in addUser uName/USER_NAME uPass/USER_PASSWORD, USER_NAME and USER_PASSWORD are parameters supplied by user in addUser uName/john uPass/123.

  • Parameters can be in any order e.g. if the command specifies mCode/CS2113 tTitle/Is there mid-terms?, tTitle/Is there mid-terms? mCode/CS2113 is also acceptable.

  • Command keywords are case sensitive. e.g. adduser, DELETECOMMENT is not recognised.

3.1. Viewing help : help

Format: help === Register a new User : addUser

Register a New User to the Forum. User Name is unique and case sensitive.
Format: addUser uName/USER NAME uPass/USER PASSWORD

Examples:

  • addUser uName/user1 uPass/user1

  • User Name and password is unique and case sensitive.

3.2. logIn to the forum : login

Login to the forum with a registered user name and password.
Format: login uName/USER NAME uPass/USER PASSWORD

Examples:

  • login uName/user1 uPass/user1

3.3. Listing all the modules : listModule

List all the existing modules in the forum book.
Format: listModule

Examples:

  • listModule

3.4. Listing all the forumThreads : selectModule

List all the existing forumThreads under a specific module that exists as well.
Format: selectModule mCode/MODULE CODE

Examples:

  • selectModule mCode/CS2113

3.5. Listing all the comments : selectThread

List all the existing comments under a specific forumThread that exists as well.
Format: selectThread tId/THREAD ID

Examples:

  • selectThread tId/123

3.6. Creating a new forumThread : createThread

Create a new forumThread under a specific module that exists
Format: createThread mCode/MODULE CODE tTitle/THREAD TITLE cContent/COMMENT CONTENT

Examples:

  • createThread mCode/CS2113 tTitle/Exam Information cContent/All the best for the final guys

3.7. Creating a new comment : createComment

Create a new comment under a specific forumThread that exists.
Format: createComment tId/THREAD ID cContent/COMMENT CONTENT

Examples:

  • createComment tId/1 cContent/This is a new comment

3.8. Updating a forumThread title : updateThread

Update an existing forumThread title in the forum book.
Format: updateThread tId/THREAD ID tTitle/NEW THREAD TITLE

  • Only admin and the forumThread creator(unblocked) are allowed to update the title.

Examples:

  • updateThread tId/123 tTitle/This is a new title

3.9. Updating a comment content : updateComment

Update an existing comment title in the forum book.
Format: updateComment cId/COMMENT ID cContent/NEW COMMENT CONTENT

  • Only admin and the comment creator(unblocked) are allowed to update the content.

Examples:

  • updateComment tId/123 tTitle/This is a new title

3.10. deleting a forumThread : deleteThread

Delete an existing forumThread in the forum book.
Format: deleteThread tId/THREAD ID

  • Only admin and the forumThread creator are allowed to delete the forumThread.

Examples:

  • deleteThread tId/1

3.11. deleting a comment : deleteComment

Delete an existing comment in the forum book.
Format: deleteComment cId/COMMENT ID

  • Only admin and the comment creator are allowed to delete the comment.

Examples:

  • deleteComment cId/1

3.12. Announcing new command : announce

Announce the new announcement created by admin. The first character of announcement title and content must not be a whitespace.
Format: announce aTitle/ANNOUNCEMENT_TITLE aContent/ANNOUNCEMENT_CONTENT

Example:

  • announce aTitle/Urgent! aContent/System maintenance from 4pm to 5pm.

3.13. Checking for the latest announcement : checkAnnounce

Check for the latest announcement.
Format: checkAnnounce

3.14. Blocking a user from creating thread or comment : blockUser

Block a specific user that match the given argument by admin. User to be blocked must not be an admin. block only takes true or false
Format: blockUser uName/USER_NAME block/BLOCK_OR_UNBLOCK

Example:

  • blockUser uName/john block/true

  • blockUser uName/john block/false

3.15. Setting a user as admin or revert an admin to user : setAdmin

Set a user as an admin or revert an admin to user. The user to set as admin must not been blocked. set only takes true or false
Format: setAdmin uName/USER_NAME set/SET_OR_REVERT

Examples:

  • setAdmin uName/john set/true

  • setAdmin uName/john set/false

3.16. Creating a new module : createModule

Create a new module by admin. Module code should follow (2 or 3 capital letters) + (4 numbers) + (0 or 1 capital letter) and it should not be blank. E.g. MA1580E, CS2113 or USP1000A, USP1000. Module title should only contain letters and spaces.+ Format: createModule mCode/MODULE_CODE mTitle/MODULE_TITLE

Example:

  • createModule mCode/CS2113 mTitle/Software Engineering and OOP

3.17. Updating a module : updateModule

Update an existing module by admin. Note that either one of mCode and mTitle has to be specified
Format: updateModule mId/MODULE_ID [mCode/MODULE_CODE] [mTitle/MODULE_TITLE]

Examples:

  • updateModule mId/3 mCode/CS1221

  • updateModule mId/3 mTitle/Random CS module

  • updateModule mId/3 mCode/CS1221 mTitle/Random CS module

3.18. Deleting a module : deleteModule

Delete an existing module by admin.
Format: deleteModule mCode/MODULE_CODE

Example:

  • deleteModule mCode/CS2113

3.19. Updating password : updatePass

Update the given user’s password by admin.
Format: updatePass uName/USER_NAME uPass/USER_PASSWORD

Example:

  • updatePass uName/john uPass/098

3.20. Delete a user(Admin) : deleteUser

Delete a given user by admin.
Format: deleteUser uName/USER_NAME

Example:

  • deleteUser uName/john

3.21. Delete a user(User) : deleteMe

User deletes himself from the ForumBook.
Format: deleteMe

Example:

  • deleteMe

3.22. Logout from the forum : logout

Logout from the Forum.
Format: logout === Exiting the program : exit

Exits the program.
Format: exit

3.23. Saving the data

Forum book data are saved in the hard disk automatically after any command that changes the data.
There is no need to save manually.

3.24. Security

All data including user credential and application data are encrypted on your disk. You don’t need to worry about other people who have access to your computer steal your information.

4. FAQ

Q: How do I transfer my data to another Computer?
A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Forum Book folder.`

Q: What if I forget my password?
A: Ask an admin to help, he/she has the privilege to reset your password.

Q: How do I uninstall this application?
A: Just delete the folder containing this application, it does not touch any other part of your computer.

Q: What if I want change my password?
A: Ask an admin to help, he/she has the privilege to change your password. Alternatively, User can delete their account and re-create with your desired Password.

5. Command Summary

  • Help: help

  • RegisterUser : addUser uName/USER NAME uPass/USER PASSWORD
    e.g addUser uName/MyName uPass/password

  • Login : login uName/USER NAME uPass/USER PASSWORD
    e.g login uName/MyName uPass/password

  • createThread : createThread mCode/MODULE CODE tTitle/THREAD TITLE cContent/COMMENT CONTENT
    e.g createThread mCode/CS2113 tTitle/Exam Information cContent/All the best for the final guys

  • createComment : createComment tId/THREAD ID cContent/COMMENT CONTENT
    e.g createComment tId/1 cContent/This is a new comment

  • updateThread : updateThread tId/THREAD ID tTitle/NEW THREAD TITLE
    e.g updateThread tId/123 tTitle/This is a new title

  • updateComment : updateComment cId/COMMENT ID cContent/NEW COMMENT CONTENT
    e.g updateComment tId/123 tTitle/This is a new title

  • deleteThread : deleteThread tId/THREAD ID
    e.g deleteThread tId/1

  • deleteComment : deleteComment cId/COMMENT ID
    e.g deleteComment cId/1

  • listModule: listModule

  • selectModule : selectModule mCode/MODULE CODE
    e.g selectModule mCode/CS2113

  • selectThread : selectThread tId/THREAD ID
    e.g selectThread tId/123

  • Announce : announce aTitle/ANNOUNCEMENT_TITLE aContent/ANNOUNCEMENT_CONTENT
    e.g announce aTitle/Urgent! aContent/System maintenance from 4pm to 5pm.

  • CheckAnnounce : checkAnnounce

  • BlockUser : blockUser uName/USER_NAME block/BLOCK_UNBLOCK
    e.g blockUser uName/john block/false

  • SetAdmin : setAdmin uName/USER_NAME set/SET_OR_REVERT
    e.g setAdmin uName/john set/true

  • CreateModule : createModule mCode/MODULE_CODE mTitle/MODULE_TITLE
    e.g createModule mCode/CS2113 mTitle/Software Engineering and OOP

  • UpdateModule : updateModule mId/MODULE_ID [mCode/MODULE_CODE] [mTitle/MODULE_TITLE]
    e.g updateModule mId/3 mCode/CS1221
    e.g updateModule mId/3 mTitle/Random CS module
    e.g updateModule mId/3 mCode/CS1221 mTitle/Random CS module

  • DeleteModule : deleteModule mCode/MODULE_CODE
    e.g deleteModule mCode/CS2113

  • UpdatePass : updatePass uName/USER_NAME uPass/USER_PASSWORD
    e.g updatePass uName/john uPass/098

  • DeleteUser(Admin) : deleteUser uName/USER_NAME
    e.g deleteUser uName/john

  • DeleteUser(User) : deleteMe

  • Logout : logout