Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2014 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/
package com.adobe.cq.address.api;
import java.util.Collection;
import java.util.Map;
import org.apache.sling.api.resource.ResourceResolver;
/**
* @deprecated As of AEM 6.4
*/
@Deprecated
public interface AddressProvider {
/**
* Returns the addresses belonging to a user.
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @return The addresses or null if there are none
*/
public Collection getAddresses(ResourceResolver resolver, String userID);
/**
* Returns the address based on a path if represented in the repository or based on an ID uniquely identifying
* the address in an external provider.
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @param path The path identifying the address or an ID uniquely identifying the address in an external provider
*
* @return The address or null if it does not exist or if it does not belong to the user
*/
public Address getAddress(ResourceResolver resolver, String userID, String path);
/**
* Removes the address.
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @param address The address
* @param autoSave If true the operation is persisted
* @throws AddressException when the address does not belong to the user or when the operation fails.
*/
public void removeAddress(ResourceResolver resolver, String userID, Address address, boolean autoSave) throws AddressException;
/**
* Adds an address to the user.
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @param properties The address properties
* @param autoSave If true the operation is persisted
* @return The new address
* @throws AddressException when the operation fails.
*/
public Address addAddress(ResourceResolver resolver, String userID, Map properties, boolean autoSave) throws AddressException;
/**
* Updates the address.
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @param address The address
* @param properties The address properties
* @param autoSave If true the operation is persisted
* @return The updated address
* @throws AddressException when the address does not belong to the user or when the operation fails.
*/
public Address updateAddress(ResourceResolver resolver, String userID, Address address, Map properties, boolean autoSave) throws AddressException;
/**
* Returns the generic default address of the user.
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @return the generic default address of the user
*/
public Address getDefaultAddress(ResourceResolver resolver, String userID);
/**
* Returns the default address that is defined for the given type (e.g.: billing, shipping.).
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @param type The type of the default address. E.g.: billing, shipping.
* If the type is null or empty, the generic default address is returned.
* @return the generic default address of the user
*/
public Address getDefaultAddress(ResourceResolver resolver, String userID, String type);
/**
* Sets the generic default address of the user.
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @param address The address
* @param autoSave If true the operation is persisted
* @throws AddressException when the address does not belong to the user or when the operation fails.
*/
public void setDefaultAddress(ResourceResolver resolver, String userID, Address address, boolean autoSave) throws AddressException;
/**
* Sets the default address for the given type (e.g.: billing, shipping.).
*
* @param resolver The resource resolver used to access the address book
* @param userID The user ID
* @param address The address
* @param type The type of the default address. E.g.: billing, shipping.
* If the given type is null or empty, the generic default address is set.
* @param autoSave If true the operation is persisted
* @throws AddressException when the address does not belong to the user or when the operation fails.
*/
public void setDefaultAddress(ResourceResolver resolver, String userID, Address address, String type, boolean autoSave) throws AddressException;
}