001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.kernel.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for PasswordTracker. This utility wraps 024 * {@link com.liferay.portal.service.impl.PasswordTrackerLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see PasswordTrackerLocalService 032 * @see com.liferay.portal.service.base.PasswordTrackerLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.PasswordTrackerLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class PasswordTrackerLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.PasswordTrackerLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static boolean isSameAsCurrentPassword(long userId, 044 java.lang.String newClearTextPwd) 045 throws com.liferay.portal.kernel.exception.PortalException { 046 return getService().isSameAsCurrentPassword(userId, newClearTextPwd); 047 } 048 049 public static boolean isValidPassword(long userId, 050 java.lang.String newClearTextPwd) 051 throws com.liferay.portal.kernel.exception.PortalException { 052 return getService().isValidPassword(userId, newClearTextPwd); 053 } 054 055 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 056 return getService().getActionableDynamicQuery(); 057 } 058 059 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 060 return getService().dynamicQuery(); 061 } 062 063 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 064 return getService().getIndexableActionableDynamicQuery(); 065 } 066 067 /** 068 * Adds the password tracker to the database. Also notifies the appropriate model listeners. 069 * 070 * @param passwordTracker the password tracker 071 * @return the password tracker that was added 072 */ 073 public static com.liferay.portal.kernel.model.PasswordTracker addPasswordTracker( 074 com.liferay.portal.kernel.model.PasswordTracker passwordTracker) { 075 return getService().addPasswordTracker(passwordTracker); 076 } 077 078 /** 079 * Creates a new password tracker with the primary key. Does not add the password tracker to the database. 080 * 081 * @param passwordTrackerId the primary key for the new password tracker 082 * @return the new password tracker 083 */ 084 public static com.liferay.portal.kernel.model.PasswordTracker createPasswordTracker( 085 long passwordTrackerId) { 086 return getService().createPasswordTracker(passwordTrackerId); 087 } 088 089 /** 090 * Deletes the password tracker from the database. Also notifies the appropriate model listeners. 091 * 092 * @param passwordTracker the password tracker 093 * @return the password tracker that was removed 094 */ 095 public static com.liferay.portal.kernel.model.PasswordTracker deletePasswordTracker( 096 com.liferay.portal.kernel.model.PasswordTracker passwordTracker) { 097 return getService().deletePasswordTracker(passwordTracker); 098 } 099 100 /** 101 * Deletes the password tracker with the primary key from the database. Also notifies the appropriate model listeners. 102 * 103 * @param passwordTrackerId the primary key of the password tracker 104 * @return the password tracker that was removed 105 * @throws PortalException if a password tracker with the primary key could not be found 106 */ 107 public static com.liferay.portal.kernel.model.PasswordTracker deletePasswordTracker( 108 long passwordTrackerId) 109 throws com.liferay.portal.kernel.exception.PortalException { 110 return getService().deletePasswordTracker(passwordTrackerId); 111 } 112 113 public static com.liferay.portal.kernel.model.PasswordTracker fetchPasswordTracker( 114 long passwordTrackerId) { 115 return getService().fetchPasswordTracker(passwordTrackerId); 116 } 117 118 /** 119 * Returns the password tracker with the primary key. 120 * 121 * @param passwordTrackerId the primary key of the password tracker 122 * @return the password tracker 123 * @throws PortalException if a password tracker with the primary key could not be found 124 */ 125 public static com.liferay.portal.kernel.model.PasswordTracker getPasswordTracker( 126 long passwordTrackerId) 127 throws com.liferay.portal.kernel.exception.PortalException { 128 return getService().getPasswordTracker(passwordTrackerId); 129 } 130 131 /** 132 * Updates the password tracker in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 133 * 134 * @param passwordTracker the password tracker 135 * @return the password tracker that was updated 136 */ 137 public static com.liferay.portal.kernel.model.PasswordTracker updatePasswordTracker( 138 com.liferay.portal.kernel.model.PasswordTracker passwordTracker) { 139 return getService().updatePasswordTracker(passwordTracker); 140 } 141 142 /** 143 * @throws PortalException 144 */ 145 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 146 com.liferay.portal.kernel.model.PersistedModel persistedModel) 147 throws com.liferay.portal.kernel.exception.PortalException { 148 return getService().deletePersistedModel(persistedModel); 149 } 150 151 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 152 java.io.Serializable primaryKeyObj) 153 throws com.liferay.portal.kernel.exception.PortalException { 154 return getService().getPersistedModel(primaryKeyObj); 155 } 156 157 /** 158 * Returns the number of password trackers. 159 * 160 * @return the number of password trackers 161 */ 162 public static int getPasswordTrackersCount() { 163 return getService().getPasswordTrackersCount(); 164 } 165 166 /** 167 * Returns the OSGi service identifier. 168 * 169 * @return the OSGi service identifier 170 */ 171 public static java.lang.String getOSGiServiceIdentifier() { 172 return getService().getOSGiServiceIdentifier(); 173 } 174 175 /** 176 * Performs a dynamic query on the database and returns the matching rows. 177 * 178 * @param dynamicQuery the dynamic query 179 * @return the matching rows 180 */ 181 public static <T> java.util.List<T> dynamicQuery( 182 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 183 return getService().dynamicQuery(dynamicQuery); 184 } 185 186 /** 187 * Performs a dynamic query on the database and returns a range of the matching rows. 188 * 189 * <p> 190 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PasswordTrackerModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 191 * </p> 192 * 193 * @param dynamicQuery the dynamic query 194 * @param start the lower bound of the range of model instances 195 * @param end the upper bound of the range of model instances (not inclusive) 196 * @return the range of matching rows 197 */ 198 public static <T> java.util.List<T> dynamicQuery( 199 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 200 int end) { 201 return getService().dynamicQuery(dynamicQuery, start, end); 202 } 203 204 /** 205 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 206 * 207 * <p> 208 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PasswordTrackerModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 209 * </p> 210 * 211 * @param dynamicQuery the dynamic query 212 * @param start the lower bound of the range of model instances 213 * @param end the upper bound of the range of model instances (not inclusive) 214 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 215 * @return the ordered range of matching rows 216 */ 217 public static <T> java.util.List<T> dynamicQuery( 218 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 219 int end, 220 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 221 return getService() 222 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 223 } 224 225 /** 226 * Returns a range of all the password trackers. 227 * 228 * <p> 229 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PasswordTrackerModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 230 * </p> 231 * 232 * @param start the lower bound of the range of password trackers 233 * @param end the upper bound of the range of password trackers (not inclusive) 234 * @return the range of password trackers 235 */ 236 public static java.util.List<com.liferay.portal.kernel.model.PasswordTracker> getPasswordTrackers( 237 int start, int end) { 238 return getService().getPasswordTrackers(start, end); 239 } 240 241 /** 242 * Returns the number of rows matching the dynamic query. 243 * 244 * @param dynamicQuery the dynamic query 245 * @return the number of rows matching the dynamic query 246 */ 247 public static long dynamicQueryCount( 248 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 249 return getService().dynamicQueryCount(dynamicQuery); 250 } 251 252 /** 253 * Returns the number of rows matching the dynamic query. 254 * 255 * @param dynamicQuery the dynamic query 256 * @param projection the projection to apply to the query 257 * @return the number of rows matching the dynamic query 258 */ 259 public static long dynamicQueryCount( 260 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 261 com.liferay.portal.kernel.dao.orm.Projection projection) { 262 return getService().dynamicQueryCount(dynamicQuery, projection); 263 } 264 265 public static void deletePasswordTrackers(long userId) { 266 getService().deletePasswordTrackers(userId); 267 } 268 269 public static void trackPassword(long userId, java.lang.String encPassword) 270 throws com.liferay.portal.kernel.exception.PortalException { 271 getService().trackPassword(userId, encPassword); 272 } 273 274 public static PasswordTrackerLocalService getService() { 275 if (_service == null) { 276 _service = (PasswordTrackerLocalService)PortalBeanLocatorUtil.locate(PasswordTrackerLocalService.class.getName()); 277 278 ReferenceRegistry.registerReference(PasswordTrackerLocalServiceUtil.class, 279 "_service"); 280 } 281 282 return _service; 283 } 284 285 private static PasswordTrackerLocalService _service; 286 }