Package jadex.bridge.service
Class ServiceIdentifier
- java.lang.Object
- 
- jadex.bridge.service.ServiceIdentifier
 
- 
- All Implemented Interfaces:
- IServiceIdentifier
 
 public class ServiceIdentifier extends java.lang.Object implements IServiceIdentifier Service identifier for uniquely identifying a service. Is composed of the container id and the service name.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Set<java.lang.String>networknamesThe network names (shared object with security service).protected IComponentIdentifierprovideridThe provider identifier.protected IResourceIdentifierridThe resource identifier.protected ServiceScopescopeThe scope.protected java.lang.StringservicenameThe service name.protected ClassInfo[]supertypesThe service super types.protected java.util.Set<java.lang.String>tagsThe tags.protected java.lang.StringtostringThe string representation (cached for reducing memory consumption).protected ClassInfotypeThe service type.protected booleanunrestrictedIs the service unrestricted.
 - 
Constructor SummaryConstructors Constructor Description ServiceIdentifier()Create a new service identifier.ServiceIdentifier(IComponentIdentifier providerid, ClassInfo type, ClassInfo[] supertypes, java.lang.String servicename, IResourceIdentifier rid, ServiceScope scope, java.util.Set<java.lang.String> networknames, boolean unrestricted)Create a new service identifier.ServiceIdentifier(IInternalAccess provider, java.lang.Class<?> type, java.lang.String servicename, IResourceIdentifier rid, ServiceScope scope)Create a new service identifier.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test if an object is equal to this one.java.util.Set<java.lang.String>getNetworkNames()Get the network names.IComponentIdentifiergetProviderId()Get the service provider identifier.IResourceIdentifiergetResourceIdentifier()Get the resource identifier.static java.util.Set<java.lang.String>getRoles(Security sec, IInternalAccess provider)Get the roles from an annotation.ServiceScopegetScope()Get the scope.static SecuritygetSecurityLevel(java.lang.Class<?> ctype)Method to provide the security level.java.lang.StringgetServiceName()Get the service name.ClassInfo[]getServiceSuperTypes()Get the service super types.ClassInfogetServiceType()Get the service type.java.util.Set<java.lang.String>getTags()Get the service tags.inthashCode()Get the hashcode.static booleanisSystemService(java.lang.Class<?> iftype)Test if the service is a system service.booleanisUnrestricted()Check if the service has unrestricted access.static booleanisUnrestricted(IInternalAccess access, ClassInfo ctype)Is the service unrestricted.static booleanisUnrestricted(IInternalAccess access, java.lang.Class<?> ctype)Is the service unrestricted.voidsetNetworkNames(java.util.Set<java.lang.String> networknames)Set the network names.voidsetProviderId(IComponentIdentifier providerid)Set the providerid.voidsetResourceIdentifier(IResourceIdentifier rid)Set the resource identifier.voidsetScope(ServiceScope scope)Set the scope.voidsetServiceName(java.lang.String servicename)Set the servicename.voidsetServiceSuperTypes(ClassInfo[] supertypes)Set the service super types.voidsetServiceType(ClassInfo type)Set the service type.voidsetTags(java.util.Set<java.lang.String> tags)Set the tags.voidsetUnrestricted(boolean unrestricted)Set the unrestricted flag.java.lang.StringtoString()Get the string representation.
 
- 
- 
- 
Field Detail- 
provideridprotected IComponentIdentifier providerid The provider identifier.
 - 
servicenameprotected java.lang.String servicename The service name.
 - 
typeprotected ClassInfo type The service type.
 - 
supertypesprotected ClassInfo[] supertypes The service super types.
 - 
ridprotected IResourceIdentifier rid The resource identifier.
 - 
scopeprotected ServiceScope scope The scope.
 - 
networknamesprotected java.util.Set<java.lang.String> networknames The network names (shared object with security service).
 - 
unrestrictedprotected boolean unrestricted Is the service unrestricted.
 - 
tostringprotected java.lang.String tostring The string representation (cached for reducing memory consumption).
 - 
tagsprotected java.util.Set<java.lang.String> tags The tags.
 
- 
 - 
Constructor Detail- 
ServiceIdentifierpublic ServiceIdentifier() Create a new service identifier.
 - 
ServiceIdentifierpublic ServiceIdentifier(IInternalAccess provider, java.lang.Class<?> type, java.lang.String servicename, IResourceIdentifier rid, ServiceScope scope) Create a new service identifier.
 - 
ServiceIdentifierpublic ServiceIdentifier(IComponentIdentifier providerid, ClassInfo type, ClassInfo[] supertypes, java.lang.String servicename, IResourceIdentifier rid, ServiceScope scope, java.util.Set<java.lang.String> networknames, boolean unrestricted) Create a new service identifier.
 
