Class PartyServices

java.lang.Object
org.apache.ofbiz.party.party.PartyServices

public class PartyServices extends Object
Services for Party/Person/Group maintenance
  • Constructor Details

    • PartyServices

      public PartyServices()
  • Method Details

    • createPerson

      public static Map<String,Object> createPerson(DispatchContext ctx, Map<String,? extends Object> context)
      Creates a Person. If no partyId is specified a numeric partyId is retrieved from the Party sequence.
      Parameters:
      ctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • setPartyStatus

      public static Map<String,Object> setPartyStatus(DispatchContext ctx, Map<String,? extends Object> context)
      Sets a party status. security check: the status change must be defined in StatusValidChange.
    • updatePerson

      public static Map<String,Object> updatePerson(DispatchContext ctx, Map<String,? extends Object> context)
      Updates a Person.
      Parameters:
      ctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • createPartyGroup

      public static Map<String,Object> createPartyGroup(DispatchContext ctx, Map<String,? extends Object> context)
      Creates a PartyGroup. If no partyId is specified a numeric partyId is retrieved from the Party sequence.
      Parameters:
      ctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • updatePartyGroup

      public static Map<String,Object> updatePartyGroup(DispatchContext ctx, Map<String,? extends Object> context)
      Updates a PartyGroup.
      Parameters:
      ctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • createAffiliate

      public static Map<String,Object> createAffiliate(DispatchContext ctx, Map<String,? extends Object> context)
      Create an Affiliate entity.
      Parameters:
      ctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • updateAffiliate

      public static Map<String,Object> updateAffiliate(DispatchContext ctx, Map<String,? extends Object> context)
      Updates an Affiliate.
      Parameters:
      ctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • createPartyNote

      public static Map<String,Object> createPartyNote(DispatchContext dctx, Map<String,? extends Object> context)
      Add a PartyNote.
      Parameters:
      dctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • getPartiesFromExactEmail

      public static Map<String,Object> getPartiesFromExactEmail(DispatchContext dctx, Map<String,? extends Object> context)
      Get the party object(s) from an e-mail address
      Parameters:
      dctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • getPartiesFromPartOfEmail

      public static Map<String,Object> getPartiesFromPartOfEmail(DispatchContext dctx, Map<String,? extends Object> context)
    • getPartiesFromPartOfUserloginId

      public static Map<String,Object> getPartiesFromPartOfUserloginId(DispatchContext dctx, Map<String,? extends Object> context)
      Get the party object(s) from a user login ID
      Parameters:
      dctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • getPartiesFromPerson

      public static Map<String,Object> getPartiesFromPerson(DispatchContext dctx, Map<String,? extends Object> context)
      Get the party object(s) from person information
      Parameters:
      dctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • getPartiesFromPartyGroup

      public static Map<String,Object> getPartiesFromPartyGroup(DispatchContext dctx, Map<String,? extends Object> context)
      Get the party object(s) from party group name.
      Parameters:
      dctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • getPartiesFromExternalId

      public static Map<String,Object> getPartiesFromExternalId(DispatchContext dctx, Map<String,? extends Object> context)
      Get the party object(s) from party externalId.
      Parameters:
      dctx - The DispatchContext that this service is operating in.
      context - Map containing the input parameters.
      Returns:
      Map with the result of the service, the output parameters.
    • getPerson

      public static Map<String,Object> getPerson(DispatchContext dctx, Map<String,? extends Object> context)
    • findParty

      @Deprecated public static Map<String,Object> findParty(DispatchContext dctx, Map<String,? extends Object> context)
      Deprecated.
    • performFindParty

      public static Map<String,Object> performFindParty(DispatchContext dctx, Map<String,? extends Object> context)
    • linkParty

      public static Map<String,Object> linkParty(DispatchContext dctx, Map<String,? extends Object> context)
      Changes the association of contact mechs, purposes, notes, orders and attributes from one party to another for the purpose of merging records together. Flags the from party as disabled so it no longer appears in a search.
      Parameters:
      dctx - the dispatch context
      context - the context
      Returns:
      the result of the service execution
    • importAddressMatchMapCsv

      public static Map<String,Object> importAddressMatchMapCsv(DispatchContext dctx, Map<String,? extends Object> context)
    • getPartyId

      public static String getPartyId(Map<String,? extends Object> context)
    • findPartyById

      public static Map<String,Object> findPartyById(DispatchContext ctx, Map<String,Object> context)
      Finds partyId(s) corresponding to a party reference, partyId or a GoodIdentification idValue
      Parameters:
      ctx - the dispatch context
      context - use to search with partyId or goodIdentification.idValue
      Returns:
      a GenericValue with a partyId and a List of complementary partyId found
    • importParty

      public static Map<String,Object> importParty(DispatchContext dctx, Map<String,Object> context)