public class TdbProcedure extends TdbSerializableObject implements com.tietoenator.trip.jxp.internal.utils.DOMSink, java.lang.Iterable<java.lang.String>
Constructor and Description |
---|
TdbProcedure(TdbSession session)
Constructor, creates a blank instance.
|
TdbProcedure(TdbSession session,
TdbControlObject ob)
Constructor, creates a container for the referenced stored procedure.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
content()
Retrieve the collection of lines that comprise the procedure
|
void |
copy(java.lang.String newowner,
java.lang.String newname,
TdbControlObject newobject)
Copy the current procedure to a new owner, or to a new name under the same owner.
|
void |
create(java.lang.String owner,
java.lang.String name,
java.lang.String comment)
Create a new procedure.
|
void |
delete()
Delete the current stored procedure from the server.
|
void |
delete(java.lang.String owner,
java.lang.String name)
Delete a stored procedure from the server.
|
void |
export(java.lang.String filename)
Export the content of the current stored procedure to a named file.
|
void |
export(java.lang.String filename,
java.lang.String owner,
java.lang.String name)
Export the content of the stored procedure to a named file.
|
void |
get()
Retrieve the content of the current stored procedure from the server.
|
void |
get(java.lang.String owner,
java.lang.String name)
Retrieve the content of a stored procedure from the server.
|
java.lang.String |
getComment()
Retrieve any comment associated with the procedure
|
java.lang.String |
getName()
Retrieve the name of the procedure
|
java.lang.String |
getOwnerName()
Retrieve the name of the user or group with which this procedure is associated
|
void |
importProcedure(java.lang.String filename,
java.lang.String owner,
java.lang.String name)
Import a new procedure from a file.
|
void |
importUpdate(java.lang.String filename)
Update the current procedure with a definition stored in a file.
|
void |
importUpdate(java.lang.String filename,
java.lang.String owner,
java.lang.String name)
Update a procedure with a definition stored in file.
|
java.util.Iterator<java.lang.String> |
iterator()
Retrieve an iterator over the collection of lines that comprise the procedure
|
void |
put()
Save the current procedure to the server.
|
void |
rename(java.lang.String newname)
Rename the procedure maintaining the current owner.
|
void |
saveSearch(int searchSetNumber,
java.lang.String owner,
java.lang.String name,
java.lang.String comment)
Save the CCL commands for a search set as a procedure.
|
void |
setComment(java.lang.String comment)
Establish a comment to associate with the procedure
|
void |
setContent(java.util.Collection<java.lang.String> lines)
Set the collection of lines that comprise the procedure
|
getControlObject
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
cancel, getSession, isCancelable, setCancelable
public TdbProcedure(TdbSession session, TdbControlObject ob) throws TdbException
session
- Active sessionob
- Control object referencing the procedure desiredTdbException
public TdbProcedure(TdbSession session) throws TdbException
session
- Active sessionTdbException
public java.lang.String getOwnerName()
public java.lang.String getName()
public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- The comment, if anypublic java.util.List<java.lang.String> content()
public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
public void setContent(java.util.Collection<java.lang.String> lines)
lines
- The procedure's new contentpublic void get(java.lang.String owner, java.lang.String name) throws TdbException
owner
- The owning entity of the stored procedure to be retrieved, null
for the calling user.name
- The name of the stored procedure to be retrieved.TdbException
public void get() throws TdbException
TdbException
public void export(java.lang.String filename, java.lang.String owner, java.lang.String name) throws TdbException
filename
- The name of the file to which the procedure definition should be writtenowner
- The name of the owner of the procedure (group/user), null for the calling username
- The name of the procedure to be exportedTdbException
public void export(java.lang.String filename) throws TdbException
filename
- The name of the file to which the procedure definition should be writtenTdbException
public void copy(java.lang.String newowner, java.lang.String newname, TdbControlObject newobject) throws TdbException
newowner
- The name of the entity that will own the newly created procedure, set
null for the calling user.newname
- The name of the newly created procedure.newobject
- If not null, this will hold the Control information for the newly
created procedure on return.TdbException
public void delete(java.lang.String owner, java.lang.String name) throws TdbException
owner
- The owning entity of the stored procedure to be deleted, set null for the
calling user.name
- The name of the stored procedure to be deleted.TdbException
public void delete() throws TdbException
TdbException
public void create(java.lang.String owner, java.lang.String name, java.lang.String comment) throws TdbException
owner
- The owning entity of the stored procedure to be created, set as null for
the calling user.name
- The name of the stored procedure to be created.comment
- An optional comment for the new procedureTdbException
public void put() throws TdbException
TdbException
public void importProcedure(java.lang.String filename, java.lang.String owner, java.lang.String name) throws TdbException
filename
- The name of the file containing the procedure definitionowner
- The owner of the new procedure (either a user or a group name),
null for the calling user.name
- The name of the new procedureTdbException
public void importUpdate(java.lang.String filename, java.lang.String owner, java.lang.String name) throws TdbException
filename
- The name of the file containing the updated procedure definitionowner
- The owner of the procedure to be updated (either a user or a group name),
null for the calling user.name
- The name of the procedure to be updatedTdbException
public void importUpdate(java.lang.String filename) throws TdbException
filename
- File to read updated definition fromTdbException
public void rename(java.lang.String newname) throws TdbException
newname
- The new name of the procedure.TdbException
public void saveSearch(int searchSetNumber, java.lang.String owner, java.lang.String name, java.lang.String comment) throws TdbException
IMPORTANT: This procedure must be executed using the FIND SAVE command.
The CCL command that generated the search set is saved
in the procedure, as is all the CCL commands upon which it
depends, such as BASE and other search sets that are referred
to using the S=
searchSetNumber
- The number of an existing search setowner
- The owner of the new procedure (user or group name), or null for the calling username
- The name of the new procedurecomment
- A brief comment describing the procedure, or null for no commentTdbException