LPS-35981 Create a LockProtectedAction
LPS-35981 Move it to portal-service so that plugins can use it.
LPS-35981 Suppress warnings for exceptions that are thrown by subclasses but not by this class. My Eclipse complains.
LPS-35981 If a log message is more than a sentence (two sentences), then use periods to distinguish the sentences like in "Unable to acquire lock. Retrying." But if it's just one sentence, or a phrase, then no periods are needed. That's what we do for all log messages.
LPS-35981 This LockAction pattern is copied from SocialActivityCounterLocalServiceImpl and will be used to abstract out some code in there. In that class, it has this additional log warning. I'm not sure why it was removed by ZB when he first created LockProtectedAction, so I'm adding it back. If he wants to remove it, he can do it with a commit, and explain in that commit why he wanted to remove it.
LPS-35981 Pass in a Class<?> instead, it'll make it easier so that when we call it, we just do Model.class, and not Model.class.getName(). If it turns out we have to pass in a String for some odd reason, we can update this constructor.
LPS-35981 Use LockProtectedAction (no logic changes)
LPS-35981 1.) Rename the latest createActivityCounter to addActivityCounter 2.) currentValue, startPeriod, endPeriod are no longer passed in, but just derived. 3.) Update javadoc deprecated links to point to the new addActivityCounter method.
LPS-35981 Since we renamed createActivityCounter to addActivityCounter in the previous commit, we need to deprecate the old method.
LPS-35981 Ran "ant format-javadoc -Dlimit=SocialActivityCounterLocalServiceImpl"
LPS-35981 Directly copied javadoc from addActivityCounter with more parameters
LPS-35981 Remove unused params from new method level javadoc
LPS-35981 Move logic to its own protected method
LPS-35981 Deprecate this method and have it call addActivityCounter instead of the createActivityCounter that we just abstracted out in the earlier commit. We will use that method later.
LPS-35981 Ran "ant format-javadoc -Dlimit=SocialActivityCounterLocalServiceImpl"
LPS-35981 Now run "ant format-source", which will sort all the methods and make it very hard to see in Git what happened.
LPS-35981 Regenerate
LPS-35974 wrong id