Created
November 13, 2014 18:01
-
-
Save yupadhyay/81a87be56931d5280333 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Date; | |
import org.apache.sling.api.resource.Resource; | |
/** | |
* Custom Page Impression Service | |
* @author Yogesh Upadhyay | |
* | |
*/ | |
public interface CustomImpressionService { | |
/** | |
* Record Impression for a path given a date | |
* If this method is called multiple time for sam date then value will get overridden | |
* Date should always be in form of yyyy-MM-DD | |
* @param resourcePath | |
* @param date (In form of yyyy-MM-DD) | |
* @param count | |
*/ | |
public void recordImpression(String resourcePath, String date, long count); | |
/** | |
* Record Impression for a path given a date | |
* If this method is called multiple time for sam date then value will get overridden | |
* Date should always be in form of yyyy-MM-DD | |
* @param resource | |
* @param date (In form of yyyy-MM-DD) | |
* @param count | |
*/ | |
public void recordImpression(Resource resource, String date, long count); | |
/** | |
* Record Impression for a path given a date | |
* If this method is called multiple time for sam date then value will get overridden | |
* @param resource | |
* @param date | |
* @param count | |
*/ | |
public void recordImpression(Resource resource, Date date, long count); | |
/** | |
* Record Impression for a path given a date | |
* Calling this method for same day will increase count of impression by 1 | |
* @param resource | |
* @param date | |
*/ | |
public void recordImpression(Resource resource, Date date); | |
/** | |
* Record Impression for a path given a date | |
* Calling this method for same day will increase count of impression by 1 | |
* Date should be in form of yyyy-MM-DD | |
* @param resourcePath | |
* @param date (in form of yyyy-MM-DD) | |
*/ | |
public void recordImpression(String resourcePath, String date); | |
/** | |
* Method that will return formated date for impression | |
* @param date | |
* @return formatted date in form of yyyy-MM-DD | |
*/ | |
public String getFormattedDateForImpression(Date date); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment