org.keycloak.authorization.mongo.entities

## Class PolicyEntity

- java.lang.Object
- - org.keycloak.models.entities.AbstractIdentifiableEntity
  - - org.keycloak.authorization.mongo.entities.PolicyEntity

- All Implemented Interfaces:
    MongoEntity, MongoIdentifiableEntity

      @MongoCollection(collectionName="policies")
      public class PolicyEntity
      extends AbstractIdentifiableEntity
      implements MongoIdentifiableEntity

  Author:
    Pedro Igor

- - ### Field Summary

    - ### Fields inherited from class org.keycloak.models.entities.AbstractIdentifiableEntity

      `id`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PolicyEntity()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAssociatedPolicy(String policyId)`
    `void` | `addResource(String resourceId)`
    `void` | `addScope(String scopeId)`
    `void` | `afterRemove(MongoStoreInvocationContext invocationContext)` Lifecycle callback, which is called after removal of this object from Mongo.
    `Set<String>` | `getAssociatedPolicies()`
    `Map<String,String>` | `getConfig()`
    `DecisionStrategy` | `getDecisionStrategy()`
    `String` | `getDescription()`
    `Logic` | `getLogic()`
    `String` | `getName()`
    `Set<String>` | `getResources()`
    `String` | `getResourceServerId()`
    `Set<String>` | `getScopes()`
    `String` | `getType()`
    `void` | `removeAssociatedPolicy(String policyId)`
    `void` | `removeResource(String resourceId)`
    `void` | `removeScope(String scopeId)`
    `void` | `setAssociatedPolicies(Set<String> associatedPolicies)`
    `void` | `setConfig(Map<String,String> config)`
    `void` | `setDecisionStrategy(DecisionStrategy decisionStrategy)`
    `void` | `setDescription(String description)`
    `void` | `setLogic(Logic logic)`
    `void` | `setName(String name)`
    `void` | `setResources(Set<String> resources)`
    `void` | `setResourceServerId(String resourceServerId)`
    `void` | `setScopes(Set<String> scopes)`
    `void` | `setType(String type)`

    - ### Methods inherited from class org.keycloak.models.entities.AbstractIdentifiableEntity

      `equals, getId, hashCode, setId, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.keycloak.connections.mongo.api.MongoIdentifiableEntity

      `getId, setId`

- - ### Constructor Detail

    - #### PolicyEntity

          public PolicyEntity()

  - ### Method Detail

    - #### getType

          public String getType()

    - #### setType

          public void setType(String type)

    - #### getDecisionStrategy

          public DecisionStrategy getDecisionStrategy()

    - #### setDecisionStrategy

          public void setDecisionStrategy(DecisionStrategy decisionStrategy)

    - #### getLogic

          public Logic getLogic()

    - #### setLogic

          public void setLogic(Logic logic)

    - #### getConfig

          public Map<String,String> getConfig()

    - #### setConfig

          public void setConfig(Map<String,String> config)

    - #### getName

          public String getName()

    - #### setName

          public void setName(String name)

    - #### getDescription

          public String getDescription()

    - #### setDescription

          public void setDescription(String description)

    - #### getResourceServerId

          public String getResourceServerId()

    - #### setResourceServerId

          public void setResourceServerId(String resourceServerId)

    - #### getAssociatedPolicies

          public Set<String> getAssociatedPolicies()

    - #### setAssociatedPolicies

          public void setAssociatedPolicies(Set<String> associatedPolicies)

    - #### getResources

          public Set<String> getResources()

    - #### setResources

          public void setResources(Set<String> resources)

    - #### getScopes

          public Set<String> getScopes()

    - #### setScopes

          public void setScopes(Set<String> scopes)

    - #### addScope

          public void addScope(String scopeId)

    - #### removeScope

          public void removeScope(String scopeId)

    - #### addAssociatedPolicy

          public void addAssociatedPolicy(String policyId)

    - #### removeAssociatedPolicy

          public void removeAssociatedPolicy(String policyId)

    - #### addResource

          public void addResource(String resourceId)

    - #### removeResource

          public void removeResource(String resourceId)

    - #### afterRemove

          public void afterRemove(MongoStoreInvocationContext invocationContext)

      Description copied from interface: `MongoIdentifiableEntity`
      Lifecycle callback, which is called after removal of this object from Mongo. It may be useful for triggering removal of wired objects.
      Specified by:
        `afterRemove` in interface `MongoIdentifiableEntity`

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