3 =head1 NAME $RCSfile: Folder.pm,v $
5 Object oriented interface to UCM Folders
13 Andrew DeFaria <Andrew@ClearSCM.com>
21 Fri May 14 18:16:16 PDT 2010
25 $Date: 2011/11/15 02:00:58 $
31 Provides access to information about Clearcase Folders.
33 my $folder = new Clearcase::UCM::Folder ($name, $pvob);
37 This module implements a UCM Folder object
41 The following routines are exported:
45 package Clearcase::UCM::Folder;
51 my ($class, $name, $pvob, $parent, $comment) = @_;
57 Construct a new Clearcase Folder object.
61 =for html <blockquote>
71 =for html </blockquote>
75 =for html <blockquote>
79 =item Clearcase Folder object
83 =for html </blockquote>
90 parent => $parent || 'RootFolder',
93 $comment = Clearcase::_setComment ($comment);
95 my ($status, @output) = $Clearcase::CC->execute (
96 "mkfolder $comment -in " . $class->{parent} . ' ' . $name . '@' . $pvob->tag
99 return $class->updateFolderInfo;
109 Returns the name of the folder
113 =for html <blockquote>
121 =for html </blockquote>
125 =for html <blockquote>
133 =for html </blockquote>
137 return $self->{name};
147 Returns the owner of the folder
151 =for html <blockquote>
159 =for html </blockquote>
163 =for html <blockquote>
171 =for html </blockquote>
175 return $self->{owner};
185 Returns the group of the folder
189 =for html <blockquote>
197 =for html </blockquote>
201 =for html <blockquote>
209 =for html </blockquote>
213 return $self->{group};
223 Returns the pvob of the folder
227 =for html <blockquote>
235 =for html </blockquote>
239 =for html <blockquote>
247 =for html </blockquote>
251 return $self->{pvob};
261 Returns the title of the folder
265 =for html <blockquote>
273 =for html </blockquote>
277 =for html <blockquote>
285 =for html </blockquote>
289 return $self->{title};
293 my ($self, $name, $parentFolder) = @_;
299 Creates a new UCM Folder Object
303 =for html <blockquote>
313 Name of parentFolder (Default: RootFolder)
317 =for html </blockquote>
321 =for html <blockquote>
327 Status from cleartool
335 =for html </blockquote>
339 # Fill in object members
340 $self->{parentFolder} = $parentFolder;
342 $parentFolder ||= 'RootFolder';
344 # Need to create the folder
345 return $Clearcase::CC->execute(
346 "mkfolder $self->{comment} -in " . $parentFolder . '@' . $self->{pvob} .
362 =for html <blockquote>
372 =for html </blockquote>
376 =for html <blockquote>
382 Status from cleartool
386 Output from cleartool
390 =for html </blockquote>
394 return $Clearcase::CC->execute(
395 'rmfolder -f ' . $self->{name} . "\@" . $self->{pvob}->tag);
398 sub updateFolderInfo () {
401 my ($status, @output) = $Clearcase::CC->execute(
402 "lsfolder -long $self->{name}" . '@'. $self->{pvob}->tag);
409 } elsif (/group: (.*)/) {
411 } elsif (/title: (.*)/) {
413 # TODO: Get containing folders and containing projects
423 =head2 ClearSCM Perl Modules
425 =for html <p><a href="/php/scm_man.php?file=lib/Clearcase.pm">Clearcase</a></p>
427 =for html <p><a href="/php/scm_man.php?file=lib/Clearcase/UCM/Baseline.pm">Clearcase::UCM::Baseline</a></p>
429 =head1 INCOMPATABILITIES
433 =head1 BUGS AND LIMITATIONS
435 There are no known bugs in this module.
437 Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
439 =head1 LICENSE AND COPYRIGHT
441 Copyright (c) 2007, ClearSCM, Inc. All rights reserved.