Difference between revisions of "IEntitySystem"
From Virtual World Web Wiki
(Documentation for the IEntitySystem class) |
(Documentation for the IEntitySystem class) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
::Consumes a web transfer token | ::Consumes a web transfer token | ||
− | :{{CSharp|bool CreateAccount(Guid accountID, string emailAddress | + | :{{CSharp|bool CreateAccount(Guid accountID, string emailAddress)}} |
:: | :: | ||
::Creates a local account stub. The account must be created on Root first. | ::Creates a local account stub. The account must be created on Root first. | ||
Line 58: | Line 58: | ||
::Checks with root to either get or create an account for a given email address | ::Checks with root to either get or create an account for a given email address | ||
− | :{{CSharp|Guid CreatePersona(string name, Guid accountID | + | :{{CSharp|Guid CreatePersona(string name, Guid accountID)}} |
:: | :: | ||
::Creates a new persona for an account | ::Creates a new persona for an account | ||
Line 66: | Line 66: | ||
::Attempts to create a new account on root. if the account already exists the function returns false | ::Attempts to create a new account on root. if the account already exists the function returns false | ||
− | :{{CSharp|void DeleteAccount(Guid accountID, Action<PacketErrorStatus> onComplete {{=}} NULL)}} | + | :{{CSharp|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. | ||
+ | |||
+ | :{{CSharp|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. | ::Starts the deletion of a local account stub and all associated data, including personas, memberships etc. | ||
− | :{{CSharp|void DeleteDynamicGroup(Guid dynamicGroupID, Action<PacketErrorStatus> onComplete {{=}} NULL)}} | + | :{{CSharp|void DeleteDynamicGroup(Guid dynamicGroupID, Action<PacketErrorStatus> onComplete {{=}} NULL, TextWriter logWriter {{=}} NULL)}} |
:: | :: | ||
::Deletes a Dynamic Group | ::Deletes a Dynamic Group | ||
− | :{{CSharp|void DeleteEntityGroup(Guid entityGroupID, Action<PacketErrorStatus> onComplete {{=}} NULL)}} | + | :{{CSharp|void DeleteEntityGroup(Guid entityGroupID, Action<PacketErrorStatus> onComplete {{=}} NULL, TextWriter logWriter {{=}} NULL)}} |
:: | :: | ||
::Deletes an entity group | ::Deletes an entity group | ||
− | :{{CSharp|void DeletePersona(Guid personaID, Action<PacketErrorStatus> onComplete {{=}} NULL)}} | + | :{{CSharp|void DeletePersona(Guid personaID, Action<PacketErrorStatus> onComplete {{=}} NULL, TextWriter logWriter {{=}} NULL)}} |
:: | :: | ||
::Starts the deletion of a persona and all associated data. | ::Starts the deletion of a persona and all associated data. | ||
Line 94: | Line 98: | ||
::Checks for the existance of an entity. | ::Checks for the existance of an entity. | ||
− | :{{CSharp|Guid? FindPersona(string name | + | :{{CSharp|Guid? FindPersona(string name)}} |
:: | :: | ||
::Finds a persona withing a given world by name | ::Finds a persona withing a given world by name | ||
Line 114: | Line 118: | ||
::Gets the account ID associated with a session | ::Gets the account ID associated with a session | ||
− | :{{CSharp| | + | :{{CSharp|IAccountInfo GetAccountInfo(Guid accountID)}} |
+ | :: | ||
+ | ::Gets a structure of information about an account | ||
+ | |||
+ | :{{CSharp|T GetConnectionForController<T>(DOMController controller)}} | ||
:: | :: | ||
::Tries to find an active connection represented by the specified controller (avatar) | ::Tries to find an active connection represented by the specified controller (avatar) | ||
− | :{{CSharp| | + | :{{CSharp|T GetConnectionForEntity<T>(Guid entityID)}} |
+ | :: | ||
+ | ::Search for a connection identity by entity ID | ||
+ | |||
+ | :{{CSharp|T GetConnectionForSession<T>(Guid sessionID)}} | ||
:: | :: | ||
::Search for a connection identity by session ID | ::Search for a connection identity by session ID | ||
− | :{{CSharp| | + | :{{CSharp|T[] GetConnectionsForEntity<T>(Guid entityID)}} |
:: | :: | ||
::Gets the set of connections currently online in a given entity. Only completely accurate on the service provider. | ::Gets the set of connections currently online in a given entity. Only completely accurate on the service provider. | ||
+ | |||
+ | :{{CSharp|IDynamicGroupInfo GetDynamicGroupInfo(Guid dynamicGroupID)}} | ||
+ | :: | ||
+ | ::Gets a structure of information about a dynamic group | ||
:{{CSharp|string GetDynamicGroupName(Guid dynamicGroupID)}} | :{{CSharp|string GetDynamicGroupName(Guid dynamicGroupID)}} | ||
:: | :: | ||
::Gets the name of a dynamic group | ::Gets the name of a dynamic group | ||
+ | |||
+ | :{{CSharp|IEntityGroupInfo GetEntityGroupInfo(Guid entityGroupID)}} | ||
+ | :: | ||
+ | ::Gets a structure of information about a entity group | ||
:{{CSharp|string GetEntityGroupName(Guid entityGroupID)}} | :{{CSharp|string GetEntityGroupName(Guid entityGroupID)}} | ||
:: | :: | ||
::Gets the name of an entity group | ::Gets the name of an entity group | ||
+ | |||
+ | :{{CSharp|IEntityInfo GetEntityInfo(Guid entityID)}} | ||
+ | :: | ||
+ | ::Gets a structure of information about an entity | ||
:{{CSharp|Guid GetPersonaAccountId(Guid personaID)}} | :{{CSharp|Guid GetPersonaAccountId(Guid personaID)}} | ||
Line 138: | Line 162: | ||
::Gets the acocunt ID for a given persona | ::Gets the acocunt ID for a given persona | ||
− | :{{CSharp| | + | :{{CSharp|IPersonaInfo GetPersonaInfo(Guid personaID)}} |
:: | :: | ||
− | ::Gets a | + | ::Gets a structure of information about a persona |
− | :{{CSharp|IEnumerable< | + | :{{CSharp|IEnumerable<ChannelMember> GetPersonaInfos(Guid accountID)}} |
:: | :: | ||
::Gets persona info structures for all of the personas belonging to a given account in a given world. | ::Gets persona info structures for all of the personas belonging to a given account in a given world. | ||
− | :{{CSharp|Guid[] GetPersonaList(Guid accountID | + | :{{CSharp|Guid[] GetPersonaList(Guid accountID)}} |
:: | :: | ||
::Gets the list of persona IDs in a given root world for a given account | ::Gets the list of persona IDs in a given root world for a given account | ||
Line 153: | Line 177: | ||
:: | :: | ||
::Gets the name of a persona | ::Gets the name of a persona | ||
− | |||
− | |||
− | |||
− | |||
:{{CSharp|ISecurableInfo GetSecurableInfo(Guid securableID)}} | :{{CSharp|ISecurableInfo GetSecurableInfo(Guid securableID)}} | ||
Line 173: | Line 193: | ||
:: | :: | ||
::Gets the sessionID for this persona if they're online. Guid.Empty otherwise | ::Gets the sessionID for this persona if they're online. Guid.Empty otherwise | ||
+ | |||
+ | :{{CSharp|void HideEntity(Guid entityID)}} | ||
+ | :: | ||
+ | ::Marks an entity as hidden so it doesn't show in the admin | ||
:{{CSharp|bool IsFriend(Guid personaID, Guid relationID)}} | :{{CSharp|bool IsFriend(Guid personaID, Guid relationID)}} | ||
:: | :: | ||
::Tests if two personas are friends | ::Tests if two personas are friends | ||
+ | |||
+ | :{{CSharp|bool IsHidden(Guid entityID)}} | ||
+ | :: | ||
+ | ::Tests if an entity is hidden | ||
:{{CSharp|bool IsIgnoring(Guid personaID, Guid relationID)}} | :{{CSharp|bool IsIgnoring(Guid personaID, Guid relationID)}} | ||
Line 182: | Line 210: | ||
::Tests if one persona is ignoring the other | ::Tests if one persona is ignoring the other | ||
− | :{{CSharp|bool IsPersonaNameAvailable(string name, Guid accountID | + | :{{CSharp|bool IsPersonaNameAvailable(string name, Guid accountID)}} |
:: | :: | ||
::Routes to the service provider and provides components an opportunity to validate persona name availability | ::Routes to the service provider and provides components an opportunity to validate persona name availability | ||
Line 237: | Line 265: | ||
:: | :: | ||
::Sets the name of an entity group | ::Sets the name of an entity group | ||
− | |||
− | |||
− | |||
− | |||
:{{CSharp|void SetPersonaName(Guid personaID, string name)}} | :{{CSharp|void SetPersonaName(Guid personaID, string name)}} | ||
Line 249: | Line 273: | ||
:: | :: | ||
::Sets a securable metadata value. Values can be retrieved through GetSecurableInfo | ::Sets a securable metadata value. Values can be retrieved through GetSecurableInfo | ||
+ | |||
+ | :{{CSharp|void SetSecurableMetadata(Guid securableID, IDictionary<string, ProtoValue> values)}} | ||
+ | :: | ||
+ | ::Sets several securable metadata values in one call, causing only one metadata change notification. | ||
+ | |||
+ | :{{CSharp|void UnHideEntity(Guid entityID)}} | ||
+ | :: | ||
+ | ::Marks an entity as no longer hidden so it shows in the admin | ||
:{{CSharp|void UnProtectEntity(Guid entityID)}} | :{{CSharp|void UnProtectEntity(Guid entityID)}} |
Latest revision as of 20:49, 12 July 2018
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