Package org.apache.ofbiz.webpos.session
Class WebPosSession
java.lang.Object
org.apache.ofbiz.webpos.session.WebPosSession
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionWebPosSession
(String id, Map<String, Object> attributes, GenericValue userLogin, Locale locale, String productStoreId, String facilityId, String currencyUomId, Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart) -
Method Summary
Modifier and TypeMethodDescriptioncheckLogin
(String username, String password, LocalDispatcher dispatcher) Check login generic value.getAttribute
(String name) Gets attribute.getCart()
Gets cart.Gets currency uom id.Gets current transaction.Gets delegator.Gets dispatcher.Gets facility id.getId()
Gets id.Gets locale.Gets product store id.Gets user login.Gets user login id.Gets user party id.boolean
hasRole
(GenericValue userLogin, String roleTypeId) Has role boolean.boolean
Is manager logged in boolean.void
login
(String username, String password, LocalDispatcher dispatcher) Login.void
logout()
Logout.void
setAttribute
(String name, Object value) Sets attribute.void
setCurrencyUomId
(String currencyUomId) Sets currency uom id.void
setCurrentTransaction
(WebPosTransaction webPosTransaction) Sets current transaction.void
setFacilityId
(String facilityId) Sets facility id.void
Sets locale.void
setProductStoreId
(String productStoreId) Sets product store id.void
setUserLogin
(GenericValue userLogin) Sets user login.
-
Constructor Details
-
WebPosSession
public WebPosSession(String id, Map<String, Object> attributes, GenericValue userLogin, Locale locale, String productStoreId, String facilityId, String currencyUomId, Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart)
-
-
Method Details
-
getUserLogin
Gets user login.- Returns:
- the user login
-
setUserLogin
Sets user login.- Parameters:
userLogin
- the user login
-
setAttribute
Sets attribute.- Parameters:
name
- the namevalue
- the value
-
getAttribute
Gets attribute.- Parameters:
name
- the name- Returns:
- the attribute
-
getId
Gets id.- Returns:
- the id
-
getUserLoginId
Gets user login id.- Returns:
- the user login id
-
getUserPartyId
Gets user party id.- Returns:
- the user party id
-
getLocale
Gets locale.- Returns:
- the locale
-
setLocale
Sets locale.- Parameters:
locale
- the locale
-
getProductStoreId
Gets product store id.- Returns:
- the product store id
-
setProductStoreId
Sets product store id.- Parameters:
productStoreId
- the product store id
-
getFacilityId
Gets facility id.- Returns:
- the facility id
-
setFacilityId
Sets facility id.- Parameters:
facilityId
- the facility id
-
getCurrencyUomId
Gets currency uom id.- Returns:
- the currency uom id
-
setCurrencyUomId
Sets currency uom id.- Parameters:
currencyUomId
- the currency uom id
-
getDelegator
Gets delegator.- Returns:
- the delegator
-
getDispatcher
Gets dispatcher.- Returns:
- the dispatcher
-
getCart
Gets cart.- Returns:
- the cart
-
logout
public void logout()Logout. -
login
public void login(String username, String password, LocalDispatcher dispatcher) throws WebPosSession.UserLoginFailure Login.- Parameters:
username
- the usernamepassword
- the passworddispatcher
- the dispatcher- Throws:
WebPosSession.UserLoginFailure
- the user login failure
-
checkLogin
public GenericValue checkLogin(String username, String password, LocalDispatcher dispatcher) throws WebPosSession.UserLoginFailure Check login generic value.- Parameters:
username
- the usernamepassword
- the passworddispatcher
- the dispatcher- Returns:
- the generic value
- Throws:
WebPosSession.UserLoginFailure
- the user login failure
-
hasRole
Has role boolean.- Parameters:
userLogin
- the user loginroleTypeId
- the role type id- Returns:
- the boolean
-
isManagerLoggedIn
public boolean isManagerLoggedIn()Is manager logged in boolean.- Returns:
- the boolean
-
getCurrentTransaction
Gets current transaction.- Returns:
- the current transaction
-
setCurrentTransaction
Sets current transaction.- Parameters:
webPosTransaction
- the web pos transaction
-