releasing/cbrtools/perl/PathData.pm
author kelvzhu
Mon, 18 Oct 2010 16:16:46 +0800
changeset 655 3f65fd25dfd4
parent 602 3145852acc89
permissions -rw-r--r--
sync up SVN codes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     2
# All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     3
# This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     5
# which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     7
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     8
# Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    10
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    11
# Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    12
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    13
# Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    14
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    15
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    16
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    17
package PathData;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    18
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    19
use strict;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    20
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
# Constructor
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
sub New {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
  my $pkg = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
  my $verbose = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
  my $self = {};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
  bless $self, $pkg;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    30
  $self->{verbose} = $verbose;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    31
  return $self;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    32
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    33
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    34
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    35
# Public
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
# This function is called by IniData when it comes across an archive_path*
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
# line. It will only be called once, because the first thing it does
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
# is reclassify this object as a PathData::ComponentBased or a
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
# PathData::ProjectBased. Subsequent calls to ProcessLine will therefore
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
# call the derived class methods.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
sub ProcessLine {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
  my $keywordref = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
  my $lineref = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
  $self->SubclassifyMyselfByKeyword($keywordref); # make myself a subclass
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
  $self->ProcessLine($keywordref, $lineref); 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
      # now ask the subclass to process the line
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    53
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    54
sub LocalArchivePathForExistingOrNewComponent {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    55
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
  my $project = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
  my $result = $self->LocalArchivePathForExistingComponent($comp, $ver, $project);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
  $result ||=  $self->LocalArchivePathForNewComponent($comp, $ver, $project);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
  return $result;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
sub LocalArchivePathForNewOrExistingComponent {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
  die "You meant LocalArchivePathForExistingOrNewComponent... teehee";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
# These methods must all be reimplemented by the subclass
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
sub LocalArchivePathForNewComponent {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    70
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    71
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    72
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
  my $project = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
  die "No path data found in reldata.ini. Cannot provide local archive path for new component.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
sub LocalArchivePathForExistingComponent {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    79
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    80
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    81
  die "No archive found in reldata.ini. Cannot provide local archive path for existing component.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    82
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    84
sub LocalArchivePathForImportingComponent {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    85
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    86
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
  my $remotepath = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
  die "No path data found in reldata.ini. Cannot provide local archive path for importing component.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
sub RemoteArchivePathForExistingComponent {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    93
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    94
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    95
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    96
  die "No path data found in reldata.ini. Cannot provide remote archive path for existing component.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    97
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    98
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    99
sub RemoteArchivePathForExportingComponent {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   100
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   101
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   102
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   103
  my $localpath = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   104
  die "No path data found in reldata.ini. Cannot provide remote archive path for exporting component.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   105
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   106
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   107
sub ListComponents {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   108
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   109
  die "No path data found in reldata.ini. Cannot return list of components.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   110
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   111
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   112
sub ListVersions {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   113
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   114
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   115
  my $filter = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   116
  die "No path data found in reldata.ini. Cannot return a list of versions.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   117
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   118
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   119
sub ListProjects {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   120
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   121
  die "No path data found in reltools.ini. Cannot return list of projects.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   122
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   123
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   124
sub ComponentProjects {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   125
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   126
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   127
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   128
  die "No path data found in reldata.ini. Cannot return which project a component belongs to.\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   129
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   130
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   131
sub ComponentProject {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   132
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   133
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   134
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   135
  die "No path data found in reldata.ini. Cannot return which project a component belongs to.";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   136
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   137
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   138
sub ReleaseExists {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   139
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   140
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   141
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   142
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   143
  my $relDir = $self->LocalArchivePathForExistingComponent($comp, $ver);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   144
  if ($relDir && -e $relDir) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   145
    return 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   146
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   147
  return 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   148
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   149
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   150
sub CheckReleaseExists {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   151
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   152
  my $comp = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   153
  my $ver = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   154
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   155
  unless ($self->ReleaseExists($comp, $ver)) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   156
    die "Error: $comp $ver not found\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   157
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   158
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   159
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   160
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   161
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   162
# Private
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   163
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   164
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   165
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   166
sub SubclassifyMyselfByKeyword {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   167
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   168
  my $keywordref = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   169
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   170
  if ($$keywordref =~ m/archive_path_file/i) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   171
    require PathData::ComponentBased;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   172
    bless ($self, "PathData::ComponentBased");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   173
  } elsif ($$keywordref =~ m/archive_path/i) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   174
    require PathData::ProjectBased;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   175
    bless ($self, "PathData::ProjectBased");
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   176
  } else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   177
    die "Unknown archive_path related keyword: ".$$keywordref."\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   178
  }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   179
  print "Using ".(ref $self)." type of archive path arrangement. Keyword was $$keywordref\n" if ($self->{verbose});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   180
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   181
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   182
1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   183
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   184
__END__
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   185
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   186
=head1 NAME
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   187
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   188
PathData.pm - Provides the location of archived releases.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   189
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   190
=head1 DESCRIPTION
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   191
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   192
Provides a class to represent knowledge of the archive structure. The class is mostly abstract; however, an object of this class may exist temporarily before it converts itself to a subclass.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   193
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   194
=head1 INTERFACE
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   195
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   196
=head2 New
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   197
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   198
Expects to be passed a verbosity flag.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   199
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   200
=head2 ProcessLine
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   201
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   202
Processes a line from the C<reltools.ini> file. This will cause the object to bless itself into a subclass, depending on the keyword, then it will ask the subclass to process the line.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   203
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   204
=head2 LocalArchivePathForExistingOrNewComponent
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   205
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   206
This method returns C<LocalArchivePathForExistingComponent>, or failing that, C<LocalArchivePathForNewComponent>.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   207
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   208
=head2 ComponentProject
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   209
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   210
This returns the first item returned by the subclass method C<ComponentProjects>.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   211
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   212
=head2 Methods to be implemented by the subclass
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   213
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   214
All the remaining methods should be implemented by the subclass of the C<PathData>. All of these methods are expected to return the full location where the files should be stored; i.e. local archive paths should end in "\component\version" and remote archive paths should end in "/component".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   215
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   216
=head2 LocalArchivePathForNewComponent
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   217
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   218
This takes a component and a version and (optionally) the name of the project to store the component in.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   219
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   220
=head2 LocalArchivePathForExistingComponent
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   221
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   222
This takes a component and a version.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   223
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   224
=head2 LocalArchivePathForImportingComponent
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   225
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   226
This takes a component, a version, and the remote path where the component was found.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   227
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   228
=head2 RemoteArchivePathForExistingComponent
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   229
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   230
This takes a component, a version and a C<RemoteSite> object.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   231
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   232
=head2 RemoteArchivePathForExportingComponent
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   233
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   234
This takes a component, a version, and the local path where the component was found.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   235
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   236
=head2 ListComponents
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   237
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   238
This may take "1" to indicate that it should list the components stored remotely, not locally.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   239
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   240
=head2 ListVersions
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   241
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   242
This takes a component. It may optionally take a "1" to indicate that it should list the versions stored remotely, not locally. The third parameter is also optional; a regular expression that can be applied to filter the list of versions that is returned.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   243
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   244
=head2 ListProjects
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   245
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   246
=head2 ComponentProjects
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   247
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   248
This takes a component and a version and returns the project name of all archives where the release is found.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   249
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   250
=head2 ComponentProject
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   251
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   252
This takes a component name and a version and returns the project name of the first archive where the release is found.  It gives the corresponding project name to the path that LocalArchivePathForExistingComponent gives for the same arguments.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   253
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   254
=head2 ReleaseExists
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   255
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   256
Takes a component name and a version number. Return true if the component release is present in the local archive, false otherwise.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   257
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   258
=head2 CheckReleaseExists
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   259
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   260
Takes a component name and a version number. Dies if the component release is not present in the local archive.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   261
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   262
=head1 IMPLEMENTATION
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   263
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   264
=head2 SubclassifyMyselfByKeyword
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   265
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   266
This will convert the object to either a C<PathData::ProjectBased> or C<PathData::ComponentBased> depending on the keyword passed in.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   267
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   268
=head1 KNOWN BUGS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   269
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   270
None.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   271
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   272
=head1 COPYRIGHT
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   273
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   274
 Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   275
 All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   276
 This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   277
 under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   278
 which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   279
 at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   280
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   281
 Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   282
 Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   283
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   284
 Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   285
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   286
 Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   287
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   288
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   289
=cut