public class ServiceIdentifier extends java.lang.Object implements IServiceIdentifier
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.String> |
networknames
The network names (shared object with security service).
|
protected IComponentIdentifier |
providerid
The provider identifier.
|
protected IResourceIdentifier |
rid
The resource identifier.
|
protected ServiceScope |
scope
The scope.
|
protected java.lang.String |
servicename
The service name.
|
protected ClassInfo[] |
supertypes
The service super types.
|
protected java.util.Set<java.lang.String> |
tags
The tags.
|
protected java.lang.String |
tostring
The string representation (cached for reducing memory consumption).
|
protected ClassInfo |
type
The service type.
|
protected boolean |
unrestricted
Is the service unrestricted.
|
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Test if an object is equal to this one.
|
java.util.Set<java.lang.String> |
getNetworkNames()
Get the network names.
|
IComponentIdentifier |
getProviderId()
Get the service provider identifier.
|
IResourceIdentifier |
getResourceIdentifier()
Get the resource identifier.
|
static java.util.Set<java.lang.String> |
getRoles(Security sec,
IInternalAccess provider)
Get the roles from an annotation.
|
ServiceScope |
getScope()
Get the scope.
|
static Security |
getSecurityLevel(java.lang.Class<?> ctype)
Method to provide the security level.
|
java.lang.String |
getServiceName()
Get the service name.
|
ClassInfo[] |
getServiceSuperTypes()
Get the service super types.
|
ClassInfo |
getServiceType()
Get the service type.
|
java.util.Set<java.lang.String> |
getTags()
Get the service tags.
|
int |
hashCode()
Get the hashcode.
|
static boolean |
isSystemService(java.lang.Class<?> iftype)
Test if the service is a system service.
|
boolean |
isUnrestricted()
Check if the service has unrestricted access.
|
static boolean |
isUnrestricted(IInternalAccess access,
java.lang.Class<?> ctype)
Is the service unrestricted.
|
static boolean |
isUnrestricted(IInternalAccess access,
ClassInfo ctype)
Is the service unrestricted.
|
void |
setNetworkNames(java.util.Set<java.lang.String> networknames)
Set the network names.
|
void |
setProviderId(IComponentIdentifier providerid)
Set the providerid.
|
void |
setResourceIdentifier(IResourceIdentifier rid)
Set the resource identifier.
|
void |
setScope(ServiceScope scope)
Set the scope.
|
void |
setServiceName(java.lang.String servicename)
Set the servicename.
|
void |
setServiceSuperTypes(ClassInfo[] supertypes)
Set the service super types.
|
void |
setServiceType(ClassInfo type)
Set the service type.
|
void |
setTags(java.util.Set<java.lang.String> tags)
Set the tags.
|
void |
setUnrestricted(boolean unrestricted)
Set the unrestricted flag.
|
java.lang.String |
toString()
Get the string representation.
|
protected IComponentIdentifier providerid
protected java.lang.String servicename
protected ClassInfo type
protected ClassInfo[] supertypes
protected IResourceIdentifier rid
protected ServiceScope scope
protected java.util.Set<java.lang.String> networknames
protected boolean unrestricted
protected java.lang.String tostring
protected java.util.Set<java.lang.String> tags
public ServiceIdentifier()
public ServiceIdentifier(IInternalAccess provider, java.lang.Class<?> type, java.lang.String servicename, IResourceIdentifier rid, ServiceScope scope)
public ServiceIdentifier(IComponentIdentifier providerid, ClassInfo type, ClassInfo[] supertypes, java.lang.String servicename, IResourceIdentifier rid, ServiceScope scope, java.util.Set<java.lang.String> networknames, boolean unrestricted)
public IComponentIdentifier getProviderId()
getProviderId
in interface IServiceIdentifier
public void setProviderId(IComponentIdentifier providerid)
providerid
- The providerid to set.public ClassInfo getServiceType()
getServiceType
in interface IServiceIdentifier
public void setServiceType(ClassInfo type)
type
- The service type.public ClassInfo[] getServiceSuperTypes()
getServiceSuperTypes
in interface IServiceIdentifier
public void setServiceSuperTypes(ClassInfo[] supertypes)
type
- The service super types.public java.lang.String getServiceName()
getServiceName
in interface IServiceIdentifier
public void setServiceName(java.lang.String servicename)
servicename
- The servicename to set.public IResourceIdentifier getResourceIdentifier()
getResourceIdentifier
in interface IServiceIdentifier
public void setResourceIdentifier(IResourceIdentifier rid)
rid
- The resource identifier.public ServiceScope getScope()
getScope
in interface IServiceIdentifier
public void setScope(ServiceScope scope)
scope
- The scope to set.public java.util.Set<java.lang.String> getNetworkNames()
getNetworkNames
in interface IServiceIdentifier
public void setNetworkNames(java.util.Set<java.lang.String> networknames)
networknames
- The network names to setpublic boolean isUnrestricted()
isUnrestricted
in interface IServiceIdentifier
public void setUnrestricted(boolean unrestricted)
unrestricted
- The unrestricted flag.public java.util.Set<java.lang.String> getTags()
getTags
in interface IServiceIdentifier
public void setTags(java.util.Set<java.lang.String> tags)
tags
- the tags to setpublic static boolean isSystemService(java.lang.Class<?> iftype)
iftype
- The interface type.public static Security getSecurityLevel(java.lang.Class<?> ctype)
public static boolean isUnrestricted(IInternalAccess access, ClassInfo ctype)
access
- The access.ctype
- The service interface.public static boolean isUnrestricted(IInternalAccess access, java.lang.Class<?> ctype)
access
- The access.ctype
- The service interface.public static java.util.Set<java.lang.String> getRoles(Security sec, IInternalAccess provider)
sec
- The security annotation or null.provider
- The component that owns the service.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object.public java.lang.String toString()
toString
in class java.lang.Object