Atavism Version 2018.1AGIS API

atavism.server.objects
Class PermissionCallback

java.lang.Object
  extended by atavism.server.objects.PermissionCallback
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AgisPermissionCallback

public class PermissionCallback
extends java.lang.Object
implements java.io.Serializable

this object implements callbacks for actions that need to check permissions to do something with an object. you register these callbacks on an object by calling AOObject.setPermissionCallback() each callback object should be used for one and only one aoobject (in case the callback sets state) each object can have its own permissionCallback

See Also:
Serialized Form

Field Summary
protected static Logger log
           
protected  AOObject thisObj
           
 
Constructor Summary
PermissionCallback()
           
PermissionCallback(AOObject obj)
           
 
Method Summary
 boolean acquire(AOObject acquirer)
          THIS is an object, someone is trying to acquire it.
 boolean acquireFrom(AOObject acquirer, AOObject obj)
          THIS is a container containing an object.
 boolean destroy(AOObject destroyer)
          returns true if allowed to destory this object
 boolean drop(AOObject dropInto)
          returns true if allowed to drop this object
 boolean use(OID activatorOid)
          returns if the user is allowed to equip/use this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thisObj

protected AOObject thisObj

log

protected static final Logger log
Constructor Detail

PermissionCallback

public PermissionCallback()

PermissionCallback

public PermissionCallback(AOObject obj)
Method Detail

acquire

public boolean acquire(AOObject acquirer)
THIS is an object, someone is trying to acquire it. returns true if allowed to acquire this object


acquireFrom

public boolean acquireFrom(AOObject acquirer,
                           AOObject obj)
THIS is a container containing an object. someone is trying to take the object from you. you are probably a chest of some sort, so you may want to check if you are locked, etc


drop

public boolean drop(AOObject dropInto)
returns true if allowed to drop this object


use

public boolean use(OID activatorOid)
returns if the user is allowed to equip/use this object


destroy

public boolean destroy(AOObject destroyer)
returns true if allowed to destory this object



Copyright © 2018 Dragonsan Studios Sp. z o.o.