Records a restriction on access for one entity, either a profile or an organisation, within an account. Blocks are looked up by the blocked entity together with the account they were raised in, so the same profile can be blocked in one account without being blocked in another. A block can be permanent or expire, which is what the blocked until date controls.

Group: Database Entities

Implements: Serializable


Properties

PropertyReturnsDescription
adminOrgOrganisationThe account the block was raised in. A block only applies within this account, so the lookup of blocks for an entity is always scoped by it. Never null.
blockedEntityBaseEntityThe entity being blocked, which is a profile or an organisation. Never null.
blockedUntilDateDateThe moment the block stops applying. When this is null the block never expires; otherwise it is active only until this date and time.
createdByProfileThe administrator who raised the block. Null when the block was created automatically rather than by a person.
createdDateDateWhen the block was raised, as a timestamp. Never null.
idlongThe database identifier of this access block.

Methods

getId() · getAdminOrg() · setAdminOrg(Organisation adminOrg) · getBlockedEntity() · setBlockedEntity(BaseEntity blockedEntity) · getCreatedBy() · setCreatedBy(Profile createdBy) · getCreatedDate() · setCreatedDate(Date createdDate) · getBlockedUntilDate() · setBlockedUntilDate(Date blockedUntilDate) · isActive(Date now)

getId()

Returns: long

The database identifier of this access block.

getAdminOrg()

Returns: Organisation

The account the block was raised in. A block only applies within this account, so the lookup of blocks for an entity is always scoped by it. Never null.

setAdminOrg(Organisation adminOrg)

Returns: void

Sets the account the block is raised in.

ParameterDescription
adminOrgthe account this block belongs to

getBlockedEntity()

Returns: BaseEntity

The entity being blocked, which is a profile or an organisation. Never null.

setBlockedEntity(BaseEntity blockedEntity)

Returns: void

Sets the entity being blocked.

ParameterDescription
blockedEntitythe profile or organisation to block

getCreatedBy()

Returns: Profile

The administrator who raised the block. Null when the block was created automatically rather than by a person.

setCreatedBy(Profile createdBy)

Returns: void

Sets the administrator who raised the block.

ParameterDescription
createdBythe profile that raised the block, or null if created automatically

getCreatedDate()

Returns: Date

When the block was raised, as a timestamp. Never null.

setCreatedDate(Date createdDate)

Returns: void

Sets when the block was raised.

ParameterDescription
createdDatethe date and time the block was created

getBlockedUntilDate()

Returns: Date

The moment the block stops applying. When this is null the block never expires; otherwise it is active only until this date and time.

setBlockedUntilDate(Date blockedUntilDate)

Returns: void

Sets the moment the block stops applying.

ParameterDescription
blockedUntilDatethe expiry timestamp, or null for a block that never expires

isActive(Date now)

Returns: boolean

Whether the block still applies at the given moment. A block with no expiry is always active, otherwise it is active while the expiry timestamp is after the given time. The current time is passed in rather than read here, so callers control the clock.

ParameterDescription
nowthe moment to test the block against
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.