Package org.apache.ofbiz.party.contact
Class ContactMechWorker
java.lang.Object
org.apache.ofbiz.party.contact.ContactMechWorker
Worker methods for Contact Mechanisms
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
getContactMechAndRelated
(ServletRequest request, String partyId, Map<String, Object> target) static String
getContactMechAttribute
(Delegator delegator, String contactMechId, String attrName) getCurrentPostalAddress
(ServletRequest request, String partyId, String curContactMechId) static void
getFacilityContactMechAndRelated
(ServletRequest request, String facilityId, Map<String, Object> target) static GenericValue
getFacilityContactMechByPurpose
(Delegator delegator, String facilityId, List<String> purposeTypes) Returns the first valid FacilityContactMech found based on the given facilityId and a prioritized list of purposesgetFacilityContactMechValueMaps
(Delegator delegator, String facilityId, boolean showOld) getFacilityContactMechValueMaps
(Delegator delegator, String facilityId, boolean showOld, String contactMechTypeId) getFacilityContactMechValueMaps
(Delegator delegator, String facilityId, Timestamp date, String contactMechTypeId) static List<Map<String,
GenericValue>> getOrderContactMechValueMaps
(Delegator delegator, String orderId) getPartyContactMechValueMaps
(Delegator delegator, String partyId, boolean showOld) getPartyContactMechValueMaps
(Delegator delegator, String partyId, boolean showOld, String contactMechTypeId) getPartyContactMechValueMaps
(Delegator delegator, String partyId, Timestamp date, String contactMechTypeId) getPartyPostalAddresses
(ServletRequest request, String partyId, String curContactMechId) static String
getPostalAddressPostalCodeGeoId
(GenericValue postalAddress, Delegator delegator) static Collection<Map<String,
GenericValue>> getWorkEffortContactMechValueMaps
(Delegator delegator, String workEffortId) static boolean
isCompanyAddress
(GenericValue postalAddress, String companyPartyId) static boolean
isUspsAddress
(GenericValue postalAddress) static String
urlEncodePostalAddress
(GenericValue postalAddress) Returns a PostalAddressGenericValue
as a URL encodedString
.
-
Method Details
-
getPartyContactMechValueMaps
-
getPartyContactMechValueMaps
-
getPartyContactMechValueMaps
-
getFacilityContactMechValueMaps
-
getFacilityContactMechValueMaps
-
getFacilityContactMechValueMaps
-
getOrderContactMechValueMaps
-
getWorkEffortContactMechValueMaps
public static Collection<Map<String,GenericValue>> getWorkEffortContactMechValueMaps(Delegator delegator, String workEffortId) -
getContactMechAndRelated
public static void getContactMechAndRelated(ServletRequest request, String partyId, Map<String, Object> target) -
getFacilityContactMechByPurpose
public static GenericValue getFacilityContactMechByPurpose(Delegator delegator, String facilityId, List<String> purposeTypes) Returns the first valid FacilityContactMech found based on the given facilityId and a prioritized list of purposes- Parameters:
delegator
- the delegatorfacilityId
- the facility idpurposeTypes
- a List of ContactMechPurposeType ids which will be checked one at a time until a valid contact mech is found- Returns:
- returns the first valid FacilityContactMech found based on the given facilityId and a prioritized list of purposes
-
getFacilityContactMechAndRelated
public static void getFacilityContactMechAndRelated(ServletRequest request, String facilityId, Map<String, Object> target) -
getPartyPostalAddresses
-
getCurrentPostalAddress
-
isUspsAddress
-
isCompanyAddress
-
getContactMechAttribute
-
getPostalAddressPostalCodeGeoId
public static String getPostalAddressPostalCodeGeoId(GenericValue postalAddress, Delegator delegator) throws GenericEntityException - Throws:
GenericEntityException
-
urlEncodePostalAddress
public static String urlEncodePostalAddress(GenericValue postalAddress) throws GenericEntityException, UnsupportedEncodingException Returns a PostalAddressGenericValue
as a URL encodedString
.- Parameters:
postalAddress
- A PostalAddressGenericValue
.- Returns:
- A URL encoded
String
. - Throws:
GenericEntityException
UnsupportedEncodingException
-