public class TemplateList extends XMLRequest implements java.lang.Iterable<Template>
Constructor and Description |
---|
TemplateList()
Creates a template list of all Automic objects.
|
TemplateList(IFolder folder)
Creates a list of templates in a specified folder.
|
Modifier and Type | Method and Description |
---|---|
static TemplateList |
agentTemplatesOnly()
Creates a request for agent templates defined in UC_OBJECT_TEMPLATES of client zero.
|
protected void |
createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
Creates the XML Document for the request.
|
protected java.lang.String |
getSrc()
Returns the request source.
|
Template |
getTemplate(java.lang.String templateName)
Returns a
Template given template name or null
if the template was not found. |
protected void |
handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session) |
protected boolean |
isAllowedInClientZero()
This method is used internally.
|
java.util.Iterator<Template> |
iterator()
Returns an
Iterator to iterate over the template collection. |
int |
size()
Returns the number of templates.
|
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotification
public TemplateList()
public TemplateList(IFolder folder)
folder
- Folder where an object should be createdprotected java.lang.String getSrc()
XMLRequest
getSrc
in class XMLRequest
public static TemplateList agentTemplatesOnly()
public java.util.Iterator<Template> iterator()
Iterator
to iterate over the template collection.iterator
in interface java.lang.Iterable<Template>
Iterator
public Template getTemplate(java.lang.String templateName)
Template
given template name or null
if the template was not found.templateName
- template nameprotected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
XMLRequest
createRequest
in class XMLRequest
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the sessionprotected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
handleContent
in class XMLRequest
protected boolean isAllowedInClientZero()
XMLRequest
XMLRequest
is allowed in client 0.
The default implementation returns false
, subclasses may override.isAllowedInClientZero
in class XMLRequest
true
if this request is allowed in client 0, false
otherwisepublic int size()