Package org.apache.ofbiz.party.contact
Class ContactMechWorker
- java.lang.Object
-
- org.apache.ofbiz.party.contact.ContactMechWorker
-
public class ContactMechWorker extends java.lang.Object
Worker methods for Contact Mechanisms
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
getContactMechAndRelated(javax.servlet.ServletRequest request, java.lang.String partyId, java.util.Map<java.lang.String,java.lang.Object> target)
static java.lang.String
getContactMechAttribute(Delegator delegator, java.lang.String contactMechId, java.lang.String attrName)
static java.util.Map<java.lang.String,java.lang.Object>
getCurrentPostalAddress(javax.servlet.ServletRequest request, java.lang.String partyId, java.lang.String curContactMechId)
static void
getFacilityContactMechAndRelated(javax.servlet.ServletRequest request, java.lang.String facilityId, java.util.Map<java.lang.String,java.lang.Object> target)
static GenericValue
getFacilityContactMechByPurpose(Delegator delegator, java.lang.String facilityId, java.util.List<java.lang.String> purposeTypes)
Returns the first valid FacilityContactMech found based on the given facilityId and a prioritized list of purposesstatic java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getFacilityContactMechValueMaps(Delegator delegator, java.lang.String facilityId, boolean showOld)
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getFacilityContactMechValueMaps(Delegator delegator, java.lang.String facilityId, boolean showOld, java.lang.String contactMechTypeId)
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getFacilityContactMechValueMaps(Delegator delegator, java.lang.String facilityId, java.sql.Timestamp date, java.lang.String contactMechTypeId)
static java.util.List<java.util.Map<java.lang.String,GenericValue>>
getOrderContactMechValueMaps(Delegator delegator, java.lang.String orderId)
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getPartyContactMechValueMaps(Delegator delegator, java.lang.String partyId, boolean showOld)
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getPartyContactMechValueMaps(Delegator delegator, java.lang.String partyId, boolean showOld, java.lang.String contactMechTypeId)
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getPartyContactMechValueMaps(Delegator delegator, java.lang.String partyId, java.sql.Timestamp date, java.lang.String contactMechTypeId)
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getPartyPostalAddresses(javax.servlet.ServletRequest request, java.lang.String partyId, java.lang.String curContactMechId)
static java.lang.String
getPostalAddressPostalCodeGeoId(GenericValue postalAddress, Delegator delegator)
static java.util.Collection<java.util.Map<java.lang.String,GenericValue>>
getWorkEffortContactMechValueMaps(Delegator delegator, java.lang.String workEffortId)
static boolean
isCompanyAddress(GenericValue postalAddress, java.lang.String companyPartyId)
static boolean
isUspsAddress(GenericValue postalAddress)
static java.lang.String
urlEncodePostalAddress(GenericValue postalAddress)
Returns a PostalAddressGenericValue
as a URL encodedString
.
-
-
-
Method Detail
-
getPartyContactMechValueMaps
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getPartyContactMechValueMaps(Delegator delegator, java.lang.String partyId, boolean showOld)
-
getPartyContactMechValueMaps
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getPartyContactMechValueMaps(Delegator delegator, java.lang.String partyId, boolean showOld, java.lang.String contactMechTypeId)
-
getPartyContactMechValueMaps
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getPartyContactMechValueMaps(Delegator delegator, java.lang.String partyId, java.sql.Timestamp date, java.lang.String contactMechTypeId)
-
getFacilityContactMechValueMaps
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getFacilityContactMechValueMaps(Delegator delegator, java.lang.String facilityId, boolean showOld)
-
getFacilityContactMechValueMaps
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getFacilityContactMechValueMaps(Delegator delegator, java.lang.String facilityId, boolean showOld, java.lang.String contactMechTypeId)
-
getFacilityContactMechValueMaps
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getFacilityContactMechValueMaps(Delegator delegator, java.lang.String facilityId, java.sql.Timestamp date, java.lang.String contactMechTypeId)
-
getOrderContactMechValueMaps
public static java.util.List<java.util.Map<java.lang.String,GenericValue>> getOrderContactMechValueMaps(Delegator delegator, java.lang.String orderId)
-
getWorkEffortContactMechValueMaps
public static java.util.Collection<java.util.Map<java.lang.String,GenericValue>> getWorkEffortContactMechValueMaps(Delegator delegator, java.lang.String workEffortId)
-
getContactMechAndRelated
public static void getContactMechAndRelated(javax.servlet.ServletRequest request, java.lang.String partyId, java.util.Map<java.lang.String,java.lang.Object> target)
-
getFacilityContactMechByPurpose
public static GenericValue getFacilityContactMechByPurpose(Delegator delegator, java.lang.String facilityId, java.util.List<java.lang.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(javax.servlet.ServletRequest request, java.lang.String facilityId, java.util.Map<java.lang.String,java.lang.Object> target)
-
getPartyPostalAddresses
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getPartyPostalAddresses(javax.servlet.ServletRequest request, java.lang.String partyId, java.lang.String curContactMechId)
-
getCurrentPostalAddress
public static java.util.Map<java.lang.String,java.lang.Object> getCurrentPostalAddress(javax.servlet.ServletRequest request, java.lang.String partyId, java.lang.String curContactMechId)
-
isUspsAddress
public static boolean isUspsAddress(GenericValue postalAddress)
-
isCompanyAddress
public static boolean isCompanyAddress(GenericValue postalAddress, java.lang.String companyPartyId)
-
getContactMechAttribute
public static java.lang.String getContactMechAttribute(Delegator delegator, java.lang.String contactMechId, java.lang.String attrName)
-
getPostalAddressPostalCodeGeoId
public static java.lang.String getPostalAddressPostalCodeGeoId(GenericValue postalAddress, Delegator delegator) throws GenericEntityException
- Throws:
GenericEntityException
-
urlEncodePostalAddress
public static java.lang.String urlEncodePostalAddress(GenericValue postalAddress) throws GenericEntityException, java.io.UnsupportedEncodingException
Returns a PostalAddressGenericValue
as a URL encodedString
.- Parameters:
postalAddress
- A PostalAddressGenericValue
.- Returns:
- A URL encoded
String
. - Throws:
GenericEntityException
java.io.UnsupportedEncodingException
-
-