public class OAuth2AuthorizationLocalServiceUtil
extends java.lang.Object
com.liferay.oauth2.provider.service.impl.OAuth2AuthorizationLocalServiceImpl
and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.OAuth2AuthorizationLocalService
Constructor and Description |
---|
OAuth2AuthorizationLocalServiceUtil() |
Modifier and Type | Method and Description |
---|---|
static OAuth2Authorization |
addOAuth2Authorization(long companyId,
long userId,
java.lang.String userName,
long oAuth2ApplicationId,
long oAuth2ApplicationScopeAliasesId,
java.lang.String accessTokenContent,
java.util.Date accessTokenCreateDate,
java.util.Date accessTokenExpirationDate,
java.lang.String remoteIPInfo,
java.lang.String refreshTokenContent,
java.util.Date refreshTokenCreateDate,
java.util.Date refreshTokenExpirationDate)
Deprecated.
As of Mueller (7.2.x), replaced by
addOAuth2Authorization(long, long, String, long,long,
String, Date, Date, String, String, String, Date, Date) |
static OAuth2Authorization |
addOAuth2Authorization(long companyId,
long userId,
java.lang.String userName,
long oAuth2ApplicationId,
long oAuth2ApplicationScopeAliasesId,
java.lang.String accessTokenContent,
java.util.Date accessTokenCreateDate,
java.util.Date accessTokenExpirationDate,
java.lang.String remoteHostInfo,
java.lang.String remoteIPInfo,
java.lang.String refreshTokenContent,
java.util.Date refreshTokenCreateDate,
java.util.Date refreshTokenExpirationDate) |
static OAuth2Authorization |
addOAuth2Authorization(OAuth2Authorization oAuth2Authorization)
Adds the o auth2 authorization to the database.
|
static void |
addOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId,
long oAuth2AuthorizationId) |
static void |
addOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId,
OAuth2Authorization oAuth2Authorization) |
static void |
addOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId,
java.util.List<OAuth2Authorization> oAuth2Authorizations) |
static void |
addOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId,
long[] oAuth2AuthorizationIds) |
static void |
clearOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId) |
static OAuth2Authorization |
createOAuth2Authorization(long oAuth2AuthorizationId)
Creates a new o auth2 authorization with the primary key.
|
static com.liferay.portal.kernel.model.PersistedModel |
createPersistedModel(java.io.Serializable primaryKeyObj) |
static void |
deleteExpiredOAuth2Authorizations() |
static OAuth2Authorization |
deleteOAuth2Authorization(long oAuth2AuthorizationId)
Deletes the o auth2 authorization with the primary key from the database.
|
static OAuth2Authorization |
deleteOAuth2Authorization(OAuth2Authorization oAuth2Authorization)
Deletes the o auth2 authorization from the database.
|
static void |
deleteOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId,
long oAuth2AuthorizationId) |
static void |
deleteOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId,
OAuth2Authorization oAuth2Authorization) |
static void |
deleteOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId,
java.util.List<OAuth2Authorization> oAuth2Authorizations) |
static void |
deleteOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId,
long[] oAuth2AuthorizationIds) |
static com.liferay.portal.kernel.model.PersistedModel |
deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) |
static <T> T |
dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static int |
dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) |
static com.liferay.portal.kernel.dao.orm.DynamicQuery |
dynamicQuery() |
static <T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
static <T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
static <T> java.util.List<T> |
dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
static long |
dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
static long |
dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
com.liferay.portal.kernel.dao.orm.Projection projection)
Returns the number of rows matching the dynamic query.
|
static OAuth2Authorization |
fetchOAuth2Authorization(long oAuth2AuthorizationId) |
static OAuth2Authorization |
fetchOAuth2AuthorizationByAccessTokenContent(java.lang.String accessTokenContent) |
static OAuth2Authorization |
fetchOAuth2AuthorizationByRefreshTokenContent(java.lang.String refreshTokenContent) |
static OAuth2Authorization |
fetchOAuth2AuthorizationByRememberDeviceContent(long userId,
long oAuth2ApplicationId,
java.lang.String rememberDeviceContent) |
static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery |
getActionableDynamicQuery() |
static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
static OAuth2Authorization |
getOAuth2Authorization(long oAuth2AuthorizationId)
Returns the o auth2 authorization with the primary key.
|
static OAuth2Authorization |
getOAuth2AuthorizationByAccessTokenContent(java.lang.String accessTokenContent) |
static OAuth2Authorization |
getOAuth2AuthorizationByRefreshTokenContent(java.lang.String refreshTokenContent) |
static java.util.List<OAuth2Authorization> |
getOAuth2Authorizations(int start,
int end)
Returns a range of all the o auth2 authorizations.
|
static java.util.List<OAuth2Authorization> |
getOAuth2Authorizations(long oAuth2ApplicationId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Authorization> orderByComparator) |
static int |
getOAuth2AuthorizationsCount()
Returns the number of o auth2 authorizations.
|
static int |
getOAuth2AuthorizationsCount(long oAuth2ApplicationId) |
static java.util.List<OAuth2Authorization> |
getOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId) |
static java.util.List<OAuth2Authorization> |
getOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId,
int start,
int end) |
static java.util.List<OAuth2Authorization> |
getOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Authorization> orderByComparator) |
static int |
getOAuth2ScopeGrantOAuth2AuthorizationsCount(long oAuth2ScopeGrantId) |
static long[] |
getOAuth2ScopeGrantPrimaryKeys(long oAuth2AuthorizationId)
Returns the oAuth2ScopeGrantIds of the o auth2 scope grants associated with the o auth2 authorization.
|
static java.util.Collection<OAuth2ScopeGrant> |
getOAuth2ScopeGrants(long oAuth2AuthorizationId) |
static java.lang.String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
static com.liferay.portal.kernel.model.PersistedModel |
getPersistedModel(java.io.Serializable primaryKeyObj) |
static OAuth2AuthorizationLocalService |
getService() |
static java.util.List<OAuth2Authorization> |
getUserOAuth2Authorizations(long userId,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<OAuth2Authorization> orderByComparator) |
static int |
getUserOAuth2AuthorizationsCount(long userId) |
static boolean |
hasOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId,
long oAuth2AuthorizationId) |
static boolean |
hasOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId) |
static void |
setOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId,
long[] oAuth2AuthorizationIds) |
static OAuth2Authorization |
updateOAuth2Authorization(OAuth2Authorization oAuth2Authorization)
Updates the o auth2 authorization in the database or adds it if it does not yet exist.
|
static OAuth2Authorization |
updateRememberDeviceContent(java.lang.String refreshTokenContent,
java.lang.String rememberDeviceContent) |
@Deprecated public static OAuth2Authorization addOAuth2Authorization(long companyId, long userId, java.lang.String userName, long oAuth2ApplicationId, long oAuth2ApplicationScopeAliasesId, java.lang.String accessTokenContent, java.util.Date accessTokenCreateDate, java.util.Date accessTokenExpirationDate, java.lang.String remoteIPInfo, java.lang.String refreshTokenContent, java.util.Date refreshTokenCreateDate, java.util.Date refreshTokenExpirationDate)
addOAuth2Authorization(long, long, String, long,long,
String, Date, Date, String, String, String, Date, Date)
public static OAuth2Authorization addOAuth2Authorization(long companyId, long userId, java.lang.String userName, long oAuth2ApplicationId, long oAuth2ApplicationScopeAliasesId, java.lang.String accessTokenContent, java.util.Date accessTokenCreateDate, java.util.Date accessTokenExpirationDate, java.lang.String remoteHostInfo, java.lang.String remoteIPInfo, java.lang.String refreshTokenContent, java.util.Date refreshTokenCreateDate, java.util.Date refreshTokenExpirationDate)
public static OAuth2Authorization addOAuth2Authorization(OAuth2Authorization oAuth2Authorization)
Important: Inspect OAuth2AuthorizationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
oAuth2Authorization
- the o auth2 authorizationpublic static void addOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId, long oAuth2AuthorizationId)
public static void addOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId, OAuth2Authorization oAuth2Authorization)
public static void addOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId, java.util.List<OAuth2Authorization> oAuth2Authorizations)
public static void addOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId, long[] oAuth2AuthorizationIds)
public static void clearOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId)
public static OAuth2Authorization createOAuth2Authorization(long oAuth2AuthorizationId)
oAuth2AuthorizationId
- the primary key for the new o auth2 authorizationpublic static com.liferay.portal.kernel.model.PersistedModel createPersistedModel(java.io.Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static void deleteExpiredOAuth2Authorizations()
public static OAuth2Authorization deleteOAuth2Authorization(long oAuth2AuthorizationId) throws com.liferay.portal.kernel.exception.PortalException
Important: Inspect OAuth2AuthorizationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
oAuth2AuthorizationId
- the primary key of the o auth2 authorizationcom.liferay.portal.kernel.exception.PortalException
- if a o auth2 authorization with the primary key could not be foundpublic static OAuth2Authorization deleteOAuth2Authorization(OAuth2Authorization oAuth2Authorization)
Important: Inspect OAuth2AuthorizationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
oAuth2Authorization
- the o auth2 authorizationpublic static void deleteOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId, long oAuth2AuthorizationId)
public static void deleteOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId, OAuth2Authorization oAuth2Authorization)
public static void deleteOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId, java.util.List<OAuth2Authorization> oAuth2Authorizations)
public static void deleteOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId, long[] oAuth2AuthorizationIds)
public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
public static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.oauth2.provider.model.impl.OAuth2AuthorizationModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public static <T> java.util.List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.oauth2.provider.model.impl.OAuth2AuthorizationModelImpl
.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
dynamicQuery
- the dynamic querypublic static long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic static OAuth2Authorization fetchOAuth2Authorization(long oAuth2AuthorizationId)
public static OAuth2Authorization fetchOAuth2AuthorizationByAccessTokenContent(java.lang.String accessTokenContent)
public static OAuth2Authorization fetchOAuth2AuthorizationByRefreshTokenContent(java.lang.String refreshTokenContent)
public static OAuth2Authorization fetchOAuth2AuthorizationByRememberDeviceContent(long userId, long oAuth2ApplicationId, java.lang.String rememberDeviceContent)
public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
public static OAuth2Authorization getOAuth2Authorization(long oAuth2AuthorizationId) throws com.liferay.portal.kernel.exception.PortalException
oAuth2AuthorizationId
- the primary key of the o auth2 authorizationcom.liferay.portal.kernel.exception.PortalException
- if a o auth2 authorization with the primary key could not be foundpublic static OAuth2Authorization getOAuth2AuthorizationByAccessTokenContent(java.lang.String accessTokenContent) throws NoSuchOAuth2AuthorizationException
public static OAuth2Authorization getOAuth2AuthorizationByRefreshTokenContent(java.lang.String refreshTokenContent) throws NoSuchOAuth2AuthorizationException
public static java.util.List<OAuth2Authorization> getOAuth2Authorizations(int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from com.liferay.oauth2.provider.model.impl.OAuth2AuthorizationModelImpl
.
start
- the lower bound of the range of o auth2 authorizationsend
- the upper bound of the range of o auth2 authorizations (not inclusive)public static java.util.List<OAuth2Authorization> getOAuth2Authorizations(long oAuth2ApplicationId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Authorization> orderByComparator)
public static int getOAuth2AuthorizationsCount()
public static int getOAuth2AuthorizationsCount(long oAuth2ApplicationId)
public static java.util.List<OAuth2Authorization> getOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId)
public static java.util.List<OAuth2Authorization> getOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId, int start, int end)
public static java.util.List<OAuth2Authorization> getOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Authorization> orderByComparator)
public static int getOAuth2ScopeGrantOAuth2AuthorizationsCount(long oAuth2ScopeGrantId)
public static long[] getOAuth2ScopeGrantPrimaryKeys(long oAuth2AuthorizationId)
oAuth2AuthorizationId
- the oAuth2AuthorizationId of the o auth2 authorizationpublic static java.util.Collection<OAuth2ScopeGrant> getOAuth2ScopeGrants(long oAuth2AuthorizationId)
public static java.lang.String getOSGiServiceIdentifier()
public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(java.io.Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException
public static java.util.List<OAuth2Authorization> getUserOAuth2Authorizations(long userId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<OAuth2Authorization> orderByComparator)
public static int getUserOAuth2AuthorizationsCount(long userId)
public static boolean hasOAuth2ScopeGrantOAuth2Authorization(long oAuth2ScopeGrantId, long oAuth2AuthorizationId)
public static boolean hasOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId)
public static void setOAuth2ScopeGrantOAuth2Authorizations(long oAuth2ScopeGrantId, long[] oAuth2AuthorizationIds)
public static OAuth2Authorization updateOAuth2Authorization(OAuth2Authorization oAuth2Authorization)
Important: Inspect OAuth2AuthorizationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
oAuth2Authorization
- the o auth2 authorizationpublic static OAuth2Authorization updateRememberDeviceContent(java.lang.String refreshTokenContent, java.lang.String rememberDeviceContent)
public static OAuth2AuthorizationLocalService getService()