- 
 - 
Method Detail- 
getProviderIdpublic IComponentIdentifier getProviderId() Get the service provider identifier.- Specified by:
- getProviderIdin interface- IServiceIdentifier
- Returns:
- The provider id.
 
 - 
setProviderIdpublic void setProviderId(IComponentIdentifier providerid) Set the providerid.- Parameters:
- providerid- The providerid to set.
 
 - 
getServiceTypepublic ClassInfo getServiceType() Get the service type.- Specified by:
- getServiceTypein interface- IServiceIdentifier
- Returns:
- The service type.
 
 - 
setServiceTypepublic void setServiceType(ClassInfo type) Set the service type.- Parameters:
- type- The service type.
 
 - 
getServiceSuperTypespublic ClassInfo[] getServiceSuperTypes() Get the service super types.- Specified by:
- getServiceSuperTypesin interface- IServiceIdentifier
- Returns:
- The service super types.
 
 - 
setServiceSuperTypespublic void setServiceSuperTypes(ClassInfo[] supertypes) Set the service super types.- Parameters:
- type- The service super types.
 
 - 
getServiceNamepublic java.lang.String getServiceName() Get the service name.- Specified by:
- getServiceNamein interface- IServiceIdentifier
- Returns:
- The service name.
 
 - 
setServiceNamepublic void setServiceName(java.lang.String servicename) Set the servicename.- Parameters:
- servicename- The servicename to set.
 
 - 
getResourceIdentifierpublic IResourceIdentifier getResourceIdentifier() Get the resource identifier.- Specified by:
- getResourceIdentifierin interface- IServiceIdentifier
- Returns:
- The resource identifier.
 
 - 
setResourceIdentifierpublic void setResourceIdentifier(IResourceIdentifier rid) Set the resource identifier.- Parameters:
- rid- The resource identifier.
 
 - 
getScopepublic ServiceScope getScope() Get the scope.- Specified by:
- getScopein interface- IServiceIdentifier
- Returns:
- The scope.
 
 - 
setScopepublic void setScope(ServiceScope scope) Set the scope.- Parameters:
- scope- The scope to set.
 
 - 
getNetworkNamespublic java.util.Set<java.lang.String> getNetworkNames() Get the network names.- Specified by:
- getNetworkNamesin interface- IServiceIdentifier
- Returns:
- the network names
 
 - 
setNetworkNamespublic void setNetworkNames(java.util.Set<java.lang.String> networknames) Set the network names.- Parameters:
- networknames- The network names to set
 
 - 
isUnrestrictedpublic boolean isUnrestricted() Check if the service has unrestricted access.- Specified by:
- isUnrestrictedin interface- IServiceIdentifier
- Returns:
- True, if it is unrestricted.
 
 - 
setUnrestrictedpublic void setUnrestricted(boolean unrestricted) Set the unrestricted flag.- Parameters:
- unrestricted- The unrestricted flag.
 
 - 
getTagspublic java.util.Set<java.lang.String> getTags() Get the service tags.- Specified by:
- getTagsin interface- IServiceIdentifier
- Returns:
- The tags.
 
 - 
setTagspublic void setTags(java.util.Set<java.lang.String> tags) Set the tags.- Parameters:
- tags- the tags to set
 
 - 
isSystemServicepublic static boolean isSystemService(java.lang.Class<?> iftype) Test if the service is a system service. Checks wether the system property is set in properties annotation.- Parameters:
- iftype- The interface type.
 
 - 
getSecurityLevelpublic static Security getSecurityLevel(java.lang.Class<?> ctype) Method to provide the security level.
 - 
isUnrestrictedpublic static boolean isUnrestricted(IInternalAccess access, ClassInfo ctype) Is the service unrestricted.- Parameters:
- access- The access.
- ctype- The service interface.
- Returns:
- True, if is unrestricted.
 
 - 
isUnrestrictedpublic static boolean isUnrestricted(IInternalAccess access, java.lang.Class<?> ctype) Is the service unrestricted.- Parameters:
- access- The access.
- ctype- The service interface.
- Returns:
- True, if is unrestricted.
 
 - 
getRolespublic static java.util.Set<java.lang.String> getRoles(Security sec, IInternalAccess provider) Get the roles from an annotation.- Parameters:
- sec- The security annotation or null.
- provider- The component that owns the service.
- Returns:
- The roles, if any or null, if none given or sec==null.
 
 - 
hashCodepublic int hashCode() Get the hashcode.- Overrides:
- hashCodein class- java.lang.Object
- Returns:
- The hashcode.
 
 - 
equalspublic boolean equals(java.lang.Object obj) Test if an object is equal to this one.- Overrides:
- equalsin class- java.lang.Object
- Parameters:
- obj- The object.
- Returns:
- True, if equal.
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-