Added content.
- Theory assignments - Notes - Practical - Question Papers - DISCLAIMER and motto files Lastly, updated README. Stored using LFS: - Practical/Assignment-1/AWS EC2 - User Guide.pdf - Practical/Assignment-3/Bank-App-Demo.mp4 - Practical/Assignment-3/Demo-3.mp4 - Practical/Assignment-3/Salesforce Apex - Reference Guide.pdf
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,47 @@
|
||||
# Steps to install KVM
|
||||
|
||||
---
|
||||
|
||||
1. Check if virtualization is enabled.
|
||||
|
||||
```shell
|
||||
cat /proc/cpuinfo | grep -Ec '(vmx|svm)'
|
||||
```
|
||||
|
||||
In this command, we are printing the contents of `/proc/cpuinfo`, then using grep for pattern matching. `vmx` is the name for Intel's virtualization and `svm` is AMD's. If the output is 0, virtualization is disabled in BIOS, otherwise it's on.
|
||||
|
||||
2. Install required packages
|
||||
|
||||
```shell
|
||||
sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients
|
||||
```
|
||||
|
||||
- qemu-kvm – An opensource emulator and virtualization package that provides hardware emulation.
|
||||
- virt-manager – A Qt-based graphical interface for managing virtual machines via the libvirt daemon.
|
||||
- libvirt-daemon-system – A package that provides configuration files required to run the libvirt daemon.
|
||||
- virtinst – A set of command-line utilities for provisioning and modifying virtual machines.
|
||||
- libvirt-clients – A set of client-side libraries and APIs for managing and controlling virtual machines & hypervisors from the command line.
|
||||
|
||||
3. Start and enable virtualization daemon
|
||||
|
||||
```shell
|
||||
sudo systemctl enable libvirtd
|
||||
sudo systemctl start libvirtd
|
||||
sudo systemctl status libvirtd
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> After viewing status of the `libvirtd` service, press `q` to exit out of the view.
|
||||
|
||||
4. Add user to KVM and libvirt group
|
||||
|
||||
```shell
|
||||
sudo usermod -aG kvm $USER
|
||||
sudo usermod -aG libvirt $USER
|
||||
```
|
||||
|
||||
5. Launch KVM Virtual Machine Manager from App Launcher.
|
||||
|
||||
6. `QEMU/KVM` should show _connecting_ followed by _connected_ in the app. Now, you can launch as many virtual machines as you want!
|
||||
|
||||
---
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,173 @@
|
||||
# Bank Application using Apex
|
||||
|
||||
Problem Statement: Create Bank application in SalesForce.com using Apex programming Language.
|
||||
|
||||
- [Method 1 (Create Visual App)](#method-1)
|
||||
- [Method 2 (Execution Window)](#method-2) *(expected method)*
|
||||
- [Video Instructions](https://git.kska.io/sppu-te-comp-content/CloudComputing/src/branch/main/Practical/Assignment-3/Bank-App-Demo.mp4)
|
||||
|
||||
---
|
||||
|
||||
## Method 1
|
||||
|
||||
1. In the Developer Console, after creating a new `Apex Class` with the name `CreateBankCustomer`, paste the below code:
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Remove all the existing stuff from the file before pasting.
|
||||
|
||||
```java
|
||||
public class CreateBankCustomer {
|
||||
public String customerName { get; set; }
|
||||
public String contactNumber { get; set; }
|
||||
public String customerSegment { get; set; }
|
||||
public String accountNumber { get; set; }
|
||||
public String accountType { get; set; }
|
||||
|
||||
public List<SelectOption> segmentOptions { get; set; }
|
||||
public List<SelectOption> accountTypeOptions { get; set; }
|
||||
|
||||
public CreateBankCustomer(ApexPages.StandardController controller) {
|
||||
segmentOptions = new List<SelectOption>();
|
||||
segmentOptions.add(new SelectOption('', '- None -'));
|
||||
segmentOptions.add(new SelectOption('Retail Banking', 'Retail Banking'));
|
||||
segmentOptions.add(new SelectOption('Corporate Banking', 'Corporate Banking'));
|
||||
segmentOptions.add(new SelectOption('Private Banking', 'Private Banking'));
|
||||
segmentOptions.add(new SelectOption('Investment Banking', 'Investment Banking'));
|
||||
|
||||
accountTypeOptions = new List<SelectOption>();
|
||||
accountTypeOptions.add(new SelectOption('', '- None -'));
|
||||
accountTypeOptions.add(new SelectOption('Savings', 'Savings'));
|
||||
accountTypeOptions.add(new SelectOption('Current', 'Current'));
|
||||
}
|
||||
|
||||
public PageReference createCustomer() {
|
||||
System.debug('Creating new bank customer');
|
||||
if (!String.isEmpty(customerName)) {
|
||||
Account customer = new Account(
|
||||
Name = customerName,
|
||||
Phone = contactNumber,
|
||||
Industry = customerSegment,
|
||||
AccountNumber = accountNumber,
|
||||
Type = accountType
|
||||
);
|
||||
insert customer;
|
||||
PageReference pg = new PageReference('/' + customer.Id);
|
||||
pg.setRedirect(true);
|
||||
return pg;
|
||||
} else {
|
||||
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Please enter Customer Name'));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public PageReference cancelCreation() {
|
||||
return new PageReference('/' + Schema.SObjectType.Account.getKeyPrefix() + '/o');
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. In top-left corner, click on `File` followed by `Save` to save this file.
|
||||
|
||||
3. In top-left corner, click on `File`, then `New -> Visualforce Page` and create a new Apex Page titled `CreateBankCustomer`. Then, paste the following code:
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Remove all the existing stuff from the file before pasting.
|
||||
|
||||
```xml
|
||||
<apex:page standardController="Account" extensions="CreateBankCustomer">
|
||||
<apex:form>
|
||||
<apex:pageMessages />
|
||||
<apex:pageBlock title="Create Bank Customer">
|
||||
<apex:pageBlockSection columns="1">
|
||||
<apex:inputText value="{!customerName}" label="Customer Name"/>
|
||||
<apex:inputText value="{!contactNumber}" label="Contact Number"/>
|
||||
<apex:inputText value="{!accountNumber}" label="Account Number"/>
|
||||
<apex:selectList value="{!accountType}" size="1" label="Account Type">
|
||||
<apex:selectOptions value="{!accountTypeOptions}" />
|
||||
</apex:selectList>
|
||||
<apex:selectList value="{!customerSegment}" size="1" label="Customer Segment">
|
||||
<apex:selectOptions value="{!segmentOptions}"/>
|
||||
</apex:selectList>
|
||||
</apex:pageBlockSection>
|
||||
<apex:pageBlockButtons >
|
||||
<apex:commandButton value="Create" action="{!createCustomer}" />
|
||||
<apex:commandButton value="Cancel" action="{!cancelCreation}" />
|
||||
</apex:pageBlockButtons>
|
||||
</apex:pageBlock>
|
||||
</apex:form>
|
||||
</apex:page>
|
||||
```
|
||||
|
||||
4. In top-left corner, click on `File` followed by `Save` to save this file.
|
||||
|
||||
|
||||
5. In top-left corner, right above the line numbers, click on `Preview` button. A new browser tab will open. Enter the required details and click on `Create` to create a new user.
|
||||
|
||||
> [!TIP]
|
||||
> Visit `Accounts` section from App Launcher to view the changes.
|
||||
|
||||
---
|
||||
|
||||
## Method 2
|
||||
|
||||
1. In the Developer Console, after creating a new `Apex Class` with the name `User`, paste the below code:
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Remove all the existing stuff from the file before pasting.
|
||||
|
||||
```java
|
||||
public class User {
|
||||
public static void createAccount(String accName, String accType) {
|
||||
Account newAcc = new Account();
|
||||
newAcc.Name = accName;
|
||||
newAcc.Type = accType; // Use the standard Type field
|
||||
|
||||
try {
|
||||
insert newAcc;
|
||||
System.debug('Account created with id: ' + newAcc.Id);
|
||||
} catch (DmlException e) {
|
||||
System.debug('Error creating Account: ' + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static void deleteAccount(Id accId) {
|
||||
// Check if the account ID is valid
|
||||
if (accId == null) {
|
||||
System.debug('Account Id cannot be null');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// Perform the delete operation
|
||||
delete [SELECT Id FROM Account WHERE Id = :accId LIMIT 1];
|
||||
System.debug('Account with ID: ' + accId + ' has been deleted.');
|
||||
} catch (DmlException e) {
|
||||
System.debug('Error deleting Account: ' + e.getMessage());
|
||||
} catch (QueryException e) {
|
||||
System.debug('Error finding Account: ' + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
2. In top-left corner, click on `File` followed by `Save` to save this file.
|
||||
|
||||
3. Press `Ctrl+E` to open execute anonymous window.
|
||||
|
||||
4. Paste the below content and hit `Execute`.
|
||||
|
||||
```java
|
||||
User.createAccount('Test Account', 'Savings);
|
||||
User.deleteAccount('#specified_Id');
|
||||
|
||||
// Id can be checked in URL when clicked on any account created in Accounts Page
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> Visit `Accounts` section from App Launcher to view the changes.
|
||||
|
||||
> [!NOTE]
|
||||
> For account deletion, you have to do it directly from the `Accounts` section in App Launcher.
|
||||
|
||||
---
|
||||
Binary file not shown.
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
# Steps for using Apex to create new accounts in Salesforce (for Developers)
|
||||
|
||||
This file contains instructions for Assignment-3.
|
||||
|
||||
---
|
||||
|
||||
## Code
|
||||
|
||||
In the Developer Console, after creating a new `Apex Class` with the name `user`, paste the below code:
|
||||
|
||||
```
|
||||
public class user {
|
||||
public static void createAccount(String accountName) {
|
||||
// Create a new Account instance
|
||||
Account newAccount = new Account();
|
||||
newAccount.Name = accountName;
|
||||
|
||||
// Insert the Account into the database
|
||||
try {
|
||||
insert newAccount;
|
||||
System.debug('Account created with Id: ' + newAccount.Id);
|
||||
} catch (DmlException e) {
|
||||
System.debug('Error creating account: ' + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Execution
|
||||
|
||||
- In the Developer Console itself, after pasting the above code, press `Ctrl+S` to save the changes, then
|
||||
- Press `Ctrl+E` to open execute anonymous window,
|
||||
- Paste the below content and hit `Execute`.
|
||||
|
||||
```apex
|
||||
user.createAccount('Test-1');
|
||||
user.createAccount('Test-2');
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> Visit `Accounts` section from App Launcher to view the changes.
|
||||
|
||||
> [!NOTE]
|
||||
> For account deletion, you have to do it directly from the `Accounts` section in App Launcher.
|
||||
|
||||
---
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,66 @@
|
||||
# Objects for Accounts Management App
|
||||
|
||||
Problem Statement: Design and develop custom Application (Accounts Management) using Salesforce Cloud.
|
||||
|
||||
---
|
||||
|
||||
## Objects
|
||||
|
||||
1. Account Details
|
||||
2. Contact Details
|
||||
3. Activity Information
|
||||
4. Case Information
|
||||
|
||||
---
|
||||
|
||||
## Fields and Relations
|
||||
|
||||
### Account Details
|
||||
|
||||
1. Fields:
|
||||
- Account Name (Text)
|
||||
- Account Type (Picklist: Customer, Partner, Vendor, etc.)
|
||||
- Industry (Picklist: Technology, Finance, Healthcare, etc.)
|
||||
- Phone (Phone)
|
||||
- Address (Address)
|
||||
2. Relationships:
|
||||
Account Details to Contact Details: One-to-Many (One Account can have multiple Contacts)
|
||||
Account Details to Activity Information: One-to-Many (One Account can have multiple Activities)
|
||||
Account Details to Case Information: One-to-Many (One Account can have multiple Cases)
|
||||
|
||||
### Contact Details
|
||||
|
||||
1. Fields:
|
||||
- Name (Text)
|
||||
- Email (Email)
|
||||
- Phone (Phone)
|
||||
- Job Title (Text)
|
||||
- Account (Lookup to Account)
|
||||
2. Relationships:
|
||||
- Contact Details to Activity Information: One-to-Many (One Contact can have multiple Activities)
|
||||
- Contact Details to Case Information: One-to-Many (One Contact can have multiple Cases)
|
||||
|
||||
### Activity Information
|
||||
|
||||
1. Fields:
|
||||
- Subject (Text)
|
||||
- Account (Lookup to Account)
|
||||
- Contact (Lookup to Contact)
|
||||
- Activity Type (Picklist: Call, Meeting, Email, Task)
|
||||
- Due Date (Date)
|
||||
- Status (Picklist: Not Started, In Progress, Completed)
|
||||
- Notes (Long Text Area)
|
||||
|
||||
### Case Information
|
||||
|
||||
1. Fields:
|
||||
- Case Number (Auto Number)
|
||||
- Account (Lookup to Account)
|
||||
- Contact (Lookup to Contact)
|
||||
- Status (Picklist: New, In Progress, Escalated, Closed)
|
||||
- Priority (Picklist: Low, Medium, High)
|
||||
- Description (Long Text Area)
|
||||
- Created Date (Date/Time)
|
||||
- Last Modified Date (Date/Time)
|
||||
|
||||
---
|
||||
@@ -0,0 +1,48 @@
|
||||
# Objects for Contact Management App
|
||||
|
||||
Problem Statement: Design and develop custom Application (Contact Management) using Salesforce Cloud.
|
||||
|
||||
---
|
||||
|
||||
## Objects
|
||||
|
||||
1. Contact Information
|
||||
2. Interaction History
|
||||
3. Company Details
|
||||
|
||||
---
|
||||
|
||||
## Fields and Relations
|
||||
|
||||
### Contact Information
|
||||
|
||||
1. Fields:
|
||||
- Name (Text)
|
||||
- Email (Email)
|
||||
- Phone (Phone)
|
||||
- Address (Text Area)
|
||||
- Date of Birth (Date)
|
||||
- Company (Text)
|
||||
2. Relationships:
|
||||
- Contact Information to Interaction History: One-to-Many (One contact can have multiple interactions)
|
||||
- Contact Information to Company Details: Many-to-One (Multiple contacts can belong to one company)
|
||||
|
||||
### Interaction History
|
||||
|
||||
1. Fields:
|
||||
- Interaction Date (Date/Time)
|
||||
- Interaction Type (Picklist: Call, Email, Meeting, Other)
|
||||
- Notes (Long Text Area)
|
||||
- Follow-up Date (Date)
|
||||
2. Relationships:
|
||||
- Lookup Relationship to Contact Information (Each interaction is related to a specific contact)
|
||||
|
||||
### Company Details
|
||||
|
||||
1. Fields:
|
||||
- Company Name (Text)
|
||||
- Industry (Picklist: Technology, Finance, Healthcare, etc.)
|
||||
2. Relationships:
|
||||
- Lookup Relationship to Contact Information (A company can have multiple contacts)
|
||||
|
||||
---
|
||||
@@ -0,0 +1,56 @@
|
||||
# Objects for Online Shopping App
|
||||
|
||||
Problem Statement: Design and develop custom Application (Online Shopping) using Salesforce Cloud.
|
||||
|
||||
---
|
||||
|
||||
## Objects
|
||||
|
||||
1. Online Product
|
||||
2. Product Category
|
||||
3. Customer Details
|
||||
4. Order Details
|
||||
|
||||
---
|
||||
|
||||
## Fields and Relations
|
||||
|
||||
### Online Product
|
||||
|
||||
1. Fields:
|
||||
- Product Name (Text)
|
||||
- Description (Long Text)
|
||||
- Price (Currency)
|
||||
- Stock Quantity (Number)
|
||||
- Product Category (Picklist)
|
||||
2. Relationships:
|
||||
- Related to Product Category (Many-to-One)
|
||||
|
||||
### Product Category
|
||||
|
||||
1. Fields:
|
||||
- Category Name (Text/Picklist)
|
||||
2. Relationships:
|
||||
- Related to Online Product (One-to-Many)
|
||||
|
||||
### Customer Details
|
||||
|
||||
1. Fields:
|
||||
- Name (Text)
|
||||
- Email (Email)
|
||||
- Phone Number (Phone)
|
||||
- Address (Text Area)
|
||||
2. Relationships:
|
||||
- Related to Orders Details (One-to-Many)
|
||||
|
||||
### Order Details
|
||||
|
||||
1. Fields:
|
||||
- Order Number (Auto-Number)
|
||||
- Order Date (Date/Time)
|
||||
- Total Amount (Currency)
|
||||
- Status (Picklist: Pending, Shipped, Delivered, Cancelled)
|
||||
2. Relationships:
|
||||
- Related to Customer Details (Many-to-One)
|
||||
|
||||
---
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user