src/com/vehiclerental/presentationLayer/headOffice/GuestHeadOfficeController.java
/**
     * Get the list of available branches
     *
     * @param request the request parameters
     * @return the result response
     */
Get the list of available branches
@param request the request parameters
@return the result response
Get the list of available branches @param request the request parameters @return the result response
public static HeadOfficeResponseMessage HandleGetBranches(HeadOfficeRequestMessage request) {
        List<BranchContract> branchContracts = new ArrayList<BranchContract>();
        /*
            Branches are always in memory, no need to proceed to an SQL query
            Even if a branch have been added by an external user during the runtime of the system,
            The branch wouldn't be able to run on a node without a complete restart of the system.
        */
        for (Branch branch : NodeConfiguration.Current.branches.values()) {
            branchContracts.add(new BranchContract(branch));
        }
        return generateSuccessfulResponse(request.OperationCode, branchContracts);
    }
public static HeadOfficeResponseMessage HandleGetBranches ( HeadOfficeRequestMessage request ) { List < BranchContract > branchContracts = new ArrayList < BranchContract > ( ) ; /*
            Branches are always in memory, no need to proceed to an SQL query
            Even if a branch have been added by an external user during the runtime of the system,
            The branch wouldn't be able to run on a node without a complete restart of the system.
        */ for ( Branch branch : NodeConfiguration . Current . branches . values ( ) ) { branchContracts . add ( new BranchContract ( branch ) ) ; } return generateSuccessfulResponse ( request . OperationCode , branchContracts ) ; }
Get the list of available branches
 @param request the request parameters
 @return the result response
Get the list of available branches @param request the request parameters @return the result response
//Form socket response