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
101 ($status, @output) = $class->updateFolderInfo;
103 return $status ? undef : $class;
113 Returns the name of the folder
117 =for html <blockquote>
125 =for html </blockquote>
129 =for html <blockquote>
137 =for html </blockquote>
141 return $self->{name};
151 Returns the owner of the folder
155 =for html <blockquote>
163 =for html </blockquote>
167 =for html <blockquote>
175 =for html </blockquote>
179 return $self->{owner};
189 Returns the group of the folder
193 =for html <blockquote>
201 =for html </blockquote>
205 =for html <blockquote>
213 =for html </blockquote>
217 return $self->{group};
227 Returns the pvob of the folder
231 =for html <blockquote>
239 =for html </blockquote>
243 =for html <blockquote>
251 =for html </blockquote>
255 return $self->{pvob};
265 Returns the title of the folder
269 =for html <blockquote>
277 =for html </blockquote>
281 =for html <blockquote>
289 =for html </blockquote>
293 return $self->{title};
297 my ($self, $name, $parentFolder) = @_;
303 Creates a new UCM Folder Object
307 =for html <blockquote>
317 Name of parentFolder (Default: RootFolder)
321 =for html </blockquote>
325 =for html <blockquote>
331 Status from cleartool
339 =for html </blockquote>
343 # Fill in object members
344 $self->{parentFolder} = $parentFolder;
346 $parentFolder ||= 'RootFolder';
348 # Need to create the folder
349 return $Clearcase::CC->execute(
350 "mkfolder $self->{comment} -in " . $parentFolder . '@' . $self->{pvob} .
366 =for html <blockquote>
376 =for html </blockquote>
380 =for html <blockquote>
386 Status from cleartool
390 Output from cleartool
394 =for html </blockquote>
398 return $Clearcase::CC->execute(
399 'rmfolder -f ' . $self->{name} . "\@" . $self->{pvob}->tag);
402 sub updateFolderInfo () {
405 my ($status, @output) = $Clearcase::CC->execute(
406 "lsfolder -long $self->{name}" . '@'. $self->{pvob}->tag);
413 } elsif (/group: (.*)/) {
415 } elsif (/title: (.*)/) {
417 # TODO: Get containing folders and containing projects
428 =head2 ClearSCM Perl Modules
430 =for html <p><a href="/php/scm_man.php?file=lib/Clearcase.pm">Clearcase</a></p>
432 =for html <p><a href="/php/scm_man.php?file=lib/Clearcase/UCM/Baseline.pm">Clearcase::UCM::Baseline</a></p>
434 =head1 INCOMPATABILITIES
438 =head1 BUGS AND LIMITATIONS
440 There are no known bugs in this module.
442 Please report problems to Andrew DeFaria <Andrew@ClearSCM.com>.
444 =head1 LICENSE AND COPYRIGHT
446 Copyright (c) 2007, ClearSCM, Inc. All rights reserved.