org.keycloak.authorization.policy.provider.permission

## Class ScopePolicyProviderFactory

- java.lang.Object
- - org.keycloak.authorization.policy.provider.permission.ScopePolicyProviderFactory

- All Implemented Interfaces:
    PolicyProviderFactory<ScopePermissionRepresentation>, ProviderFactory<PolicyProvider>

      public class ScopePolicyProviderFactory
      extends Object
      implements PolicyProviderFactory<ScopePermissionRepresentation>

  Author:
    Pedro Igor

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScopePolicyProviderFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` This is called when the server shuts down.
    `PolicyProvider` | `create(AuthorizationProvider authorization)`
    `PolicyProvider` | `create(KeycloakSession session)`
    `String` | `getGroup()`
    `String` | `getId()`
    `String` | `getName()`
    `Class<ScopePermissionRepresentation>` | `getRepresentationType()`
    `void` | `init(Config.Scope config)` Only called once when the factory is first created.
    `void` | `onCreate(Policy policy, ScopePermissionRepresentation representation, AuthorizationProvider authorization)`
    `void` | `onUpdate(Policy policy, ScopePermissionRepresentation representation, AuthorizationProvider authorization)`
    `void` | `postInit(KeycloakSessionFactory factory)` Called after all provider factories have been initialized
    `ScopePermissionRepresentation` | `toRepresentation(Policy policy, AuthorizationProvider authorization)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.keycloak.authorization.policy.provider.PolicyProviderFactory

      `getAdminResource, isInternal, onExport, onImport, onRemove`

    - ### Methods inherited from interface org.keycloak.provider.ProviderFactory

      `order`

- - ### Constructor Detail

    - #### ScopePolicyProviderFactory

          public ScopePolicyProviderFactory()

  - ### Method Detail

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `PolicyProviderFactory<ScopePermissionRepresentation>`

    - #### getGroup

          public String getGroup()

      Specified by:
        `getGroup` in interface `PolicyProviderFactory<ScopePermissionRepresentation>`

    - #### create

          public PolicyProvider create(AuthorizationProvider authorization)

      Specified by:
        `create` in interface `PolicyProviderFactory<ScopePermissionRepresentation>`

    - #### create

          public PolicyProvider create(KeycloakSession session)

      Specified by:
        `create` in interface `ProviderFactory<PolicyProvider>`

    - #### getRepresentationType

          public Class<ScopePermissionRepresentation> getRepresentationType()

      Specified by:
        `getRepresentationType` in interface `PolicyProviderFactory<ScopePermissionRepresentation>`

    - #### toRepresentation

          public ScopePermissionRepresentation toRepresentation(Policy policy,
                                                                AuthorizationProvider authorization)

      Specified by:
        `toRepresentation` in interface `PolicyProviderFactory<ScopePermissionRepresentation>`

    - #### onCreate

          public void onCreate(Policy policy,
                               ScopePermissionRepresentation representation,
                               AuthorizationProvider authorization)

      Specified by:
        `onCreate` in interface `PolicyProviderFactory<ScopePermissionRepresentation>`

    - #### onUpdate

          public void onUpdate(Policy policy,
                               ScopePermissionRepresentation representation,
                               AuthorizationProvider authorization)

      Specified by:
        `onUpdate` in interface `PolicyProviderFactory<ScopePermissionRepresentation>`

    - #### init

          public void init(Config.Scope config)

      Description copied from interface: `ProviderFactory`
      Only called once when the factory is first created. This config is pulled from keycloak_server.json
      Specified by:
        `init` in interface `ProviderFactory<PolicyProvider>`

    - #### postInit

          public void postInit(KeycloakSessionFactory factory)

      Description copied from interface: `ProviderFactory`
      Called after all provider factories have been initialized
      Specified by:
        `postInit` in interface `ProviderFactory<PolicyProvider>`

    - #### close

          public void close()

      Description copied from interface: `ProviderFactory`
      This is called when the server shuts down.
      Specified by:
        `close` in interface `ProviderFactory<PolicyProvider>`

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `ProviderFactory<PolicyProvider>`

Copyright © 2021 JBoss by Red Hat. All rights reserved.