IEntitySystem

From Virtual World Web Wiki
Jump to: navigation, search

The entity system is a primary layer one interface. There are methods here for creating, managing and getting information about all kinds of Entities

Remarks [edit]

Properties

int OnlineCount {get;}
Gets the service provider global online count

Methods

bool AccountExists(Guid accountID)
Checks for the existance of a local account stub.
void CompleteFriendshipRequest(Guid requestID, FriendRequestActionType actionType)
Completes a friendship request between two personas
Guid ConsumeWebTransferToken(Uri uri)
Extracts the "wt" query string parameter and calls the string version of this function with its value.
Guid ConsumeWebTransferToken(string token)
Consumes a web transfer token
bool CreateAccount(Guid accountID, string emailAddress)
Creates a local account stub. The account must be created on Root first.
IConfirmationHandle CreateConfirmation(IConnectionIdentity identity, AutoString title, AutoString description, ConfirmationCallback callback, AutoString[] buttons = NULL, int defaultButton = 0, int replyTimeout = -1, bool cancelOnParticipantChange = true)
Creates and sends a new confirmation request to the specified client connection.
Guid CreateDynamicGroup(string name, Guid? dynamicGroupID = NULL)
Creates a new dynamic group. Dynamic groups have their membership set programatically at runtime
Guid CreateEntityGroup(string name, EntityType allowedEntityTypes = EntityType.AnyLeaf, Guid? entityGroupID = NULL)
Creates a new entity group
bool CreateFriendship(Guid personaID, Guid relationID)
Creates a friendship between two personas. Existing ignores will be removed.
void CreateFriendshipRequest(Guid personaID, Guid relationID)
Creates a friendship request between two personas. If a request exists in the opposite direction the friendship request will be automatically completed successfully
bool CreateIgnore(Guid personaID, Guid relationID)
Creates an ignore between two personas. Existing friendships will be removed.
Guid CreateOrGetRootAccount(string emailaddress, string returnUrl = "", CultureInfo culture = NULL)
Checks with root to either get or create an account for a given email address
Guid CreatePersona(string name, Guid accountID)
Creates a new persona for an account
CreateAccountInfo CreateRootAccount(string emailaddress, string returnUrl = "", CultureInfo culture = NULL)
Attempts to create a new account on root. if the account already exists the function returns false
IVirtualIdentity CreateVirtualIdentity(Guid accountID, Guid? personaID = NULL, Guid? areaID = NULL)
Creates a virtual identity which should be disposed when no longer needed. This identity can be used to query entity membership and area permissions for a hypothetical user.
void DeleteAccount(Guid accountID, Action<PacketErrorStatus> onComplete = NULL, TextWriter logWriter = NULL)
Starts the deletion of a local account stub and all associated data, including personas, memberships etc.
void DeleteDynamicGroup(Guid dynamicGroupID, Action<PacketErrorStatus> onComplete = NULL, TextWriter logWriter = NULL)
Deletes a Dynamic Group
void DeleteEntityGroup(Guid entityGroupID, Action<PacketErrorStatus> onComplete = NULL, TextWriter logWriter = NULL)
Deletes an entity group
void DeletePersona(Guid personaID, Action<PacketErrorStatus> onComplete = NULL, TextWriter logWriter = NULL)
Starts the deletion of a persona and all associated data.
void DisconnectPersona(Guid personaID, AutoString message = NULL)
Disconnects a persona no matter which instance host it's on, sending a reason message as well
void DisconnectSession(Guid sessionID, AutoString message = NULL)
Disconnects a session no matter which instance host it's on, sending a reason message as well
bool EntityExists(Guid entityID, EntityType entityType = EntityType.None)
Checks for the existance of an entity.
Guid? FindPersona(string name)
Finds a persona withing a given world by name
void FireEntityEvent(IConnectionIdentity identity, string identifier, Guid? context = NULL, Decimal? amount = NULL)
Sends a notification that an event has occourred for a connection. An L2 EntityEvent will result for this connection
void FireEntityEvent(Guid entityID, string identifier, Guid? context = NULL, Decimal? amount = NULL)
Sends a notification that an event has occoutted for an entity. An L2 EntityEvent will result for all connections in the system that have this entity.
string GetAccountEmailAddress(Guid accountID)
Gets the email address associated with an account
Guid GetAccountForSession(Guid sessionID)
Gets the account ID associated with a session
IAccountInfo GetAccountInfo(Guid accountID)
Gets a structure of information about an account
T GetConnectionForController<T>(DOMController controller)
Tries to find an active connection represented by the specified controller (avatar)
T GetConnectionForEntity<T>(Guid entityID)
Search for a connection identity by entity ID
T GetConnectionForSession<T>(Guid sessionID)
Search for a connection identity by session ID
T[] GetConnectionsForEntity<T>(Guid entityID)
Gets the set of connections currently online in a given entity. Only completely accurate on the service provider.
IDynamicGroupInfo GetDynamicGroupInfo(Guid dynamicGroupID)
Gets a structure of information about a dynamic group
string GetDynamicGroupName(Guid dynamicGroupID)
Gets the name of a dynamic group
IEntityGroupInfo GetEntityGroupInfo(Guid entityGroupID)
Gets a structure of information about a entity group
string GetEntityGroupName(Guid entityGroupID)
Gets the name of an entity group
IEntityInfo GetEntityInfo(Guid entityID)
Gets a structure of information about an entity
Guid GetPersonaAccountId(Guid personaID)
Gets the acocunt ID for a given persona
IPersonaInfo GetPersonaInfo(Guid personaID)
Gets a structure of information about a persona
IEnumerable<ChannelMember> GetPersonaInfos(Guid accountID)
Gets persona info structures for all of the personas belonging to a given account in a given world.
Guid[] GetPersonaList(Guid accountID)
Gets the list of persona IDs in a given root world for a given account
string GetPersonaName(Guid personaID)
Gets the name of a persona
ISecurableInfo GetSecurableInfo(Guid securableID)
Gets general information about a securable
string GetSecurableName(Guid securableID)
Gets the name of a securable
SecurableType GetSecurableType(Guid securableID)
Gets the type of a securable
Guid? GetSessionIDForPersona(Guid personaID)
Gets the sessionID for this persona if they're online. Guid.Empty otherwise
void HideEntity(Guid entityID)
Marks an entity as hidden so it doesn't show in the admin
bool IsFriend(Guid personaID, Guid relationID)
Tests if two personas are friends
bool IsHidden(Guid entityID)
Tests if an entity is hidden
bool IsIgnoring(Guid personaID, Guid relationID)
Tests if one persona is ignoring the other
bool IsPersonaNameAvailable(string name, Guid accountID)
Routes to the service provider and provides components an opportunity to validate persona name availability
bool IsPersonaOnline(Guid personaID)
Checks if the spcified persona is online
bool IsProtected(Guid entityID)
Tests if an entity is protected
void JoinEntityGroup(Guid entityGroupID, Guid entityID)
Adds an entity to an entity group
void LeaveEntityGroup(Guid entityGroupID, Guid entityID)
Removes an entity from an entity group
ILocationInfo LocatePersona(Guid personaID)
Gets location information for a persona
void NavigatePersona(Guid personaID, string vwwUri, bool designMode = false)
Navigates a persona no matter which instance host it's on
void NavigateSession(Guid sessionID, string vwwUri, bool designMode = false)
Navigates a session no matter which instance host it's on
void ProtectEntity(Guid entityID)
Marks an entity as a system entity so it cannot be deleted with layer 1 tools
void RemoveFriend(Guid personaID, Guid relationID)
Removes a friendship between two personas.
void RemoveIgnore(Guid personaID, Guid relationID)
Removes an ignore relationship between two personas.
void SetAccountEmailAddress(Guid accountID, string emailAddress)
Sets the email address associated with an account
void SetDynamicGroupName(Guid dynamicGroupID, string name)
Renames a dynamic group. Throws NameExistsException if name is in use
void SetEntityGroupName(Guid entityGroupID, string name)
Sets the name of an entity group
void SetPersonaName(Guid personaID, string name)
Renames a persona. Throws NameExistsException if name is in use
void SetSecurableMetadata(Guid securableID, string key, ProtoValue value)
Sets a securable metadata value. Values can be retrieved through GetSecurableInfo
void SetSecurableMetadata(Guid securableID, IDictionary<string, ProtoValue> values)
Sets several securable metadata values in one call, causing only one metadata change notification.
void UnHideEntity(Guid entityID)
Marks an entity as no longer hidden so it shows in the admin
void UnProtectEntity(Guid entityID)
Marks an entity as no longer a system entity so it can again be deleted